calcConsensus: Calculate a consensus matrix of segment means based on...

View source: R/calcConsensus.R

calcConsensusR Documentation

Calculate a consensus matrix of segment means based on colData

Description

Calculate a consensus matrix of segment means based on colData

Usage

calcConsensus(
  scCNA,
  assay = "segment_ratios",
  consensus_by = "subclones",
  fun = c("median", "mean"),
  BPPARAM = bpparam()
)

Arguments

scCNA

The CopyKit object.

assay

String with the name of the assay to pull data from to calculate the consensus matrix.

consensus_by

A string with the column from colData that will be used to isolate the cells by factor and calculate the consensus.

fun

A string indicating the summarizing function to be used.

BPPARAM

A BiocParallelParam specifying how the function should be parallelized.

Details

Consensus profiles are calculated by averaging or taking the median of the ith segment mean of all single cells assigned to the same element of colData,

Value

A consensus matrix stored in the consensus slot of the CopyKit object

Examples

copykit_obj <- copykit_example_filtered()
copykit_obj <- findClusters(copykit_obj)
copykit_obj <- calcConsensus(copykit_obj)

navinlabcode/copykit documentation built on Sept. 22, 2023, 9:16 a.m.