I'm new using R and I have a doubt, I have this code for for una file:
peak <- readPeakFile("file", header=F)
peakpeakAnno <- annotatePeak(peak, tssRegion=c(-3000, 3000), TxDb=txdb, annoDb="org.Hs.eg.db")
write.table(peakAnno,"annotcaca", sep="\t", col.names=T, row.names = F)
I would like to know how I can create a loop that processes multiples files at the same time.
Thank you!!