Learn R Programming

liayson (version 1.0.5)

assignCellsToClusters: Assigns cells to previously defined clones.

Description

Cells that have not been used to define clones (such as cycling or apoptotic cells) can retrospectively be assigned a clone membership.

Usage

assignCellsToClusters(outc, xps, similarity=T)

Value

List with same components as input:

cnps

Segment-by-cell matrix of copy number states, with new cells added as columns.

sps

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

Arguments

outc

List containing segment-by-cell matrix and clone membership of each cell. See clusterCells).

xps

Segment-by-cell matrix of expression- or copy number states. Columns represent new cells to be assigned to existing clones.

similarity

Whether to use similarity (similarity=T) or distance (similarity=F), when comparing cells to existing clones. Default similarity metric is "correlation. Default distance metric is "Euclidean".

Author

Noemi Andor

Details

Let S := { \(S_1, S_2, ... S_n\) } be the set of \(n\) genomic segments obtained from bulk DNA-sequencing. Further, let \(S_I \in S\) be the subset of segments for which cells within a clone have a well defined copy number state. Pearson Correlation Coefficients are calculated as similarity metric between each new cell and the consensus profile of each clone, based on segments \(s \in S_I\). Each cell is assigned to the clone to which it is most similar.
Alternatively, if similarity is set to false, the Euclidean distance metric is used instead of the Pearson Correlation.

Examples

Run this code
  data(cnps)
  data(eps)
  set.seed(3)
  rcells1 = sample(colnames(cnps), 120)
  rcells2 = setdiff(colnames(eps), rcells1)
  outc = clusterCells(cnps[apply(cnps, 1, var)>0, rcells1])
  outc = assignCellsToClusters(outc, eps[,rcells2])

Run the code above in your browser using DataLab