jianan / qtlpvl

testing of pleiotrophy vs close linkage
http://jianan.github.io/qtlpvl
2 stars 4 forks source link

an error after running testpleio.1vs2 #9

Closed zmz1988 closed 6 years ago

zmz1988 commented 6 years ago

Hello!

Its my first time to use GitHub and I hope I could ask questions here. If not, I hope you don't mind.

I'm recently using qtlpvl package to perform the QTL analysis. When I ran obj <- testpleio.1vs2(cross, Y, chr, n.simu=5, int.method="1.5lod", search.method="complete") I got an error

Error in E.marker[, o] <- x$E.marker : replacement has length zero
In addition: There were 25 warnings (use warnings() to see them)

And if I define search.method="fast" in testpleio.1vs2 function, I got an error Error in if (j == j.old & i == i.old) break : argument is of length zero

I guess it's because my x$E.marker is empty. So I checked your original lines for function testpleio.1vs2, and found that E.marker <- matrix(NA, n, p). Does this mean that i don't have any NA in my file? It seems a bit not unlikely though.

So do you have any idea what's my problem in my dataset? Could you help me to solve my problem? Thanks!

jianan commented 6 years ago

Hi, I believe E.marker <- matrix(NA, n, p) is an initialization of the matrix, but what do you mean by "my x$E.marker is empty"? I would first check the Y matrix to make sure it is of the right dimension, is full rank, and does not contain NAs. Hope this could help!

zmz1988 commented 6 years ago

It helps! I just don't know that the analysis doesn't bear NAs. After I delete all the NAs, it works! Thank you!!