This may be a rehash of an earlier issue, but I'm trying to figure out why is it that summarizeOverlaps is giving me no reads in a set of bam files. In essence, when analyzing a set of bam files I got 0 reads after summarizeOverlaps, even if the bam files (a total of 30 of them) show an average of 25M reads each. The code in R:
mm10.txdb <- makeTxDbFromUCSC(genome="mm10", tablename="knownGene")
ebg10 = exonsBy(mm10.txdb,by="gene")
bamdir = dir(getwd(),pattern = ".bam",full.names=TRUE)
bfl=BamFileList(bamdir,yieldSize=50000,index=character())
overlaps = summarizeOverlaps(features=ebg10,
reads=bfl,
mode="Union",
ignore.strand=TRUE,
singleEnd=TRUE)
rnaseq.counts = assays(overlaps)$counts
The "overlaps" object gives me no read counts at all, and if I do an earlier suggestion from an earlier post in including the inter.feature=FALSE flag I still get no reads. I'm wondering if you guys have ideas on what else may be going on and/or how to move past this. Thanks!
One thought - are the reads aligned to the same reference that you're creating the TxDb object from? In particular if the alignments in the bam files are to chromosomes with names '1', '2', etc but the overlapping features use 'chr1', 'chr2', etc then I'm not sure whether
summarizeOverlaps()
will find anything.