Description Usage Arguments Details Value Author(s) Examples
This function provide a useful function to visualize gene expression matrix. ratio adjusted gene-wise normalization will be utilized. Cluster assignment and non-zero weight genes must be provided.
1 2 | getWsHeatmap(astudy, aCs, ws = NULL, Rowv = NA, geneOrder = NULL,
maxIndex = 3, ...)
|
astudy |
p by n matrix. p represents number of features and n represents number of samples |
aCs |
cluster assignment labels. Total length should be n. |
ws |
Logical vector indicating whether some genes should show up in the heatmap. Length of ws should be p |
Rowv |
If TRUE, genes will be clustered using hierarchical clustering algorithm. If NA, gene will use the order from argument geneOrder. |
geneOrder |
If Rowv is NA, then the genes will be order by argument of geneOrder. Length of geneOrder should be the number of non-zero weight. |
... |
Other parameters inherited from function heatmap function. |
nothing at this moment
Return heatmap object. Refer to ?heatmap
Zhiguang Huo
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | ######################################
## generate data
set.seed(15213)
G = 1000
n11 = 100
n12 = 100
n13 = 150
label1 = c(rep(1,n11),rep(2,n12),rep(3,n13))
P0 = 0.6
P1 = 0.1
P2 = 0.1
P3 = 0.1
P4 = 0.1
sd = 0.5
G0 = G*P0 # nonDE genes
G1 = G*P1 # DE H-L
G2 = G*P2 # DE L-H
G3 = G*P3
G4 = G*P4
mu111 = runif(G1,-0.25,0.25)
mu112 = runif(G1,0.5,1)
mu113 = runif(G1,-1,-0.5)
mu121 = runif(G2,-1,-0.5)
mu122 = runif(G2,-0.25,0.25)
mu123 = runif(G2,0.5,1)
mu131 = runif(G3,-1,-0.5)
mu132 = runif(G3,-0.25,0.25)
mu133 = runif(G3,0.5,1)
mu14 = runif(G4,-0.25,0.25)
mu10 = runif(G0,-0.25,0.25)
Data111 = matrix(rnorm(n11*G1,mu111,sd^2),nrow=G1)
Data112 = matrix(rnorm(n12*G1,mu112,sd^2),nrow=G1)
Data113 = matrix(rnorm(n13*G1,mu113,sd^2),nrow=G1)
Data11 = cbind(Data111,Data112,Data113)
Data121 = matrix(rnorm(n11*G2,mu121,sd^2),nrow=G2)
Data122 = matrix(rnorm(n12*G2,mu122,sd^2),nrow=G2)
Data123 = matrix(rnorm(n13*G2,mu123,sd^2),nrow=G2)
Data12 = cbind(Data121,Data122,Data123)
Data131 = matrix(rnorm(n11*G3,mu131,sd^2),nrow=G3)
Data132 = matrix(rnorm(n12*G3,mu132,sd^2),nrow=G3)
Data133 = matrix(rnorm(n13*G3,mu133,sd^2),nrow=G3)
Data13 = cbind(Data131,Data132,Data133)
Data14 = matrix(rnorm((n11+n12+n13)*G4,mu14,sd^2),nrow=G4)
Data10 = matrix(rnorm((n11+n12+n13)*G0,mu10,sd^2),nrow=G0)
S1 = rbind(Data10,Data11,Data12,Data13,Data14)
getWsHeatmap(S1,label1,main='two study before
metaSparseKMeans, S1')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.