Question: BCFTools view equivelent of GATK -T SelectVariants -sn sample_x --excludeNonVariants
0
gravatar for William
3.6 years ago by
William4.4k
Europe
William4.4k wrote:

What is the BCFTools view  equivalent parameter of  GATK SelectVariants --excludeNonVariants?

https://www.broadinstitute.org/gatk/gatkdocs/org_broadinstitute_gatk_tools_walkers_variantutils_SelectVariants.php

GATK SelectVariants has the option with the --excludeNonVariants parameter to exclude variants that only have hom-ref genotype calls after sub setting to a set of samples.

I would like to know how to do the same with BCFTools view.

I don't see a similar switch specified in the BCFTools view documentation:

https://samtools.github.io/bcftools/bcftools.html#view

 

bcftools gatk • 1.5k views
ADD COMMENTlink modified 3.6 years ago by Shane McCarthy300 • written 3.6 years ago by William4.4k
2
gravatar for Shane McCarthy
3.6 years ago by
Cambridge, Cambridgeshire
Shane McCarthy300 wrote:

How about

bcftools view -c1 input.vcf

to select sites with at least one non-ref allele?

ADD COMMENTlink written 3.6 years ago by Shane McCarthy300

Thanks. This seems to work, at least I don't see any sole GT      0|0  records.

ADD REPLYlink written 3.6 years ago by William4.4k
0
gravatar for Pierre Lindenbaum
3.6 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum119k wrote:

try

bcftools filter --exclude 'TYPE="ref"' input.vcf

 

ADD COMMENTlink written 3.6 years ago by Pierre Lindenbaum119k

Tried that but it does not work. Still have records with sole genotype being  GT      0|0 .

Need to run BCFtools view btw, first. Tried adding the exclude command to the view command or in a bcftools filter command after sub setting the samples.

ADD REPLYlink written 3.6 years ago by William4.4k
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: 901 users visited in the last hour