This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Extract variants/SNPs with T>G substitution from a VCF file

Is there a way to extract all variants/SNPs in a VCF file that have a T>G change across all chromosomes ? I'm looking at bcftools but but unable to find any filtering options for REF/ALT.

Thank you

vcf snp

1 answer

Use bcftools view with the -i flag for including variants.

bcftools view -i'REF=="T" & AlT == "G"'

Log in to answer this question.