man/moduleVisual.Rd
ef1d8e0d
 % Generated by roxygen2: do not edit by hand
8cb05a84
 % Please edit documentation in R/moduleVisual.R
 \name{moduleVisual}
 \alias{moduleVisual}
 \title{Modules visualization and network topology}
ef1d8e0d
 \usage{
8cb05a84
 moduleVisual(TOM, value.matrix, moduleColors, mymodule, cutoff = 0.02,
ef1d8e0d
   prefix = NULL, sve = FALSE)
 }
 \arguments{
 \item{TOM}{the topological overlap matrix in WGCNA generated from
8cb05a84
 the epiNetwork() function}
ef1d8e0d
 
8cb05a84
 \item{value.matrix}{A data frame generated from the epiNetwork() function.
ef1d8e0d
 the row name is patients in one subtype. the column name is the DEH loci
 the value in the matrix is epigenetic heterogeneity on one DEH loci
 for one patient}
 
8cb05a84
 \item{moduleColors}{the module assignment generated from the epiNetwork()
ef1d8e0d
 function}
 
 \item{mymodule}{a character vector containing the module colors
 you want to visulaize}
 
8cb05a84
 \item{cutoff}{adjacency threshold for including edges in the output (default:0.02)}
ef1d8e0d
 
8cb05a84
 \item{prefix}{a character for output filename}
ef1d8e0d
 
 \item{sve}{A boolean to save the plot (default: FALSE)}
 }
 \value{
 a list containing all module edge and node information for mymodule
 }
 \description{
8cb05a84
 Visualize the modules identified by epiNetwork() function, and calculate
 network topology
ef1d8e0d
 }
 \examples{
 correlation.m<-matrix(0,12,12)
6ac77a0c
 correlation.m[1,c(2:10)]<-c(0.006,0.054,0.079,0.078, 0.011,0.033,0.014,
ef1d8e0d
 0.023,0.034)
6ac77a0c
 correlation.m[2,c(3:10)]<-c(0.026,0.014,0.045,0.037, 0.026,0.011,0.034,
ef1d8e0d
 0.012)
6ac77a0c
 correlation.m[3,c(4:10)]<-c(0.016,0.024,0.039,0.045, 0.009,0.003,0.028)
 correlation.m[4,c(5:10)]<-c(0.039,0.002,0.053,0.066, 0.012,0.039)
 correlation.m[5,c(6:10)]<-c(0.019,0.016,0.047,0.046, 0.013)
 correlation.m[6,c(7:10)]<-c(0.017,0.057,0.029,0.056)
 correlation.m[7,c(8:10)]<-c(0.071,0.018,0.001)
 correlation.m[8,c(9:10)]<-c(0.046,0.014)
 correlation.m[9,10]<-0.054
 correlation.m[lower.tri(correlation.m)] <-
ef1d8e0d
 t(correlation.m)[lower.tri(correlation.m)]
 
 matrix.v<-matrix(0.5,5,12)
8cb05a84
 matrix.v<-as.data.frame(matrix.v)
6ac77a0c
 colnames(matrix.v)<-c("NM_052960","NR_138250","NM_015074","NM_183416",
ef1d8e0d
 "NM_017891","NM_001330306","NM_014917","NM_001312688","NM_001330665",
 "NM_017766","NM_001079843","NM_001040709")
 modulecolor<-c(rep(c("yellow","cyan"),c(10,2)))
6ac77a0c
 module.topology<-epihet::moduleVisual(correlation.m,
ef1d8e0d
                                      value.matrix=matrix.v,
                                      moduleColors=modulecolor,
                                      mymodule="yellow",cutoff=0.02,
                                      prefix='CEBPA_sil_epipoly',sve = TRUE)
 }