YinLiLin / CMplot

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

Error in CMplot(): 'amplify' is FALSE. #125

Open DaWeMoYe opened 1 month ago

DaWeMoYe commented 1 month ago

I DO NOT want to amplify my signal But I got error every time, when I add amplify = FLASE While fine with amplify = TRUE Is there any other paraments should use together?

YinLiLin commented 1 month ago

It sounds quite strange, did you try to update the package to the latest version?

DaWeMoYe commented 1 month ago

Thanks for replying. My version of CMplot is 4.5.1.

1)

I think it's related with some parameters I do not know. So I have to keep it as amplify=TRU​E, which is as default. When I add only "amplify=FALSE", I got the Error.

> CMplot(my_data,type="p",plot.type="m",LOG10=TRUE,amplify=FALSE,
+ col = "grey45", ylim=c(3,45), ​
Error: unexpected input in:
"CMplot(my_data,type="p",plot.type="m",LOG10=TRUE,amplify=FALSE,
col = "grey45", ylim=c(3,45), ​"

My Work Code is like

CMplot(my_data,type="p",plot.type="m",LOG10=TRUE, 
col = "grey45", ylim=c(3,45), 
cex=0.5, lab.cex=1.2, ylab.pos=1.8,
pch=19,
signal.col="red",
signal.pch=pchs[m],
signal.cex=0.5,
threshold=1e-20, 
threshold.lty=3,threshold.lwd=c(1,1),
main=m_names[m],
file.output=F,
verbose=TRUE,width=8,height=5,
points.alpha=255,legend.ncol=3, legend.pos="left")

2)

And Another question is about circle plot. I do not know why my plot have some grey box (looks like the SNPs density) at every circle. circle_grey

My Work Code is like

CMplot(data, plot.type="c", r=3, multraits=TRUE,outward=FALSE, 
   cex = 0.2,
   col="green"
   chr.border=FALSE,
   cir.chr.h = 2, chr.den.col="grey60",
   chr.labels=paste("Chr",c(1:20),sep=""),
   cir.axis.grid=FALSE,
   cir.axis=FALSE, 
   signal.cex = 0.2, 
   signal.col="black",
   threshold=0.01/nrow(data), threshold.lty=3,threshold.lwd=c(1,1),
   file="pdf",file.name=filen,
   file.output=TRUE,verbose=TRUE,width=10,height=10,
       points.alpha=100,legend.ncol=6, legend.pos="left")

Thans~

YinLiLin commented 1 month ago

Thank you for the detailed feedback. Question 1. I have tried the similar script to run CMplot using the tutorial data, it works fine. I guess there may be some unqualified or unexpected symbols in your script. Or if it's really hard to locate the problem, you can try to reproduce the same error using tutorial data, and then send me the running script for debugging. Question 2. That is because CMplot will drew a line across circles at the position where there is a significant SNP for at least one trait, you can turn off these lines by setting the argument "signal.line=NULL".