filter_correlated_cell_scExp: Filter lowly correlated cells

Description Usage Arguments Details Value Examples

View source: R/correlation_filtering_clustering.R

Description

Remove cells that have a correlation score lower than what would be expected by chance with other cells.

Usage

1
2
3
4
5
6
7
8
filter_correlated_cell_scExp(
  scExp,
  random_iter = 50,
  corr_threshold = 99,
  percent_correlation = 1,
  run_tsne = FALSE,
  verbose = FALSE
)

Arguments

scExp

A SingleCellExperiment object containing 'Cor', a correlation matrix, in reducedDims.

random_iter

Number of random matrices to create to calculate random correlation scores. (50)

corr_threshold

Quantile of random correlation score above which a cell is considered to be 'correlated' with another cell. (99)

percent_correlation

Percentage of the cells that any cell must be 'correlated' to in order to not be filtered. (1)

run_tsne

Re-run tsne ? (FALSE)

verbose

(TRUE)

Details

This functions takes as input a SingleCellExperiment object that must have correlation matrix calculated and outputs a SingleCellExperiment object without lowly correlated cells. TSNE is recalculated.

Value

Returns a SingleCellExperiment object without lowly correlated cells. The calculated correlation score limit threshold is saved in metadata.

Examples

1
2
3
4
5
data("scExp")
dim(scExp)
scExp_cf = filter_correlated_cell_scExp(scExp,
corr_threshold = 99, percent_correlation = 1)
dim(scExp_cf)

ChromSCape documentation built on Nov. 8, 2020, 6:57 p.m.