This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Excluding variants with a "LowQual" filter in bcftools consensus

Greetings.

I'm running the basic pipeline to call variants and generate consensus sequences using bcftools: mpileup | call | filter low qual variants (set FILTER to "LowQual") | consensus.

However, bcftools consensus is still counting low quality variants and outputting them as variants in the consensus genome. Is there a way to exclude such low quality variants?

Thanks.

snp bcftools covid-19 ngs

1 answer

bcftools consensus have an --include and --exclude paramater, which you can use to inlcude/exclude variants that should be used for the consensus. (See docs)

So a bcftools consensus --exclude FILTER="LowQual" should work.

It seems that it's working. Thanks!

Thank you for your input. You guided me to the right path, although your syntax did not work. I used 'FILTER~"LowQual"' as highlighted by the other reply.

Log in to answer this question.