YinLiLin / CMplot

📊 Circular and Rectangular Manhattan Plot
502 stars 111 forks source link

Weird grey lines #74

Closed michaelofrancis closed 1 year ago

michaelofrancis commented 1 year ago

Hello, I really enjoy this package. However, I noticed I had some holes in my circular plot, which I drew a circle in red around here:

image

I zoomed in on the area and I noticed there were some grey lines appearing for unknown reason in this region

image

I do not think this is expected behavior of the software. Here is my code and the data. Any solutions would be appreciated. Thanks!

CMplot(dat.11.62, type="p", plot.type="c", #circular LOG10=T, #change P vals into log band=0.8, #space between chromosomes r=3, #radius of circle cir.legend=T, #whether to include legend of each circle (P value labels and lines) outward=TRUE, #dots go out or in cex=0.3, #dot size cir.legend.col="black", cir.chr.h=1, #width of chromosome boundary chr.den.col="grey85", #color of chromosome boundary chr.labels=paste("Chr", 1:22, sep=""), #labels for chromosomes threshold = c(5e-08, 5e-300), threshold.col = c("red4", "green"), threshold.lty = 2, #threshold line type. amplify=F, #make significant points (re threshold) bigger file="tiff", memo="", dpi=600, #set higher when ready to make a nice version col=matrix(c("purple3","mediumpurple3",
"gold2","gold",
"tan3","tan2",
"#1EC761", "#23E872",
"turquoise3","turquoise2"), nrow=5, byrow=T), file.output=TRUE, verbose=TRUE, width=10, height=10 )

dat2.11.62b.csv

EDIT: removed some comments in the code that were confusing.

michaelofrancis commented 1 year ago

I see that when the input P-values are lower than the second number in the "threshold" parameter these grey lines appear. I've found a workaround was just to change that threshold value and not use the second line.

YinLiLin commented 1 year ago

Thank you for the feedback, i have recorded this issue, and will check it in the coming days. Once finished, i will leave you a message here.

YinLiLin commented 1 year ago

Hi @michaelofrancis ,

The grey lines can be turned off by adding an parameter "signal.line=NULL". Please try this to see if it can eliminate the unexpected "holes". If not, could you please send me the full data that you used to generate the first screenshot above? it can assist me in locating the problem.

Best, Lilin

michaelofrancis commented 1 year ago

Hi @YinLiLin . This did not fix the holes. I will email you the data, thanks!

YinLiLin commented 1 year ago

Hi @michaelofrancis ,

The bug has been located, and the latest version on GitHub has been updated for this issue, please source the online script to have a try, remember not to library(CMplot) again, the version of CMplot on CRAN will be submitted in the coming days. Thank you for your feedback.

Best, Lilin