RSEC: Resampling-based Sequential Ensemble Clustering

Description Usage Arguments Value

Description

Implementation of the RSEC algorithm (Resampling-based Sequential Ensemble Clustering) for single cell sequencing data. This is a wrapper function around the existing ClusterExperiment workflow that results in the output of RSEC.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## S4 method for signature 'SummarizedExperiment'
RSEC(x, ...)

## S4 method for signature 'data.frame'
RSEC(x, ...)

## S4 method for signature 'ClusterExperiment'
RSEC(x, eraseOld = FALSE,
  rerunClusterMany = FALSE, ...)

## S4 method for signature 'matrixOrHDF5'
RSEC(x, ...)

## S4 method for signature 'SingleCellExperiment'
RSEC(x, isCount = FALSE, transFun = NULL,
  reduceMethod = "PCA", nFilterDims = defaultNDims(x, reduceMethod, type =
  "filterStats"), nReducedDims = defaultNDims(x, reduceMethod, type =
  "reducedDims"), k0s = 4:15, clusterFunction = "hierarchical01",
  alphas = c(0.1, 0.2, 0.3), betas = 0.9, minSizes = 1,
  combineProportion = 0.7, combineMinSize, dendroReduce, dendroNDims,
  mergeMethod = "adjP", mergeCutoff, mergeLogFCcutoff, verbose = FALSE,
  mainClusterArgs = NULL, subsampleArgs = NULL, seqArgs = NULL,
  ncores = 1, random.seed = NULL, run = TRUE)

Arguments

x

the data matrix on which to run the clustering. Can be object of the following classes: matrix (with genes in rows), SummarizedExperiment, SingleCellExperiment or ClusterExperiment.

...

For signature list, arguments to be passed on to mclapply (if ncores>1). For all the other signatures, arguments to be passed to the method for signature list.

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.

rerunClusterMany

logical. If the object is a ClusterExperiment object, determines whether to rerun the clusterMany step. Useful if want to try different parameters for combining clusters after the clusterMany step, without the computational costs of the clusterMany step.

isCount

if transFun=NULL, then isCount=TRUE will determine the transformation as defined by function(x){log2(x+1)}, and isCount=FALSE will give a transformation function function(x){x}. Ignored if transFun=NULL. If object is of class ClusterExperiment, the stored transformation will be used and giving this parameter will result in an error.

transFun

a transformation function to be applied to the data. If the transformation applied to the data creates an error or NA values, then the function will throw an error. If object is of class ClusterExperiment, the stored transformation will be used and giving this parameter will result in an error.

reduceMethod

character A character identifying what type of dimensionality reduction to perform before clustering. Options are 1) "none", 2) one of listBuiltInReducedDims() or listBuiltInFitlerStats OR 3) stored filtering or reducedDim values in the object.

nFilterDims

vector of the number of the most variable features to keep (when "var", "abscv", or "mad" is identified in reduceMethod).

nReducedDims

vector of the number of dimensions to use (when reduceMethod gives a dimensionality reduction method).

k0s

the k0 parameter for sequential clustering (see seqCluster)

clusterFunction

function used for the clustering. Note that unlike in clusterSingle, this must be a character vector of pre-defined clustering techniques, and can not be a user-defined function. Current functions can be found by typing listBuiltInFunctions() into the command-line.

alphas

values of alpha to be tried. Only used for clusterFunctions of type '01'. Determines tightness required in creating clusters from the dissimilarity matrix. Takes on values in [0,1]. See documentation of ClusterFunction.

betas

values of beta to be tried in sequential steps. Only used for sequential=TRUE. Determines the similarity between two clusters required in order to deem the cluster stable. Takes on values in [0,1]. See documentation of seqCluster.

minSizes

the minimimum size required for a cluster (in the mainClustering step). Clusters smaller than this are not kept and samples are left unassigned.

combineProportion

passed to proportion in combineMany

combineMinSize

passed to minSize in combineMany

dendroReduce

passed to reduceMethod in makeDendrogram

dendroNDims

passed to nDims in makeDendrogram

mergeMethod

passed to mergeMethod in mergeClusters

mergeCutoff

passed to cutoff in mergeClusters

mergeLogFCcutoff

passed to logFCcutoff in mergeClusters

verbose

logical. If TRUE it will print informative messages.

mainClusterArgs

list of arguments to be passed for the mainClustering step, see help pages of mainClustering.

subsampleArgs

list of arguments to be passed to the subsampling step (if subsample=TRUE), see help pages of subsampleClustering.

seqArgs

list of arguments to be passed to seqCluster.

ncores

the number of threads

random.seed

a value to set seed before each run of clusterSingle (so that all of the runs are run on the same subsample of the data). Note, if 'random.seed' is set, argument 'ncores' should NOT be passed via subsampleArgs; instead set the argument 'ncores' of clusterMany directly (which is preferred for improving speed anyway).

run

logical. If FALSE, doesn't run clustering, but just returns matrix of parameters that will be run, for the purpose of inspection by user (with rownames equal to the names of the resulting column names of clMat object that would be returned if run=TRUE). Even if run=FALSE, however, the function will create the dimensionality reductions of the data indicated by the user input.

Value

A ClusterExperiment object is returned containing all of the clusterings from the steps of RSEC


clusterExperiment documentation built on May 18, 2018, 6 p.m.