Question: Using Plink To Convert Files
0
gravatar for Tim
6.7 years ago by
Tim10
Tim10 wrote:

Hey,

I am trying to use PLINK to convert .ped and .map output into another format. As many know Affymetrix SNP chips used to be coded in AA, AB, BB manner and this format has often been recoded into 1,0,-1. I would need to convert my ACTG .ped file into a 1,0,-1 file and I was wondering whether there is a way in PLINK to do that - could somebody help me out?

Tim

plink conversion • 4.7k views
ADD COMMENTlink modified 6.7 years ago • written 6.7 years ago by Tim10
3
gravatar for zx8754
6.7 years ago by
zx87548.4k
London
zx87548.4k wrote:

How about use plink --recode12 option, and then use sed to convert 1,2 plink ped file to 1, 0, -1

plink --file data --recode12 --tab --out file12

Assuming "1 1"=1, "1 2"=0, "2 2"=-1:

sed 's/1 1/1/g' file12.ped | sed 's/1 2/0/g' | sed 's/2 2/-1/g' > file101.ped
ADD COMMENTlink written 6.7 years ago by zx87548.4k
0
gravatar for Tim
6.7 years ago by
Tim10
Tim10 wrote:

Hey

thanks for the response - just to make sure did you guess that 1 1=1 and 1 2=0 and 2 2=-1 or is this convention? Moreover, is the 'sed' line ready to be intered into plink? Doesn't it have to start with plink --file.....like your first line ?

ADD COMMENTlink written 6.7 years ago by Tim10
1

sed is another program separate from plink and it should be entered apart. If you are using Windows, you may install MinGW or Cygwing which includes a shell where you can find sed. Check for unix2dos if your files were generated under Unix. If you are under a Unix-like OS, sed is already there.

ADD REPLYlink written 6.7 years ago by Hernán110

"1 1=1 and 1 2=0 and 2 2=-1" - is my assumption, it is not a convention. Also, not sure how you would code NoCalls.

ADD REPLYlink written 6.7 years ago by zx87548.4k
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: 1122 users visited in the last hour