This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Vcf File With Variants And Genotypes For A "Single Individual"

Hi there,

I am working with a software that needs a VCF file with variants and genotypes for a single individual and a single chromosome. I searched and found this link to download data but the vcf file contains several individual information. Please help me download this data.

ftp://ftp-trace.ncbi.nih.gov/1000genomes/ftp/release/20110521/ALL.chr10.phase1_release_v3.20101123.snps_indels_svs.genotypes.vcf.gz

Thanks in advance for any advice

vcf snp

4 answers

Use VCFtools:

vcf-query file.vcf chr:start-end sample name

This will give you exactly what you want.

To extract the genotype information from a single individual you can use the SelectVariantWalker from the Genome Analysis Toolkit. Download the GATK from here: http://www.broadinstitute.org/gatk/download, and then run the walker with a command looking something like this:

java -Xmx2g -jar GenomeAnalysisTK.jar -T SelectVariants -V [your vcf file] --sample_name [name of your sample]

If you run this over the file that you linked to, you should get all the genotypes for the individual on chr 10. If you have a file containing genotype data from more than one chromosome you could use the "--select_expressions" option to select genotypes from a specific chromosome. Checkout the documentation for more info: http://www.broadinstitute.org/gatk/gatkdocs/org_broadinstitute_sting_gatk_walkers_variantutils_SelectVariants.html#--select_expressions

since files are very large is this possible to just download genotypes for specific individual?

I had the same problem. I eventually used Complete Genomics public data set of only 69 genomes. And I used tabix unix program to extract just part of it. A 78GB problem turned into <5 MB file problem.

The OP could have used tabix over HTTP to extract a subset of the original file, since the 1000 Genomes data are gzip compressed. This was not the issue. He wanted to extract information for a single sample from a multiple sample file.

yes, the problem is exactly what you mentioned above.

Log in to answer this question.