Question: coverage on exons with bedtools genomecov
1
gravatar for guillaume.rbt
3.5 years ago by
guillaume.rbt790
France
guillaume.rbt790 wrote:

Hello everyone,

I would like to have per-base coverage of a bam file of an RNAseq experiment, but only on exons.

I know how to do that on all genome with bedtools:

bedtools genomecov -d -ibam aligned_reads.bam -g genome.fa > cov.txt

And I have a gff file giving me the position of exons on my species.

Does anyone know a way to have the same result, but only on given exon positions?

Thanks,

Guillaume

coverage rna-seq exons bedtools • 1.6k views
ADD COMMENTlink modified 3.5 years ago by Jeffin Rockey1.1k • written 3.5 years ago by guillaume.rbt790
2
gravatar for Jeffin Rockey
3.5 years ago by
Jeffin Rockey1.1k
Karimannoor
Jeffin Rockey1.1k wrote:

From the gff extract those lines of exons only. something like below

awk<file.gff -F'\t' '$3==“exon”{print}' >exons.gff

Now use bedtools coverage with the above gff and your bam file with -d and other options that suits your purpose

ADD COMMENTlink modified 3.5 years ago by genomax84k • written 3.5 years ago by Jeffin Rockey1.1k

Thank for the tip. Works fine :)

ADD REPLYlink modified 3.5 years ago • written 3.5 years ago by guillaume.rbt790
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: 887 users visited in the last hour