Excluding variants with a "LowQual" filter in bcftools consensus
1
0
Entering edit mode
3.7 years ago
cg1440 ▴ 60

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 • 2.8k views
ADD COMMENT
2
Entering edit mode
3.7 years ago

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.

ADD COMMENT
1
Entering edit mode

--exclude 'FILTER~"LowQual"'

http://samtools.github.io/bcftools/bcftools.html

starting with 1.11, the FILTER column can be queried as follows:

FILTER="A" .. exact match, for example "A;B" does not pass

FILTER!="A" .. exact match, for example "A;B" does pass

ADD REPLY
0
Entering edit mode

It seems that it's working. Thanks!

ADD REPLY
0
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

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