Dear All,
I have strand-specific paired-end RNA-seq data, and I am attempting to generate a table of reads counts. I wanted to ask if the following steps are correct:
1. load separately bam files with BamFile function and specify asMates=TRUE for paired-end reads
bamflU1 <- BamFile("PATH/U1.bam", asMates=TRUE)
2. transform the file in a readGAlignmentPairs object and specify strandMode=2 for strand specificity
rGAP_U1 <- readGAlignmentPairs(bamflU1, use.names=TRUE, strandMode=2)
3. use summarizeOverlaps function for each bam file separately after loading the gtf file
countsU1 <- summarizeOverlaps(id_gene, rGAP_U1,mode="Union",singleEnd=FALSE, ignore.strand=FALSE)
4. create an unique object containing all the samples counts
Is there another way to import directly all the bamfiles and define them as paired-end and stranded? (it seems that the BamFilesList function is not compatible with the readGAlignmentPairs object)
Thank you for any help and suggestion,
Regards