{"id":23,"date":"2017-01-26T14:37:46","date_gmt":"2017-01-26T14:37:46","guid":{"rendered":"https:\/\/www.staff.ncl.ac.uk\/ianwilson\/?p=23"},"modified":"2017-01-26T15:54:54","modified_gmt":"2017-01-26T15:54:54","slug":"1000-genomes-to-haploviewped-format","status":"publish","type":"post","link":"https:\/\/www.staff.ncl.ac.uk\/ianwilson\/2017\/01\/26\/1000-genomes-to-haploviewped-format\/","title":{"rendered":"1000 genomes to Haploview\/ped format"},"content":{"rendered":"<p>The 1000 genomes contain <a href=\"http:\/\/www.internationalgenome.org\/faq\/are-1000-genomes-variant-calls-phased\/\">phased data<\/a>. \u00a0How do we extract this data into a usable format? \u00a0Note that only the these are not guaranteed to remove all variants that are not bi-allelic SNPs so the output may need to be run through another script.<\/p>\n<p><strong>Tabix, vcftools and my own R script<\/strong><\/p>\n<p>The 1000_genomes_script on my own <a href=\"https:\/\/ijwilson.github.io\/sharedhaplotypes\/index.html\">site\u00a0<\/a>will do this<\/p>\n<p><strong>On the 1000 genomes web site<\/strong><\/p>\n<p><a href=\"http:\/\/browser.1000genomes.org\/Homo_sapiens\/UserData\/Haploview\">http:\/\/browser.1000genomes.org\/Homo_sapiens\/UserData\/Haploview<\/a><\/p>\n<p><strong>Tabix, vcftools &amp; plink<\/strong><\/p>\n<p>If we want to get phased data for the<\/p>\n<pre># use tabix to extract the correct section of the file.  Here \r\n# I consider the chromosome.  Change the file name for other chromosomes\r\ntabix -fh ftp:\/\/ftp.1000genomes.ebi.ac.uk\/vol1\/ftp\/release\/20130502\/ALL.chr1.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz 1:1000000-2000000 &gt; region1.vcf\r\n# vcftools to change to plink format\r\nvcftools --vcf region1.vcf --plink-tped --out 1000G_region1\r\n# plink converts this file into a form for haploview\r\nplink --noweb --tfile 1000G_region1 --recodeHV --out 1000G_region1.HV\r\n<\/pre>\n<p>Based on snippet <a href=\"https:\/\/www.biostars.org\/p\/17210\/\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The 1000 genomes contain phased data. \u00a0How do we extract this data into a usable format? \u00a0Note that only the these are not guaranteed to remove all variants that are not bi-allelic SNPs so the output may need to be &hellip; <a href=\"https:\/\/www.staff.ncl.ac.uk\/ianwilson\/2017\/01\/26\/1000-genomes-to-haploviewped-format\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1219,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[6,4,5,7],"class_list":["post-23","post","type-post","status-publish","format-standard","hentry","category-howto","tag-1000-genomes","tag-code","tag-howto","tag-snippet"],"_links":{"self":[{"href":"https:\/\/www.staff.ncl.ac.uk\/ianwilson\/wp-json\/wp\/v2\/posts\/23","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.staff.ncl.ac.uk\/ianwilson\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.staff.ncl.ac.uk\/ianwilson\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.staff.ncl.ac.uk\/ianwilson\/wp-json\/wp\/v2\/users\/1219"}],"replies":[{"embeddable":true,"href":"https:\/\/www.staff.ncl.ac.uk\/ianwilson\/wp-json\/wp\/v2\/comments?post=23"}],"version-history":[{"count":6,"href":"https:\/\/www.staff.ncl.ac.uk\/ianwilson\/wp-json\/wp\/v2\/posts\/23\/revisions"}],"predecessor-version":[{"id":29,"href":"https:\/\/www.staff.ncl.ac.uk\/ianwilson\/wp-json\/wp\/v2\/posts\/23\/revisions\/29"}],"wp:attachment":[{"href":"https:\/\/www.staff.ncl.ac.uk\/ianwilson\/wp-json\/wp\/v2\/media?parent=23"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.staff.ncl.ac.uk\/ianwilson\/wp-json\/wp\/v2\/categories?post=23"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.staff.ncl.ac.uk\/ianwilson\/wp-json\/wp\/v2\/tags?post=23"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}