This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Extracting Variants from large set of variants

I have a vcf file of whole genome of human and it has millions of variants. Is there any way to extract my own variants of interest from these millions of variants? And even good if extracting variants on the basis of their 'rs IDs'

variant calling wgs data vcf

2 answers

GATK SelectVariants https://software.broadinstitute.org/gatk/documentation/tooldocs/3.8-0/org_broadinstitute_gatk_tools_walkers_variantutils_SelectVariants.php

And even good if extracting variants on the basis of their 'rs IDs'

--keepIDs / -IDs

List of variant IDs to select
If a file containing a list of IDs is provided to this argument, the tool will only select variants whose ID field is present in this list of IDs. The matching is done by exact string matching. The expected file format is simply plain text with one ID per line.

in VCF, the variants are mapped to the genome reference, in some cases there will be rs ID's in the VCF but it's best to extract based on the coordinates.

Log in to answer this question.