Using Plink To Convert Files
2
0
Entering edit mode
11.7 years ago
Tim ▴ 10

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 • 6.3k views
ADD COMMENT
3
Entering edit mode
11.7 years ago
zx8754 12k

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 COMMENT
0
Entering edit mode
11.7 years ago
Tim ▴ 10

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 COMMENT
1
Entering edit mode

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

"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 REPLY

Login before adding your answer.

Traffic: 2467 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