findOutliers: findOutliers()

View source: R/findOutliers.R

findOutliersR Documentation

findOutliers()

Description

Uses a nearest neighbor approach to find noise copy number profiles within the segment means.

Usage

findOutliers(
  scCNA,
  assay = "segment_ratios",
  k = 5,
  resolution = 0.9,
  BPPARAM = BiocParallel::bpparam()
)

Arguments

scCNA

CopyKit object.

assay

String with the name of the assay to pull data.

k

A numeric scalar with the number k-nearest-neighbor cells to calculate the mean correlation

resolution

A numeric scalar that set's how strict the correlation cut off will be.

BPPARAM

A BiocParallelParam specifying how the function should be parallelized.

Details

findOutliers To detect low-quality cells, CopyKit calculates the Pearson correlation matrix of all samples from the segment ratio means. Next, we calculate a sample-wise mean of the correlation between a sample and its k-nearest-neighbors. Samples in which the correlation value is lower than the defined threshold are classified as low-quality cells.

Value

Adds a column 'outlier' to colData. Cells that pass the filtering criteria receive the label "kept", whereas cells that do not pass the filtering criteria receive the label "removed".

Author(s)

Hua-Jun Wu

Darlan Conterno Minussi

Junke Wang

Examples

set.seed(1000)
copykit_obj <- copykit_example()[,sample(500)]
copykit_obj <- findAneuploidCells(copykit_obj)
copykit_obj <- copykit_obj[, colData(copykit_obj)$is_aneuploid == TRUE]
copykit_obj <- findOutliers(copykit_obj)

navinlabcode/copykit documentation built on Oct. 16, 2024, 2:55 p.m.