dim.reduction: Calculate dimensional reductions

View source: R/dim.reduction.R

dim.reductionR Documentation

Calculate dimensional reductions

Description

It calculates a dimensional reduction (DR) from a fcs.SCE object (or an expression table). Three different DR methods are available: Principal Component Analsis (PCA), t-Distributed Stochastic Neighbor Embedding (t-SNE) and Uniform Manifold Approximation and Projection (UMAP).

Usage

## S3 method for class 'reduction'
dim(
  data,
  assay.i = "normalized",
  markers.to.use = "all",
  dr.method,
  num.threads = NULL,
  perplexity.tsne = 100,
  n.neighbors.umap = 50
)

Arguments

data

A fcs.SCE object generated through FlowCT::fcs.SCE() or a expression table with events in rows and markers in columns.

assay.i

Name of matrix stored in the fcs.SCE object from which calculate the DR (this option is useless if input is not a fcs.SCE object). Default = "normalized".

markers.to.use

Markers to take account in the DR calculus. Default = "all".

dr.method

DR method to calculate. Possible values are "PCA", "tSNE", "DENSNE", "UMAP" and/or "DENSMAP". If PCA is calculated, rotation values are also stored in the 'fcs.SCE@metadata' (or separatelly if 'data' is a 'data.frame' instead a 'fcs.SCE' object).

num.threads

Number of threads for DR calculus. If NULL (default), all cores available minus one will be used. If this option is enable, reproducibility could be comprised.

perplexity.tsne

Value for perplexity parameter in tSNE calculation (more information). Default = 100.

n.neighbors.umap

Value for neighbors parameter in UMAP calculation (more information). Default = 50.

Examples

## Not run: 
fcs <- dim.reduction(fcs, dr.method = "tSNE", 
   markers.to.use = c("CD8", "CD27", "CCR4", "CD45RA", "CD4"))
fcs <- dim.reduction(fcs, dr.method = "UMAP", n.neighbors.umap = 10)
fcs <- dim.reduction(fcs, dr.method = c("pca", "Umap"))

## End(Not run)

jgarces02/FlowCT documentation built on March 28, 2023, 12:42 p.m.