This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How Can I Convert Impute2 (.Haps .Sample) To Plink (.Map .Ped)?

I have phased data output from SHAPEIT in .haps and .sample formats. I need to convert it back to PLINK formats (probably .map and .ped) so I can perform some further analyses.

Does anyone know how I could do that? I'm not having a lot of luck looking at the pages for PLINK, IMPUTE2, and SHAPEIT...

plink

1 answer

Use GTOOL for PED to GEN Conversion,

I tend to do it like this, the log file can be quite large and is generally useless so I send it to nowhere.

gtool -G --g CHR${i}.IMPUTE2.phase --s YourStudy_Chr${i}.IMPUTE2.sample --ped CHR${i}.ped --map CHR${i}.map --phenotype Phenotype --sex Gender --log /dev/null

I'm exploring that route now, but it looks about right. Thanks!

Hi

sure about that ? The format out of shapeit is not a genotype but haplotyped. Is the -G working OK ?

Hi!

I am facing the same problem currently, I have shapeit phased haplotypes and want to calculate LD using plink. So I need to convert my .hap file to .gen (can be directly used by plink1.9) or .ped format (plink 1.7). Referring to the last comment of Genotepes: No, at least for me the "-G" doesn't work. Would be super if somebody would read this (pretty old^^) thread :-) And it would be supersuper if somebody could help me - my question is, how do I convert the .hap to a .gen/.ped format??

BW Linda

Log in to answer this question.