YinLiLin / CMplot

📊 Circular and Rectangular Manhattan Plot
511 stars 112 forks source link

Error with highlight.text #21

Open pscpsm opened 4 years ago

pscpsm commented 4 years ago

Hi,

I am having trouble adding gene names with this tool.

This works great: CMplot(GWASresults, plot.type="m", type = "p", LOG10=TRUE, threshold=NULL, highlight = SIG)

But the addition of the highlight.text parameter gives an error:

CMplot(GWASresults, plot.type="m", type = "p", LOG10=TRUE, threshold=NULL, highlight = SIG, highlight.text = SIG) Error in last <<- i : cannot change value of locked binding for 'last'

SIG is a vector of character gene ID's. I have also tried sourcing CMplot from both CRAN and directly from github, but I get the same issue with both versions.

Any help with this issue would be greatly appreciated! Thanks!

YinLiLin commented 4 years ago

Hi,

This problem seems to happen when the formate of 'SIG' isn't correct, if you couldn't find it out, please seed me a small example that can reproduce your error, I am pleasure to debug the code for your problem.

best, LL

pscpsm commented 4 years ago

Hi,

Thank you for your response, It turns out the error was from including a '.' in the gene name, e.g. NC_1.1_10090 Changing the gene names to e.g. NC_1_1_10090 fixed the error.

Thanks!

fanwayne commented 4 years ago

Hello, YinLiLin. I have the same issue when running with multitracks. Even the example code didn't work with the built-in data pig60K. However, when I changed your code from "last <<- i" (line 114) to "last <- i". The issue disappeared. I was wondering whether you coded with a small typo here.

YinLiLin commented 4 years ago

Hi, Thanks a lot for pointing out this issue, I have corrected it, really sorry about that.