View source: R/utility_functions.R
optimalDS | R Documentation |
WGCNA::cutreeDynamic is run for varying levels of deepSplit parameter (0:4), and cluster membership is assigned for each parameter set. Default cut method is 'hybrid'.
optimalDS(
tree,
d.mat,
genes = NULL,
cut.height = 0.998,
pam.respects.dendro = FALSE,
...
)
tree |
h.clust object generated by dist2hclust. |
d.mat |
distance matrix used to generate tree. |
genes |
vector of gene names corresponding rows/col of distance matrix (d.mat). If specified, additional "genes" column is provided in output. |
cut.height |
Maximum joining heights that will be considered. Default is 0.998. |
pam.respects.dendro |
Logical, only used for method "hybrid". If TRUE, the PAM stage will respect the dendrogram in the sense that objects and small clusters will only be assigned to clusters that belong to the same branch that the objects or small clusters being assigned belong to. Default is FALSE. |
... |
additional arguments passed to dynamicTreeCut::cutreeDynamic() |
mColorh, matrix specfying module membership at varying deep split parameter specifications (0:4)
cutreeDynamic
geneTree <- dist2hclust(d.mat)
# determine number of modules based on refrence dataset
print2hide <- capture.output(mColorh <- optimalDS(tree = geneTree, d.mat = d.mat, genes = rownames(a.mat)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.