This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How To Get Phasing Status From Vcf Files

Hello All,

We are designing a pipeline that will take phased data as input. We will ultimately be using a phased dataset provided by another group. Until this arrives we would like to practice with some phased data. We have data in VCF files that we would like to have with phase information. So output should also be VCF format. Can anyone recommend a fast way to get phase information from, and ultimately in, VCF format. Here the emphasis is on speed, we want phased data as fast as possible as dummy data and are not concerned with error rate (this once). Thank you in advance for your comments.

Best,

Rubal

vcf haplotype genome

In what format will they supply the phased data? Are you sure is VCF? I was under the impression that VCF does not maintain phased data (alleles are swappable, no assurance of maintaining order)

I changed the title of your question because I understood that you are asking about how to get phasing data from vcf files. Please correct it if I am wrong.

I actually meant how do I phase unphased data that is in VCF format. Sorry I was away from this post for a while. But still interested in an answer

1 answer

In vcf files, if the two genotypes are separated by a pipe (e.g. 0|1) it means that they are phased; if they are separated by a slash (e.g. 0/1), they are unphased. http://www.1000genomes.org/node/101

For example:

#CHROM POS ID  REF ALT QUAL FILTER INFO FORMAT      NA00001        NA00002
20     14  rs1 G   A   9    PASS   ...  GT:GQ:DP:HQ 0|0:48:1:51,51 1/0:48:8:51,51
20     17  rs2 T   A   3    q10    ...  GT:GQ:DP:HQ 0|0:49:3:58,50 0/1:3:5:65,3
20     20  rs3 A   G   67   PASS   ...  GT:GQ:DP:HQ 1|0:21:6:23,27 0/1:2:0:18,2

The first individual (column NA00001) has phased data, because the genotypes are separed by a "|"; the second (NA00002) is unphased.

You can also use the --phased option in vcftools to extract only the individuals that have phased data (see http://vcftools.sourceforge.net/options.html )

I have the mapping wgs data on hand and Look forward to the method which turn unphased VCF files to phased. Could you please provide a method to get unphased VCF phased?

If the question is "How to phase a vcf file", there are lots of tools to do this - SHAPEIT, Eagle, Beagle, etc.

Log in to answer this question.