Using Bedtools coverage for a single alignment file?
1
0
Entering edit mode
19 months ago
caro-ca ▴ 20

I have a single BAM file between a set of vectors and the bacterium genome. I would like to know the read depth of each genomic feature of the plasmid, and the median coverage of each plasmid. I would like to use bedtools coverage but I am finding difficulties applying it with my dataset as I only have one alignment file. I looked at FeatureCounts but as far as I could search, it retrieves the read counts. Is there a way to use bedtools coverage with a single bam file?

I hope you could help me out. Thank you in advance.

Bedtools • 951 views
ADD COMMENT
0
Entering edit mode

would like to use bedtools coverage but I am finding difficulties applying it with my dataset as I only have one alignment file.

hum... why is it a problem ? what did you try ?

ADD REPLY
0
Entering edit mode

Having just a BAM file was not enough and I didn't understand what parameters to include but the problem was solved.

ADD REPLY
1
Entering edit mode
19 months ago
seidel 11k

Are your features and/or plasmids (vectors) described in a BED file? If so, you can query coverage overlaps in a straightforward way:

bedtools coverage -a features.bed -b alignments.bam

the number of alignment files (BAM files) is not relevant. However, to clarify, when say: "read depth of each genomic feature" what do you actually mean? Read depth can vary along features. You might be able to play with "-hist" option to easily get what you need.

ADD COMMENT
0
Entering edit mode

"-hist" is indeed what I need! Thank you. I don't have a BED file but I guess I can convert a GFF file to a BED file.

ADD REPLY
0
Entering edit mode

Thank you so much! Just running bedtools coverage -a features.bed -b alignments.bam worked.

I assume the last four columns of that output retrieves:

depth of coverage, number of bases at that depth, size of the feature, and fraction covered.

ADD REPLY

Login before adding your answer.

Traffic: 3846 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