This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to convert txt file to ped and map using plink

I am trying to convert a .txt and b.txt file to a1.ped and b1.map file using plink or R. I have read some manuals, but it seems that no one specifically mentions how to convert txt to ped and map.

Can somebody help me out? P.S If there is another way (non-plink) of doing that, please do share it.

plink ped map txt

You'll need to do some data reformating. For that, found out how your files should look and look what you have. Probably some rearrangements have to be made. Also, by just mentioning ".txt" we have no idea how your file is structured...

i have two files that look like : map.txt

chr2    rs10185490  0   71166840
chr2    rs10185622  0   60289424
chr2    rs10185637  0   128422745
chr2    rs10185660  0   88463237
chr2    rs10185662  0   1964906
chr2    rs10185666  0   33696602

and ped.txt

   0    Tri1    0   0   0   0   D D D D D D D D D D D D
   0    Tri2    0   0   0   0   D D D D D D D D D D D D
   0    Tri3    0   0   0   0   D D D D D D D D D D D D
   0    Tri4    0   0   0   0   D D D D D D D D D D D D
   0    Tri5    0   0   0   0   D D D D D D D D D D D D
   0    Tri6    0   0   0   0   D D D D D D D D D D D D
   0    Tri7    0   0   0   0   D D D D D D D D D D D D
   0    Tri8    0   0   0   0   D D D D D D D D D D D D
   0    Tri9    0   0   0   0   D D D D D D D D D D D D
   0    Tri10   0   0   0   0   D D D D D D D D D D D D

I made its according to Plink (http://www.gwaspi.org/?page_id=145). I use the package in which the files with the extension .ped and .map and I would like to know whether it is possible to convert its.

Your ped.txt has weird genotypes, all are 'D'? All your samples are unaffected and have no gender?

For the rest I think those match with the format specified. So then what's the problem?

0 answers

No answers yet.

Log in to answer this question.