Question: Convert IMPUTE2 to VCF while keeping phase information
4
gravatar for lkmklsmn
4.9 years ago by
lkmklsmn930
United States
lkmklsmn930 wrote:

Hi,  

I have imputed genotypes using the IMPUTE2 software. Now I need to convert my IMPUTE2 formatted genotypes into VCF. I have used the qctool to do so. However, the resulting VCF file has lost the phasing information. Is there any tool that allows me to convert IMPUTE2 to VCF while keeping the phasing information?  

Thanks

conversion phasing impute2 vcf • 2.6k views
ADD COMMENTlink modified 18 months ago by croshong750 • written 4.9 years ago by lkmklsmn930

Hi all

I tried to use shapeit to convert impute2 result to vcf file

with the following command

before doing that I changed the file extension *.impute2 ---> *.haps

with *.haps

./shapeit -convert --input-haps  [ prefix of haps file ] --output-vcf [ prefix of haps file ].vcf

I got the following error

Reading sample list in [*.sample]
  * 807 individuals included

Reading site list and haplotypes in [*.haps]

ERROR: Line=1 found=2426 fields, expected=1619 or 1620

It seems that the file format requirement of shapeit is different from impute2 file format or there may be any other option

for conversion in shapeit.

How can I fix this problem? or is there any other tool to conversion impute2 result to vcf format while retaining phasing information?

ADD REPLYlink modified 10 months ago by zx87549.7k • written 18 months ago by croshong750
2

plink 2.0 supports this:

plink2 --haps <full .haps filename> --export vcf --out <output filename prefix>
ADD REPLYlink written 18 months ago by chrchang5237.3k
7
gravatar for lkmklsmn
4.9 years ago by
lkmklsmn930
United States
lkmklsmn930 wrote:

I ended up using shapeit (version v2.837) -convert function to convert IMPUTE2 to VCF while keeping phase information.

ADD COMMENTlink written 4.9 years ago by lkmklsmn930

But how did you resolve the problem you mentioned above?

ADD REPLYlink written 7 months ago by linfengchen20190

Hi, for phased data, use this:

shapeit \
      -convert \
      --input-haps "${GEN}""_haps" \
      --output-vcf
ADD REPLYlink written 4 months ago by Kevin Blighe66k
Please log in to add an answer.

Help
Access

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