preprocessing_filtering_and_reduction: Preprocess and filter matrix annotation data project folder...

View source: R/generate_analysis.R

preprocessing_filtering_and_reductionR Documentation

Preprocess and filter matrix annotation data project folder to SCE

Description

Preprocess and filter matrix annotation data project folder to SCE

Usage

preprocessing_filtering_and_reduction(
  datamatrix,
  annot_raw,
  min_reads_per_cell = 1600,
  max_quantile_read_per_cell = 95,
  n_top_features = 40000,
  norm_type = "CPM",
  n_dims = 10,
  remove_PC = NULL,
  subsample_n = NULL,
  ref_genome = "hg38",
  exclude_regions = NULL,
  doBatchCorr = FALSE,
  batch_sels = NULL
)

Arguments

datamatrix

A sparse count matrix of features x cells.

annot_raw

A data.frame with barcode, cell_id, sample_id, batch_id, total_counts

min_reads_per_cell

Minimum read per cell to keep the cell

max_quantile_read_per_cell

Upper count quantile threshold above which cells are removed

n_top_features

Number of features to keep

norm_type

Normalization type c("CPM", "TFIDF", "RPKM", "TPM", "feature_size_only")

n_dims

An integer specifying the number of dimensions to keep for PCA

remove_PC

A vector of string indicating which principal components to remove before downstream analysis as probably correlated to library size. Should be under the form : 'Component_1', 'Component_2', ... Recommended when using 'TFIDF' normalization method. (NULL)

subsample_n

Number of cells to subsample.

ref_genome

Reference genome ("hg38" or "mm10").

exclude_regions

GenomicRanges with regions to remove from the object.

doBatchCorr

Run batch correction ? TRUE or FALSE

batch_sels

If doBatchCorr is TRUE, List of characters. Names are batch names, characters are sample names.

Value

A SingleCellExperiment object containing feature spaces.

Examples

raw <- create_scDataset_raw()
scExp = preprocessing_filtering_and_reduction(raw$mat, raw$annot)

vallotlab/ChromSCape documentation built on Oct. 15, 2023, 1:47 p.m.