Question: Problem bam files 0 counts
0
gravatar for Pin.Bioinf
2.1 years ago by
Pin.Bioinf270
Malaga
Pin.Bioinf270 wrote:

Hello, I am trying to get the counts of my experiment from the .bam files by using summarized experiment function in R.

My reads are single ends, not strand specific. Here is some R code:

gtffile <- file.path(dir2,"Homo_sapiens.GRCh38.91.gtf")
(txdb <- makeTxDbFromGFF(gtffile, format="gtf"))
(genes <- exonsBy(txdb, by="gene"))
library("GenomicAlignments")
se <- summarizeOverlaps(features=genes, reads=bamfiles,
                        mode="Union",
                        singleEnd=FALSE,
                        ignore.strand=FALSE,
                        fragments=FALSE )

I am getting 0 counts as the output for every sample and every gene. Anyone knows if it could be the .gtf file or if my .bam files are not correct? Ive done it many times. Any alternatives?

counts rna-seq mapping • 614 views
ADD COMMENTlink modified 2.1 years ago • written 2.1 years ago by Pin.Bioinf270
1

Please use the formatting bar (especially the code option) to present your post better. I've done it for you this time. Formatting bar

ADD REPLYlink written 2.1 years ago by RamRS26k

Didn't you get any error? What is the output of samtools idxstats file.bam ?

ADD REPLYlink written 2.1 years ago by venu6.4k

I get :

samtools idxstats: fail to load index for "24_control.bam"
ADD REPLYlink modified 2.1 years ago by RamRS26k • written 2.1 years ago by Pin.Bioinf270

Please use the formatting bar!

ADD REPLYlink written 2.1 years ago by RamRS26k

Then you should index 24_control.bam by doing samtools index 24_control.bam.

Top thing to check when zero counts manifest is to ensure that chromosome names match in your alignments and annotation (i.e. chr1 =\= 1).

ADD REPLYlink modified 2.1 years ago • written 2.1 years ago by genomax80k

Thank you a lot, i was helping another person who had stumbled upon this problem, and i realized she was using different genome anotations for mapping and for quantification.

ADD REPLYlink written 2.1 years ago by Pin.Bioinf270
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2091 users visited in the last hour