BCFTools view equivelent of GATK -T SelectVariants -sn sample_x --excludeNonVariants
2
0
Entering edit mode
8.6 years ago
William ★ 5.3k

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

How about

bcftools view -c1 input.vcf

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

ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode
8.6 years ago

Try

bcftools filter --exclude 'TYPE="ref"' input.vcf
ADD COMMENT
0
Entering edit mode

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 REPLY

Login before adding your answer.

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