How to calculate per base coverage from the .bam file?
1
2
Entering edit mode
4.5 years ago
PK ▴ 130

Hi all, I have some genes which are expressed in differentially compare to wild type, so i want to calculate perbase coverage from the BAM files. How to calculate that one.

RNA-Seq next-gen R • 3.4k views
ADD COMMENT
1
Entering edit mode

samtools depth but may I ask why you want to do that?

ADD REPLY
0
Entering edit mode

I have to plot that expression. I have RPKM values for that gene but if I plot in the excel file it comes like a point. my idea is like showing the distribution of the expression. lets say x-axis is a length of the gene in the y-axis expression of the gene.

ADD REPLY
0
Entering edit mode

I do not really see how this would make sense. Gene coverage in RNA-seq is the sum of transcript/exon coverage so you cannot easily get a representative per-base coverage. Yes, gene expression is commonly reported as one value per gene, be it the RPKM metric or any other normalized expression value. What do you think would you gain from plotting a per-base coverage of a gene? Are you referring to exon usage?

ADD REPLY
0
Entering edit mode

actually it is not a gene. it is a snoRNA. Just for saying i wrote as a gene. but when i try samtool depth

samtools depth -b missed_bed.bed -f PC1_Yale_PRS_sorted.bam

i got error

"Does the file "PC1_Yale_PRS_sorted.bam" really contain a list of files and do all exist?"

I really don't know???

ADD REPLY
2
Entering edit mode
4.5 years ago
ATpoint 82k

Purely from the technical side the command is samtools depth -b missed_bed.bed PC1_Yale_PRS_sorted.bam without -f. Explore if -a might help as well.

ADD COMMENT
0
Entering edit mode

got it....now its fine

ADD REPLY

Login before adding your answer.

Traffic: 3219 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6