Skip to contents

This function generates a matrix of metacells where each metacell corresponds to a CNV cluster. The CNV matrix is calculated by chromosome arm. If specified, certain clusters will be labeled as "Benign" rather than "Clone".

Usage

generateCNVClonesMatrix(
  seuratObj,
  healthyClusters = NULL,
  values = "scores",
  cnv_thresh = 0.15
)

Arguments

seuratObj

A Seurat object containing CNV data and metadata.

healthyClusters

A numeric vector or NULL. If provided, clusters specified in this vector will be labeled as "Benign" instead of "Clone". Default is NULL.

values

one of 'scores' or 'calls'. 'scores' returns the mean CNV score per cluster, while 'calls' uses cnv_thresh to establish a cut-off for gains and losses, returning a matrix of CNV calls (0=none, 1=gain, -1=loss).

cnv_thresh

A numeric threshold to filter significant CNV events. Default is 0.15.

Value

A matrix of CNVs with row names corresponding to the clone or benign labels and columns representing the chromosome arms, with values corresponding to CNV scores or CNV calls.