norm_sc: Normalization

Description Usage Arguments Details Examples

View source: R/norm_sc.R

Description

This function will perform normalization of your data

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
norm_sc(
  input,
  genelist = NULL,
  gene_selection = "gini",
  num_gini = 200,
  gene_frac = 0.25,
  gene_var = 0.8,
  norm_by = "Cluster",
  pool_sizes = c(20, 30, 40, 50),
  positive = TRUE
)

Arguments

input

the input ex_sc

genelist

the subset of genes to use for calculating size factors. Defaults to null. Provide to overrule internal gene selection.

gene_frac

the fraction of cells expressing a given gene to be included in normalization

gene_var

the percentile of least variable genes to keep (ie 0.75 removes the 25 percent most variable genes)

norm_by

the pdata variable on which to perform internal normalization before normalizing across this variable.

positive

enforces positive size factors

sf_keep

size factors can be greatly skewed in some cells. This will filter (based on z score thresholding of the size factors) cells whose size factor is an outlier.

pool_size

A vector of sizes for each pool for the normalization method

Details

If the method is ICA, independent component analysis will be performed, and then tSNE will do the final dimension reduction. If PCA is selected, PCA will be performed before on the expression matrix transpose before tSNE. This PCA will use the cells positions on the principal components. If iPCA is selected, PCA will be be performed but without transposing the data. This will create "meta cells" instead of meta genes created in the typical PCA. Then tSNE will be performed on each cells contribution (loading) to the meta cell. We find that iPCA is much more robust and leads to cleaner clusters than traditional PCA.

Examples

1
ex_sc_example <- dim_reduce(input = ex_sc_example, genelist = gene_subset, pre_reduce = "iPCA", nComp = 15, tSNE_perp = 30, iterations = 500, print_progress=TRUE)

kgellatl/SignallingSingleCell documentation built on Dec. 29, 2021, 4:12 p.m.