Question: bcftools selest sites with FILTER "PASS" or "."
0
gravatar for curious
4 months ago by
curious320
curious320 wrote:

Trying to get site that have a FILTER value of "PASS" or "."

I know of:

bcftools view -f PASS filename.vcf.gz

and

bcftools view -f . filename.vcf.gz

I tried:

bcftools view -f 'PASS | .' filename.vcf.gz

but no dice.

Is it possible to get what I am looking for or do I have to filter separately then concat?

bcftools • 314 views
ADD COMMENTlink modified 4 months ago by Pierre Lindenbaum129k • written 4 months ago by curious320
3
gravatar for Pierre Lindenbaum
4 months ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum129k wrote:
bcftools view -f 'PASS,.' filename.vcf.gz
ADD COMMENTlink written 4 months ago by Pierre Lindenbaum129k

Thanks I just got it on my end too:

bcftools view -i "%FILTER='PASS' | %FILTER='.'" filename.vcf.gz

ADD REPLYlink modified 4 months ago • written 4 months ago by curious320

There are many ways to get this done but when an explicit parameter is available (-f), it's better to use that.

ADD REPLYlink written 4 months ago by RamRS27k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1267 users visited in the last hour