This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to calculate the coverage over a specif coordinate

Hi everybody, I have bam files for RNAseq, and I know the coordinates for specific exons of interest. I would like to know if there is any way to overlap my bam files over those specific coordinates and get the coverage for those regions. I usually use bedtools coverage, but to compare between samples. I was wondering if I can create a bed files with my coordinates and do:

bedtools coverage -a my.bam -b mycoordintes.bed -s

will that work?

Many thanks!

rna-seq coverage exon

1 answer

you should use -abam

for eexample:

bedtools coverage -abam sorted.bam -b regions.bed.gz | grep ^all > mycoverage.tab

what about?

java -jar GenomeAnalysisTK.jar -T DepthOfCoverage -R [reference fasta] -I [bam file] -L [bed file]

which one is better?

I think they both do the same job

Log in to answer this question.