PopGenome readMS error
1
0
Entering edit mode
7.0 years ago
biologist • 0

I have normal output from msms, with headers like this:

//

segsites: 15349

0.55065 0.55081 0.55083 0.55096 0.55112 0.55115 0.55122 0.55126 0.55136 0.55141

But when I attempt to input them into PopGenome using the following command:

x<-readMS(file="file", big.data=FALSE)

I consistently get this error:

Error: length(marker) == ndraws is not TRUE

A google of the error really finds nothing, otherwise I wouldn't ask as I know its rather cryptic. If anyone has an explanation I'd appreciate it.

PopGenome R MSMS • 1.9k views
ADD COMMENT
0
Entering edit mode

the output as you described seems different from the expected:

//
segsites: 5
positions: 0.0491 0.2443 0.2923 0.5984 0.8312
00001
00000
00010
11110
ADD REPLY
0
Entering edit mode
6.7 years ago
wang.yiguan ▴ 10

this is because the format of the first line in the simulation output. the number of replicates should be in the third column separated by " ". For example: "ms 10 100 ......" 100 is the number of replicates. Sometimes we you do simulation using msms, the third column may not be the number of the replicates, and thus leads to error.

To solve the problem, you can modify the first line manually, making sure the third column is the number of replicates. you can also do this by using bash sed command!

ADD COMMENT

Login before adding your answer.

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