YinLiLin / CMplot

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

Multitracks plots #59

Open nazleez opened 2 years ago

nazleez commented 2 years ago

Hi I'm trying to combine multiple phenotypes into single plot (up to 11). Currently i am trying with just 3 but the code requires an very large amount of memory and crashes my computer (Error: vector memory exhausted (limit reached?)) Any suggestions?

below is the file header for merge_q as well as the code I am trying to use (all 3 have failed so far for the same reason):

data header:

head(merge_q) ID CHROM POS pq1 pq2 pq3 1 rs79373928 1 801536 0.679862 0.120448 0.2576830 2 rs79373928 1 801536 0.679862 0.120448 0.3315980 3 rs79373928 1 801536 0.679862 0.120448 0.4374040 4 rs79373928 1 801536 0.679862 0.120448 0.7548830 5 rs79373928 1 801536 0.679862 0.120448 0.5036260 6 rs79373928 1 801536 0.679862 0.120448 0.0044245

plot 1: CMplot(merge_q,type="p",plot.type="m",multracks=TRUE, LOG10=TRUE,threshold=1e-5,signal.col=c("blue","yellow", "red"),file="jpg",memo="",dpi=300, file.output=TRUE,verbose=TRUE,width=14,height=6,chr.labels.angle=45)

plot 2: SNPs <- list( merge_q$ID[merge_q$pq1<1e-6], merge_q$ID[merge_q$pq2<1e-6], merge_q$ID[merge_q$pq3<1e-6] )

CMplot(merge_q, plot.type="m",multracks=TRUE,threshold=c(1e-6,1e-4),threshold.lty=c(1,2), threshold.lwd=c(1,1), threshold.col=c("black","grey"), amplify=TRUE,bin.size=1e6, chr.den.col=c("darkgreen", "yellow", "red"), signal.col=NULL, highlight.col=NULL, signal.cex=1, file="jpg",memo="",dpi=300,file.output=TRUE,verbose=TRUE, highlight=SNPs, highlight.text=SNPs, highlight.text.cex=1.4)

plot 3: CMplot(merge_q, plot.type="m", col=c("grey30","grey60"), LOG10=TRUE, ylim=c(2,12), threshold=c(1e-6,1e-4), threshold.lty=c(1,2), threshold.lwd=c(1,1), threshold.col=c("black","grey"), amplify=TRUE, chr.den.col=NULL, signal.col=c("red","green"), signal.cex=c(1.5,1.5),signal.pch=c(19,19), file="jpg",memo="",dpi=300,file.output=TRUE,verbose=TRUE,width=14,height=6)

YinLiLin commented 2 years ago

May i know how many SNPs in your data?