clusterCells: Grouping cells into clones.

View source: R/clusterCells.R

clusterCellsR Documentation

Grouping cells into clones.

Description

Clusters cells according to their copy number profile.

Usage

clusterCells(cnps, k=NA, h=NA, weights=NULL, minSegLength=1E6, 
                       chrOrder=NULL,  HFUN="ward.D2", crit="AIC",...)

Arguments

cnps

Segment-by-cell matrix of copy number states (output of segmentExpression2CopyNumber).

k

Desired number of clusters (see also cutree).

h

Threshold used to define clones from hierarchical clustering result. A subtree is defined as a clone if the maximum distance between its cell members is less than 100*h% of the genome.

weights

Vector of weights assigning differential importance to segments (typically calculated based on segment lengths).

minSegLength

Minimum number of base pairs below which a segment is to be excluded when defining clones.

chrOrder

Specifies order in which chromosomes should be plotted.

HFUN

Agglomeration method used to compute the hierarchical clustering (see also hclust).

crit

Criterion used to opimize number of clusters.

...

additional arguments passed on to heatmap.2

Details

Let CNF be the matrix of copy number states per non-private segment per cell, with entries (i, j) pointing to the copy number state of cell j at locus i. Pairwise distances between cells are calculated in Hamming space of their segmental copy number profiles (rows in CNF), weighted by segment length. Hierarchical clustering is used to build a tree of the cells from the distance matrix. A subtree is defined as a clone if the maximum distance between its cell members is less than a user-defined fraction of the genome (h).
Alternatively, if k is set, the tree is cut to obtain k clones.
If neither h nor k are set, Akaike information criterion is used to decide on anywhere between 1 and 30 clones.

Value

List with three fields:

cnps

Segment-by-cell matrix of copy number states.

sps

The clone membership of each cell (that is, columns in cnps).

tree

An object of class hclust.

Author(s)

Noemi Andor

References

Andor, N.*, Lau, B.*, Catalanotti, C., Kumar, V., Sathe, A., Belhocine, K., Wheeler, T., et al. (2018) Joint single cell DNA-Seq and RNA-Seq of gastric cancer reveals subclonal signatures of genomic instability and gene expression. doi: https://doi.org/10.1101/445932

Examples

data(cnps)
set.seed(3)
rcells = sample(colnames(cnps), 120)
outc = clusterCells(cnps[apply(cnps, 1, var)>0, rcells])

liayson documentation built on Sept. 30, 2022, 1:07 a.m.