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

Questions about GenABEL (aka *ABEL) suite of packages
Forum rules
Please remember not to post any sensitive data on this public forum.
The first few posts of newly registered users will be moderated in order to filter out any spammers.

When get a solution to the problem you posted, please change the topic name (e.g. from "how to ..." to "[SOLVED] how to ..."). This will make it easier for the community to follow the posts yet to be attended.
LinnMari
Posts: 3
Joined: Mon Dec 05, 2016 12:12 pm

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

Postby LinnMari » Mon Dec 05, 2016 12:40 pm

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?
Last edited by LinnMari on Wed Jan 11, 2017 10:20 am, edited 2 times in total.

LinnMari
Posts: 3
Joined: Mon Dec 05, 2016 12:12 pm

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

Postby LinnMari » Mon Dec 12, 2016 10:25 am

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..)

lckarssen
Site Admin
Site Admin
Posts: 321
Joined: Tue Jan 04, 2011 3:04 pm
Location: Utrecht, The Netherlands

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

Postby lckarssen » Mon Dec 12, 2016 11:21 am

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.
-------
Lennart Karssen
PolyOmica
The Netherlands
-------

LinnMari
Posts: 3
Joined: Mon Dec 05, 2016 12:12 pm

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

Postby LinnMari » Wed Jan 11, 2017 10:20 am

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

lckarssen
Site Admin
Site Admin
Posts: 321
Joined: Tue Jan 04, 2011 3:04 pm
Location: Utrecht, The Netherlands

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

Postby lckarssen » Wed Jan 11, 2017 11:09 am

Glad to hear the problem is solved!
-------
Lennart Karssen
PolyOmica
The Netherlands
-------


Return to “GenABEL”

Who is online

Users browsing this forum: Google [Bot] and 1 guest