Convert IMPUTE2 to VCF while keeping phase information
1
4
Entering edit mode
8.4 years ago
lkmklsmn ▴ 970

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 • 4.5k views
ADD COMMENT
0
Entering edit mode

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 REPLY
2
Entering edit mode

plink 2.0 supports this:

plink2 --haps <full .haps filename> --export vcf --out <output filename prefix>
ADD REPLY
7
Entering edit mode
8.3 years ago
lkmklsmn ▴ 970

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

ADD COMMENT
0
Entering edit mode

But how did you resolve the problem you mentioned above?

ADD REPLY
0
Entering edit mode

Hi, for phased data, use this:

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

Login before adding your answer.

Traffic: 2629 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6