dim_reduce: Dimension Reduction

Description Usage Arguments Details Examples

View source: R/dim_reduce.R

Description

This function will do dimensionality reduction.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
dim_reduce(
  input,
  genelist,
  method,
  assay = NULL,
  nComp = 15,
  nVar = 0.85,
  log = F,
  scale = T,
  reducedDim_key = NULL,
  seed = 100
)

Arguments

input

the input sce

genelist

the subset of genes to perform dimensionality reduction on

method

the algorithm choice for reduction before tSNE (either "ICA", "PCA", "iPCA", or FALSE if you want to reuse).

assay

The assay to operate on. Will default to get_def_assay(input)

nComp

the number of components to reduce too before tSNE, 5-20 recommended.

nVar

cutoff for percent of variance explained from PCs

log

Whether or not to log the input assay

scale

Whether or not to scale the input assay

reducedDim_key

The name of the LEM within ReducedDim slot of SCE

seed

For tSNE, the seed. Can set to NULL if desired.

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, method = "iPCA", nComp = 15, tSNE_perp = 30, iterations = 500, print_progress=TRUE)

kgellatl/SignalCell documentation built on Sept. 3, 2020, 8:45 a.m.