Skip to content

biozzq/R-CMplot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 

Repository files navigation

CMplot v3.2.0

A high-quality drawing tool designed for genome-wide association study

Installation

CMplot is available on CRAN, so it can be installed with the following R code:

install.packages("CMplot")
library("CMplot")
#(optional)if you want to use the latest version:
#source("https://raw.githubusercontent.com/YinLiLin/R-CMplot/master/CMplot.r")

There are two example datasets attached in CMplot, users can export and view the details by following R code:

data(pig60K)   #calculated p-values by MLM
data(cattle50K)   #calculated SNP effects by rrblup
head(pig60K)
head(cattle50K)

Total 40 parameters are available in CMplot, typing ?CMplot can get the detail function of all parameters.

SNP-density plot

CMplot(pig60K,plot.type="d",bin.size=1e6,col=c("darkgreen", "yellow", "red"),file="jpg",dpi=300)

Circular-Manhattan plot

(1) Genome-wide association study(GWAS)

CMplot(pig60K,plot.type="c",chr.labels=paste("Chr",c(1:18,"X"),sep=""),threshold=c(0.05,0.01),
      cir.chr.h=1,amplify=TRUE,threshold.lty=c(2,1),threshold.col=c("blue","red"),signal.line=1,
      signal.col="red",file="jpg",dpi=300)
#Note: if signal.line=NULL, the lines that crosse circles won't be added.

(2) Genomic Selection/Prediction(GS/GP)

CMplot(cattle50K,plot.type="c",LOG10=FALSE,outward=TRUE,chr.labels=paste("Chr",c(1:29),sep=""),
r=1.2,cir.chr.h=1.3,cir.legend.cex=0.5,cir.band=1,threshold=NULL,file="jpg",dpi=300)

Rectangular-Manhattan plot

(1) Genome-wide association study(GWAS)

CMplot(pig60K[,c(1:3,6)],plot.type="m",threshold=NULL,file="jpg",dpi=300)

(2) Genomic Selection/Prediction(GS/GP)

CMplot(cattle50K,plot.type="m",LOG10=FALSE,ylab="SNP effect",threshold=NULL,file="jpg",dpi=300)

Q-Q plot

CMplot(pig60K[,c(1:3,6)],plot.type="q",conf.int=TRUE,conf.int.col="grey",file="jpg",dpi=300)

Contact

Questions, suggestions, and bug reports are welcome and appreciated.

About

R code for CMplot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 100.0%