what is the output of 'samtools coverage'
1
0
Entering edit mode
7 months ago
monica ▴ 20

Hello everybody,

I wanted to calculate and generate coverage stats for my bam file and i used samtools coverage -m input.bam

This generated a histogram for each chromosome in the command line but it is a little bit hard to understand the output of it. what is the y axis of these histograms. it is shown only in percentages and how is it calculated? any help would be appreciated.

I am also wondering about how i can transfer these histograms from the bash command line into images.

Thank you so much in advance.

example

bam samtools coverage bamfiles • 802 views
ADD COMMENT
0
Entering edit mode
7 months ago

http://www.htslib.org/doc/samtools-coverage.html

Coverage is defined as the percentage of positions within each bin with at least one base aligned against it.

where a 'bin' is a column in your terminal

how i can transfer these histograms from the bash command line into images.

https://unix.stackexchange.com/questions/138804/

ADD COMMENT
0
Entering edit mode

Thank you so much. Is there a way also transfer the data that was used for generating these images (histograms). this does not give me enough freedom to edit the images.

ADD REPLY
0
Entering edit mode

Thank you so much. Is there a way also transfer the data that was used for generating these images (histograms).

don't use option -m ....

ADD REPLY
0
Entering edit mode

It is not the same output. Without -m, it gives only the stats for each chromosome as a whole

ADD REPLY
1
Entering edit mode

then you should just parse the output of samtools depth and aggregate the output with any tool like R, awk, etc...

ADD REPLY

Login before adding your answer.

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