Question: How to find variants that are common in one population but rare in others (population differentiation)?
gravatar for SOHAIL
2.1 years ago by
Beijing Institute of Genomics, CAS.
SOHAIL240 wrote:

Hi Everyone,

I have two VCF files: 1) VCF file containing SNPs from my population 2) Another VCF file with 1000 Genome SNPs data set from 26 populations.

I want to extract those variants that are found to be rare (<0.5%) within global samples (1000G) but common within my population (>5%). Can anyone please suggest a way how to do that?

Thank you!

ADD COMMENTlink modified 2.1 years ago • written 2.1 years ago by SOHAIL240
gravatar for donfreed
2.1 years ago by
Mountain View, CA
donfreed1.4k wrote:

You can do this pretty easily using the GATK assuming that your VCF has the AF info field annotation. First annotate the variants in your VCF with the allele frequency of the variants in 1000 Genomes.

java -jar $GATK -R reference.fasta -T VariantAnnotator -V input.vcf -o output_1.vcf --resource:onekg 1000genomes.vcf --expression onekg.AF

Then look for sites with AF > 0.05 and onekg.AF < 0.005 using GATK's SelectVariants.

java  -jar GenomeAnalysisTK.jar -R reference.fasta -T SelectVariants --variant output_1.vcf -o output_2.vcf -select "AF > 0.05 && onekg.AF < 0.005"
ADD COMMENTlink written 2.1 years ago by donfreed1.4k

Hi @donfreed!,

I tired VariantAnnotator but it prompts me an error message... it's odd:

ERROR -- ERROR stack trace

java.lang.NullPointerException at at org.broadinstitute.gatk.engine.executive.LinearMicroScheduler.execute( at org.broadinstitute.gatk.engine.GenomeAnalysisEngine.execute( at org.broadinstitute.gatk.engine.CommandLineExecutable.execute( at org.broadinstitute.gatk.utils.commandline.CommandLineProgram.start( at org.broadinstitute.gatk.utils.commandline.CommandLineProgram.start( at org.broadinstitute.gatk.engine.CommandLineGATK.main( ERROR ------------------------------------------------------------------------------------------ ERROR A GATK RUNTIME ERROR has occurred (version 3.7-0-gcfedb67): ERROR ERROR This might be a bug. Please check the documentation guide to see if this is a known problem. ERROR If not, please post the error message, with stack trace, to the GATK forum. ERROR Visit our website and forum for extensive documentation and answers to ERROR commonly asked questions ERROR ERROR MESSAGE: Code exception (see stack trace for error itself) ERROR ------------------------------------------------------------------------------------------

ADD REPLYlink written 2.1 years ago by SOHAIL240

Hi @donfreed!

Thanks for your code... problem solved... previously i had an issue with GATK..... now it's fine..

ADD REPLYlink written 2.1 years ago by SOHAIL240
gravatar for RamRS
2.1 years ago by
Houston, TX
RamRS20k wrote:

You should be able to use plink/vcftools to filter the 1000g VCF and get a BED file. Use that BED file to filter your VCF file while simultaneously adding a frequency filter.

ADD COMMENTlink written 2.1 years ago by RamRS20k
Please log in to add an answer.


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