ClusterExperiment-methods {clusterExperiment}R Documentation

Helper methods for the ClusterExperiment class

Description

This is a collection of helper methods for the ClusterExperiment class.

Usage

## S4 method for signature 'ClusterExperiment'
show(object)

## S4 method for signature 'ClusterExperiment'
transformation(x)

## S4 replacement method for signature 'ClusterExperiment,'function''
transformation(object) <- value

## S4 method for signature 'ClusterExperiment'
nClusterings(x)

## S4 method for signature 'ClusterExperiment'
nClusters(x, ignoreUnassigned = TRUE)

## S4 method for signature 'ClusterExperiment'
nFeatures(x)

## S4 method for signature 'ClusterExperiment'
nSamples(x)

## S4 method for signature 'ClusterExperiment'
clusterMatrixNamed(x, whichClusters = "all")

## S4 method for signature 'ClusterExperiment'
clusterMatrixColors(x, whichClusters)

## S4 method for signature 'ClusterExperiment,missing'
clusterMatrix(x, whichClusters)

## S4 method for signature 'ClusterExperiment,numeric'
clusterMatrix(x, whichClusters)

## S4 method for signature 'ClusterExperiment,character'
clusterMatrix(x, whichClusters)

## S4 method for signature 'ClusterExperiment'
primaryCluster(x)

## S4 method for signature 'ClusterExperiment'
primaryClusterIndex(x)

## S4 method for signature 'ClusterExperiment'
primaryClusterLabel(x)

## S4 method for signature 'ClusterExperiment'
primaryClusterNamed(x)

## S4 method for signature 'ClusterExperiment'
primaryClusterType(x)

## S4 method for signature 'ClusterExperiment'
subsetByCluster(x, clusterValue,
  whichCluster = "primary", matchTo = c("name", "clusterIds"))

## S4 replacement method for signature 'ClusterExperiment,numeric'
primaryClusterIndex(object) <- value

## S4 method for signature 'ClusterExperiment'
dendroClusterIndex(x)

## S4 method for signature 'ClusterExperiment'
coClustering(x)

## S4 replacement method for signature 'ClusterExperiment,matrix'
coClustering(object) <- value

## S4 method for signature 'ClusterExperiment'
clusterTypes(x)

## S4 method for signature 'ClusterExperiment'
clusteringInfo(x)

## S4 method for signature 'ClusterExperiment'
clusterLabels(x)

## S4 replacement method for signature 'ClusterExperiment,character'
clusterLabels(object) <- value

## S4 method for signature 'ClusterExperiment'
clusterLegend(x)

## S4 replacement method for signature 'ClusterExperiment,list'
clusterLegend(object) <- value

## S4 method for signature 'ClusterExperiment,character'
renameClusters(object, value,
  whichCluster = "primary", matchTo = c("name", "clusterIds"))

## S4 method for signature 'ClusterExperiment,character'
recolorClusters(object, value,
  whichCluster = "primary", matchTo = c("name", "clusterIds"))

## S4 method for signature 'ClusterExperiment'
orderSamples(x)

## S4 replacement method for signature 'ClusterExperiment,numeric'
orderSamples(object) <- value

## S4 replacement method for signature 'ClusterExperiment,character'
clusterTypes(object) <- value

## S4 method for signature 'ClusterExperiment'
addToColData(object, ...)

## S4 method for signature 'ClusterExperiment'
colDataClusters(object,
  whichClusters = "primary", useNames = TRUE, makeFactor = TRUE, ...)

Arguments

x, object

a ClusterExperiment object.

value

The value to be substituted in the corresponding slot. See the slot descriptions in ClusterExperiment for details on what objects may be passed to these functions.

ignoreUnassigned

logical. If true, ignore the clusters with -1 or -2 assignments in calculating the number of clusters per clustering.

whichClusters

argument that can be either numeric or character value indicating the clusters to be used. If numeric, gives the indices of the clusterMatrix to return; this can also be used to defined an ordering for the clusterings (as relevant). whichClusters can be a character value identifying the clusterTypes to be used, or if not matching clusterTypes then clusterLabels; alternatively whichClusters can be either 'all' or 'workflow' or 'primary' to indicate choosing all clusterings or choosing all workflowClusters clusterings or choosing the 'primary' clustering, respectively. If missing, the entire matrix of all clusterings is returned.

clusterValue

values of the cluster to match to for subsetting

whichCluster

argument to identify cluster, taking input like whichClusters, only requires that only a single clustering can be identified.

matchTo

for subsetting, whether to match to the cluster name ("name") or internal cluster id ("clusterIds")

...

For addToColData, arguments passed to colDataClusters.

useNames

for tableClusters, whether the output should be tabled with names (useNames=TRUE) or ids (useNames=FALSE)

makeFactor

logical for colDataClusters. If TRUE the clustering will be added to the colData slot as a factor. If FALSE, the clustering will be added to the colData slot as a character vector if useNames=TRUE and as a numeric vector if useNames=FALSE.

Details

Note that redefining the transformation function via transformation(x)<- will check the validity of the transformation on the data assay. If the assay is large, this may be time consuming. Consider using a call to ClusterExperiment, which has the option as to whether to check the validity of the transformation.

Value

transformation prints the function used to transform the data prior to clustering.

nClusterings returns the number of clusterings (i.e., ncol of clusterMatrix).

nClusters returns the number of clusters per clustering

nFeatures returns the number of features (same as 'nrow').

nSamples returns the number of samples (same as 'ncol').

clusterMatrixNamed returns a matrix with cluster labels.

clusterMatrixColors returns the matrix with all the clusterings, using the internally stored colors for each cluster

clusterMatrix returns the matrix with all the clusterings.

clusterMatrix returns the matrix with all the clusterings.

clusterMatrix returns the matrix with all the clusterings.

primaryCluster returns the primary clustering (as numeric).

primaryClusterIndex returns/sets the primary clustering index (i.e., which column of clusterMatrix corresponds to the primary clustering).

primaryClusterIndex returns/sets the primary clustering index (i.e., which column of clusterMatrix corresponds to the primary clustering).

primaryClusterNamed returns the primary cluster (using cluster labels).

primaryClusterIndex returns/sets the primary clustering index (i.e., which column of clusterMatrix corresponds to the primary clustering).

subsetByCluster subsets the object by clusters in a clustering and returns a ClusterExperiment object with only those samples

dendroClusterIndex returns/sets the clustering index of the clusters used to create dendrogram (i.e., which column of clusterMatrix corresponds to the clustering).

coClustering returns/sets the co-clustering matrix.

clusterTypes returns/sets the clusterTypes slot.

clusteringInfo returns the clusterInfo slot.

clusterLabels returns/sets the column names of the clusterMatrix slot.

clusterLegend returns/sets the clusterLegend slot.

renameClusters changes the names assigned to clusters within a clustering

recolorClusters changes the colors assigned to clusters within a clustering

orderSamples returns/sets the orderSamples slot.

addToColData returns a ClusterExperiment object with the clusterings in clusterMatrix slot added to the colData slot

colDataClusters returns a DataFrame object that has the clusterings in clusterMatrix slot added to the DataFrame in the colData slot


[Package clusterExperiment version 2.3.0 Index]