What are "unused reference sequences" in a bam file?
1
0
Entering edit mode
5.2 years ago

In the documentation for samtools (http://www.htslib.org/doc/samtools.html) the depth command has the following options:

-a  :                Output all positions (including those with zero depth) 
-a -a, -aa :     Output absolutely all positions, including unused reference sequences. Note that when used in conjunction with a BED file the -a option may sometimes operate as if -aa was specified if the reference sequence has coverage outside of the region specified in the BED file.

I was wondering why there needs to be these two options and what unused reference sequences means? Why is the reference sequence sometimes unused vs. simply having no coverage there i.e. zero depth?

Many thanks!

sam bam samtools • 1.5k views
ADD COMMENT
2
Entering edit mode
ADD REPLY
2
Entering edit mode
5.2 years ago
ATpoint 85k

It means that -a alone will return zeros for the regions on a chomosome where you have reads aligned but the given region is empty = no coverage. Given a chromosome had no reads at all, -aa would return 0 for every position while -a alone would report nothing at all. Unused in this context means no coverage at any position of that chromosome/reference sequence.

ADD COMMENT
0
Entering edit mode

Thank you for your answer - There are definitely aligned reads on the chromosome in the bam files I've found to give nothing using -a although they may not be near the region I've been specifying. Is this just done to make the files smaller?

ADD REPLY
0
Entering edit mode

I do not know what you mean. Please give reproducible examples.

ADD REPLY
0
Entering edit mode

Sorry for not being clear - I think I may understand now. If you specify any specific region which has no coverage and only use -a there will be no output but if it has any coverage within the sepcified region the output will be 0 for that base using -a? I thought there would only be no output with -a if nowhere on the chromosome had any coverage which isn't true of my files but I was specifying specific regions. Anyway, thanks again!

ADD REPLY

Login before adding your answer.

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