workflowClusters {clusterExperiment} | R Documentation |
The main workflow of the package is made of
clusterMany
, combineMany
, and
mergeClusters
. The clusterings from these functions (and not
those obtained in a different way) can be obtained with the functions
documented here.
## S4 method for signature 'ClusterExperiment' workflowClusters(x, iteration = 0) ## S4 method for signature 'ClusterExperiment' workflowClusterDetails(x) ## S4 method for signature 'ClusterExperiment' workflowClusterTable(x) ## S4 method for signature 'ClusterExperiment' setToCurrent(x, whichCluster, eraseOld = FALSE) ## S4 method for signature 'ClusterExperiment' setToFinal(x, whichCluster, clusterLabel)
x |
a |
iteration |
numeric. Which iteration of the workflow should be used. |
whichCluster |
which cluster to set to current in the workflow |
eraseOld |
logical. Only relevant if input |
clusterLabel |
optional string value to give to cluster set to be "final" |
workflowClusters
returns a matrix consisting of the
appropriate columns of the clusterMatrix
slot.
workflowClusterDetails
returns a data.frame
with some
details on the clusterings, such as the type (e.g., 'clusterMany',
'combineMany') and iteration.
workflowClusterTable
returns a table of how many of the
clusterings belong to each of the following possible values: 'final',
'mergeClusters', 'combineMany' and 'clusterMany'.
setToCurrent
returns a ClusterExperiment
object where
the indicated cluster of whichCluster
has been set to the most
current iteration in the workflow. Pre-existing clusters are appropriately
updated.
setToFinal
returns a ClusterExperiment
object where the
indicated cluster of whichCluster
has clusterType set to "final".
The primaryClusterIndex is also set to this cluster, and the clusterLabel,
if given.
data(simData) cl <- clusterMany(simData,nReducedDims=c(5,10,50), reduceMethod="PCA", clusterFunction="pam", ks=2:4, findBestK=c(FALSE), removeSil=TRUE, subsample=FALSE) clCommon <- combineMany(cl, whichClusters="workflow", proportion=0.7, minSize=10) clCommon <- makeDendrogram(clCommon) clMerged <- mergeClusters(clCommon,mergeMethod="adjP") head(workflowClusters(clMerged)) workflowClusterDetails(clMerged) workflowClusterTable(clMerged)