This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Convert IMPUTE2 to VCF while keeping phase information

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

vcf phasing impute2 conversion

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?

plink 2.0 supports this:

plink2 --haps <full .haps filename> --export vcf --out <output filename prefix>

1 answer

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

But how did you resolve the problem you mentioned above?

Hi, for phased data, use this:

shapeit \
      -convert \
      --input-haps "${GEN}""_haps" \
      --output-vcf

Log in to answer this question.