Question: Plink Map And Ped To Merlin Map And Pre - File Conversion Issues
gravatar for Varun
7.4 years ago by
United Kingdom
Varun30 wrote:


I am having a spot of trouble with file conversion. I am trying to test for multiple correction using SNPSpD ( I have my files in a normal plink ped and map format.

The ped file has 6 columns, and then the alleles. I've opened the ped file in excel, removed the sixth column, and then saved it as a pre file.

For the map file, the plink format has 4 columns. The merlin format has 3 columns. In the plink format, I've changed the first column to make it the marker id, left the second column as it is and then added pseudo marker-positions in the 3rd column and deleted the fourth column.

I tried loading it in SNPSpD, but it doesn't seem to like my file and isn't giving me any results. Does anyone know what is going on and what I am doing wrong?


plink ped map • 5.8k views
ADD COMMENTlink modified 5.0 years ago by Arija0 • written 7.4 years ago by Varun30

You might want to check out Difference Between .Pre And .Ped File (Problems With Snpspd.

ADD REPLYlink written 7.4 years ago by Matt Shirley9.3k

Hi Matt!

The map format expected by SNPSpD is a bit different from the Merlin format. It's given here: I have the same format, with the ID, name and position - albeit it is pseudo-position. I tried it with the standard merlin format - i.e. with chromosome instead of marker position, but it still doesn't work.

ADD REPLYlink written 7.3 years ago by Varun30

I'm sorry to hear that. Have you checked to make sure that you are using the correct whitespace, and that you have the correct "new line" characters? The file you linked to has "newline" characters, and not "carriage returns", but also has lots of duplicate whitespace (tabs and spaces). Here's what it looks like with the tabs (^I) and newlines ($):

1^I AV1S1A^I   0^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I$
2^I AV1S1B^I   500^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I$
3^I AV6S1^I   146000^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I$
4^I AV8S3^I   229000^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I$
5^I AV12S2^I   263000^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I$
6^I AV8S4^I   268000^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I$
7^I hADV14S1A 298000^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I$
8^I hADV14S1B 299000^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I$
9^I hADV14S1C 299500^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I$
10^I AV8S6^I   356000^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I$
11^I AV17S1^I   375000^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I$
12^I AV21S1^I   429000^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I$
13^I hADV23S1  462000^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I$
14^I AV26S1A   498000^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I$
15^I AV26S1B   498500^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I^I$
16^I AV27S1A   523000$
17^I AV27S1B   523500$
18^I hADV29S1  537000$
19^I AV30S1^I   542000$
20^I AV26S2^I   575000$
21^I hADV38S2  653000$
22^I AV39S1^I   675000$
23^I hDV102S2  794000$

Since it seems the program is just splitting on whitespace (assuming this is a valid file), you should make sure you have proper newline characters. If you are editing your file in Windows you may have some issue.

ADD REPLYlink modified 3 months ago by RamRS26k • written 7.3 years ago by Matt Shirley9.3k

Hi Matt!

Thanks very much for your response. It turned out, as I suspected, to be a rather silly error - I had missed adding the column titles to my MAP file! I had to, rather unfortunately, email the creator of the programme to find out.


ADD REPLYlink written 7.3 years ago by Varun30

Hi you all!

I am also trying to convert my plink files to merlin. But I do not have the marker position in centimorgans. I do have the basepair position. Anybody know how to get mega2 to accept those instead?

Or, can you make a genetic map in centimorgans from basepair positions?

Further, I used .map and .ped files

My .ped file has 4 columns:

chromosome    marker    centimorgans   basepair position

Do I need to make that a 3 column file? Idealy yes I guess, but would mega2 take basepair instead of centimorgans?

If you can help, please do, it is much appreciated since I am just starting out ;)



ADD REPLYlink modified 3 months ago by RamRS26k • written 5.0 years ago by Arija0
gravatar for Matt Shirley
7.4 years ago by
Matt Shirley9.3k
Cambridge, MA
Matt Shirley9.3k wrote:

In the MERLIN documentation, it seems that the map file needs the columns CHROMOSOME MARKER POSITION, and it sounds like you have MARKER MARKER? POSITION in your file. The PLINK documentation describes the four-column format, as well as an option for a "map3" three-column format, which sounds like exactly what you have. This is just the four-column map format without the column of centiMorgan distances.

ADD COMMENTlink written 7.4 years ago by Matt Shirley9.3k
gravatar for dweeks.pitt
6.3 years ago by
United States
dweeks.pitt40 wrote:

The free Mega2 program can convert from PLINK-format to Merlin-format.


ADD COMMENTlink modified 3 months ago by RamRS26k • written 6.3 years ago by dweeks.pitt40
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 864 users visited in the last hour