Page 1 of 1

Map file questions/problems convert.snp.ped [SOLVED]

Posted: Mon Dec 05, 2016 12:40 pm
by LinnMari
I'm having some problems loading my map file

-First of all my map file is not sorted on chromosome, I understand that this is not an issue as long as the map file align with the order of the ped file?

Here is how the first lines look:

Code: Select all

25   BICF2G630100019   0   31558578
25   BICF2G630100032   0   31570089
25   BICF2G630100034   0   31571436
25   BICF2G630100043   0   31596554
25   BICF2G630100054   0   31614639
25   BICF2G630100063   0   31625208
25   BICF2G630100075   0   31648688
39   BICF2G63010009   94.52299   92315155
25   BICF2G630100090   0   31698243
25   BICF2G630100094   0   31699552

There is no problem loading the map- and ped file with convert.snp.ped with these 4 columns and no header, however R quits without giving me an error code if I try to use the same map file with 3 columns and header like this (I have changed the mapHasHeaderLine accordingly):

Code: Select all

chrom name position      
25   BICF2G630100019   31558578
25   BICF2G630100032   31570089
25   BICF2G630100034   31571436
25   BICF2G630100043   31596554
25   BICF2G630100054   31614639
25   BICF2G630100063   31625208
25   BICF2G630100075   31648688
39   BICF2G63010009   92315155
25   BICF2G630100090   31698243
25   BICF2G630100094   31699552

And here is a part of the ped file:

Code: Select all

54 SAR02 0 0 0 0 C C T C A G A A T T T T T T A G C C T T T T C C T T 0 0 C C A A A C C C T T T C C C A A C C G G C C A A G G T T C C T T A


Any ideas?

Re: Map file questions/problems convert.snp.ped

Posted: Mon Dec 12, 2016 10:25 am
by LinnMari
Update: I have checked the different map files and all the map files I have edited (to either fewer columns or inserting a header), are reported to have 0 lines when I check these in Terminal with wc -l.

The only file with correct number of lines (SNPs) is the one with 4 columns (the first example in my first post). I have edited them in Excel and then saved as .txt files, I believe this is the reason for the problems, any good suggestions to find out how the files are different from each other?

(I apologise for my questions being "basic", but I am not formally trained in bioinformatics..)

Re: Map file questions/problems convert.snp.ped

Posted: Mon Dec 12, 2016 11:21 am
by lckarssen
Glad to hear you kept looking into this issue (even without bioinformatics training). I appreciate it a lot if people show willingness to dive into a problem and look/try/experiment a bit further, instead of just saying: "it doesn't work, tell me what I should type to fix it". :D

LinnMari wrote:Update: I have checked the different map files and all the map files I have edited (to either fewer columns or inserting a header), are reported to have 0 lines when I check these in Terminal with wc -l.

The only file with correct number of lines (SNPs) is the one with 4 columns (the first example in my first post). I have edited them in Excel and then saved as .txt files, I believe this is the reason for the problems, any good suggestions to find out how the files are different from each other?

Ah, that is important information! There is a difference in the way Windows, MacOS and Linux/Unix save files. This difference has to do with the way the end-of-lines are encoded in the file. Could you run the dos2unix tool on the file(s) you created on windows and then run wc -l again. I expect that that will solve your problem.

Re: Map file questions/problems convert.snp.ped

Posted: Wed Jan 11, 2017 10:20 am
by LinnMari
Thank you for the suggestion, I tried something I probably should have tried a lot sooner and that was to save the file in another format, the map files I have used earlier have been saved as .txt (tab), now I tried to save the same file as .txt (Windows), which are some of the options I have on MacOS. And guess what, now it seems to work as it should.

Thanks again! :D

Re: Map file questions/problems convert.snp.ped [SOLVED]

Posted: Wed Jan 11, 2017 11:09 am
by lckarssen
Glad to hear the problem is solved!