Question: Ways to convert .impute2 to .mldose
1
gravatar for coleman_jonathan
2.7 years ago by
European Union
coleman_jonathan260 wrote:

Does anyone know of any software package that can convert .impute2 data to .mldose (i.e. imputed data from IMPUTE2 to imputed data from MACH)? I have tried impute2mach in GenABEL, but it has repeatedly failed with a known error...

Direct conversion preferred, but I'm happy with indirect as long as it works!

snp imputation • 3.7k views
ADD COMMENTlink modified 2.6 years ago • written 2.7 years ago by coleman_jonathan260
3
gravatar for zx8754
2.7 years ago by
zx87543.6k
London
zx87543.6k wrote:

IMPUTE output is posterior probabilities, 3 columns for 1 SNP, e.g.: 0.1 0.1 0.8 corresponding to AA AB BB. Meaning it is more likely to be BB. MACH outputs dosage, 1 column for 1 SNP, e.g.: 1.7, corresponding 0=AA, 1=AB, 2=BB, so 1.7 is more likely to be BB.

Depending on the size of the data, you can write a quick script in R that would convert posterior probabilities to dosage:

0.1*0+0.1*1+0.8*2=1.7

 

ADD COMMENTlink written 2.7 years ago by zx87543.6k
1

Thanks - that's useful, I'll give it a try!

ADD REPLYlink written 2.7 years ago by coleman_jonathan260
2
gravatar for coleman_jonathan
2.6 years ago by
European Union
coleman_jonathan260 wrote:

I have written a brief cookbook to perform this conversion in UNIX:

http://openwetware.org/wiki/User:Jonathan_R._I._Coleman/Notebook/Notes_and_Protocols/2014/06/27

ADD COMMENTlink written 2.6 years ago by coleman_jonathan260
1

The awk code for this has now been cleaned to make it more efficient (credit: Tommy Carstensen).

Alternatively, the Uni of Washington has an R package for post-Impute2 conversions: http://www.bioconductor.org/packages/release/bioc/manuals/GWASTools/man/GWASTools.pdf

ADD REPLYlink written 24 months ago by coleman_jonathan260
1

How does your code deal with "0 0 0", i.e.: no call? Does it convert to Ref as 0*0+0*1+0*2=0 or NA?

ADD REPLYlink written 14 months ago by zx87543.6k

My code at the time you have accessed it would convert 0 0 0 to 0 (which is wrong! I think I assumed a non-call would default to 0.33 0.33 0.33, but it doesn't). This is easily fixable (get it to set 0 0 0 to NA) - I will implement a patch. Thanks for pointing this out!

ADD REPLYlink written 13 months ago by coleman_jonathan260
2
gravatar for Joey
2.7 years ago by
Joey400
Seattle
Joey400 wrote:

You can try a program called fcgene (http://sourceforge.net/projects/fcgene/). Look into Chapter 7 of the manual which accompanies the tool.

Thanks,

-Joey

ADD COMMENTlink written 2.7 years ago by Joey400

Thanks Joey - I've already looked into this programme. Unfortunately, I think it only converts impute2 files to MACH input files (.dat and .ped), whereas I am looking for the output files.

ADD REPLYlink written 2.7 years ago by coleman_jonathan260
0
gravatar for gueliat.ines
2.6 years ago by
France
gueliat.ines0 wrote:

I have the same probleme, could you please tell me how to write the R script to made the dosage file ?

ADD COMMENTlink written 2.6 years ago by gueliat.ines0
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: 1067 users visited in the last hour