Created
April 13, 2012 18:17
-
-
Save arq5x/2378903 to your computer and use it in GitHub Desktop.
VCF->TPED-PLINK-BED
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create SNPs-only subset of the 1000G callset VCF | |
$ curl -s http://ftp.1000genomes.ebi.ac.uk/vol1/ftp/technical/working/20120316_phase1_integrated_release_version2/ALL.chr22.phase1_release_v2.20101123.snps_indels_svs.vcf.gz | \ | |
zcat | \ | |
awk '$0 ~ /^#/ || $0 ~ "VT=SNP"' | \ | |
gzip > ALL.chr22.phase1_release_v2.20101123.snps_indels_svs.snpsonly.vcf.gz | |
# Use VCFTools to convert to TPED | |
$ vcftools | |
VCFtools (v0.1.8) | |
© Adam Auton 2009 | |
Process Variant Call Format files | |
For a list of options, please go to: | |
http://vcftools.sourceforge.net/options.html | |
Questions, comments, and suggestions should be emailed to: | |
vcftools-help@lists.sourceforge.net | |
$ zcat ALL.chr22.phase1_release_v2.20101123.snps_indels_svs.snpsonly.vcf.gz | \ | |
vcftools --vcf /dev/stdin --plink-tped --out 1kg.chr22.try2.snps.only | |
$ plink --tfile 1kg.chr22.try2.snps.only --make-bed --noweb --out vcftest.tped.plink |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment