Open pmenzel opened 3 years ago
Hello @pmenzel , thank you for pointing this out! The way it's setup right now, the variants take the quality into account while setting the threshold for depth but consensus does not take the quality into count when looking at minimum depth. I agree this is confusing and I will work on changing this behavior.
Consider an example output from
samtools mpileup
for the SARS-CoV2 mutation N501Y:i.e. there are 20 reads covering this position with a
T
, and one of the bases only has a quality score of 14 (encoded by/
).When setting a minimum coverage threshold of 20 (option
-m 20
) and minimum q-score of 20 (option-q 20
) inivar consensus
, the program outputs aT
in the consensus sequence, while it should be aN
, since only 19 of the bases are at least quality 20.On the other hand,
ivar variants
properly filters the lower quality base and does not call the variant unless reducing the value for option-q
.ivar variants -q 20
:ivar variants -q 14
: