workflowClusters: Methods for workflow clusters

Description Usage Arguments Value Examples

Description

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.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## 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)

Arguments

x

a ClusterExperiment object.

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 x is of class ClusterExperiment. If TRUE, will erase existing workflow results (clusterMany as well as mergeClusters and combineMany). If FALSE, existing workflow results will have "_i" added to the clusterTypes value, where i is one more than the largest such existing workflow clusterTypes.

clusterLabel

optional string value to give to cluster set to be "final"

Value

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.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
data(simData)

cl <- clusterMany(simData,nPCADims=c(5,10,50),  dimReduce="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)

Bioconductor-mirror/clusterExperiment documentation built on Aug. 2, 2017, 4:28 p.m.