Open anikng opened 3 years ago
It seems that the format of all the data you prepared looks fine, would you mind sending me your data? i am pleasure to debug the problem and feed back to you soon.
Thanks. Yes, I sent an email.
Hi, I have located the problem that caused the error you proposed. As CMplot will force the p-value to be in range of 0-1, any digits out of this range will be replaced by NA, if p-value of the highlighted SNP is in this case, it cannot be displayed, because it has no y position, please check your data, and find out why the p-values of some SNPs are bigger than 1.
Ok got it, thanks for the solution for this issue.!!
Can you please help me understanding the error thrown by CMplot?
*Error in if ((y[i] + 1.5 strheight(words[i], cex = text.cex)) > max(ylim)) { : missing value where TRUE/FALSE needed**
My code,
`length_ds<-read_csv("Length_control.csv") Highlight_SNPs<-read.csv("Highligting_SNPs.csv", header = T)
CMplot(length_ds, plot.type="m",LOG10=TRUE,col=c("grey30","grey60"),highlight=Highlight_SNPs$SNP, highlight.col=c("red","blue","green"),highlight.cex=1,highlight.pch=c(15:17), highlight.text=Highlight_SNPs$Gene,
highlight.text.col=c("red","blue","green"),threshold=0.5/nrow(length_ds),threshold.lty=2,
amplify=FALSE,file="jpg",memo="",dpi=300,file.output=TRUE,verbose=TRUE,width=14,height=6) `
Highliting_SNPs.csv looks like,
Please note that Manhattan plot without gene highlighting works with my input dataset (4 columns :marker, chrome,pos, and trait). So I guess it has something to do with highlighting file or format.