YinLiLin / CMplot

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

Multi-traits of Manhattan cannot change the chromosomal color and add some SNPS to the tag #122

Closed chenyx666 closed 3 months ago

chenyx666 commented 3 months ago

Hello, This is a very great package. I want to draw a Manhattan plot like this paper, Fig .3. https://www.science.org/doi/full/10.1126/sciadv.aaz7835?rfr_dat=cr_pub++0pubmed&url_ver=Z39.88-2003&rfr_id=ori%3Arid%3Acrossref.org

What I want to achieve is to have multiple traits displayed in a single graph, non-significant SNPs shown in black and gray according to chromosome, SNPs above the threshold shown in different colors according to different traits, and to add text labels to these highlighted points. My code is as follows. How should I change it? My 'highlight' parameter will not report errors but will not be displayed in the figure, and the color of the traits is only black and gray set according to the 'col' parameter. It seems that col parameter can not only change the color of chromosomes in multi-trait data. I don't know what the problem is. I am looking forward to your reply. Thank you. packageVersion("CMplot") [1] ‘4.5.1’ CMplot(data,multraits=T,col=c("black","grey"),plot.type="m",LOG10=TRUE,amplify=FALSE,file="pdf",threshold=p-value,dpi=300,file.output=TRUE,verbose=TRUE,width=14,height=6,cex=0.8,chr.labels.angle=0, highlight = list('geneA','geneB','geneC','geneD','geneE'),highlight.col = list("#CC88B0", "#998DB7","#ABD0F1","#87B5B2","#43978F"),highlight.cex = 1,highlight.text=list('geneA','geneB','geneC','geneD','geneE')