median.dr: Calculate a DR with median values

View source: R/median.dr.R

median.drR Documentation

Calculate a DR with median values

Description

This function performs a dimensional reduction over median expressino values for each file within the fcs.SCE object and, if user specifies, calculated K-means clustering.

Usage

## S3 method for class 'dr'
median(
  fcs.SCE,
  assay.i = "normalized",
  markers.to.use = "all",
  dr.method = "PCA",
  num.k = NULL,
  perplexity.tsne = 15,
  n.neighbors.umap = 50,
  color.by = "filename",
  shape.by = NULL,
  label.by = NULL,
  size = 3,
  return.DR = F
)

Arguments

fcs.SCE

A fcs.SCE object generated through FlowCT::fcs.SCE().

assay.i

Name of matrix stored in the fcs.SCE object from which calculate correlation. Default = "normalized".

markers.to.use

Vector with markers to use. By default ("all"), all markers will be used.

dr.method

Possible values are "PCA" (default), "tSNE", "UMAP", "DENSMAP" or "DENSNE". Take into account the number of samples for this DR, for few samples t-SNE and UMAP are useless. If 'pca.loadings', the plotting result will show the weight of each marker for each PC (the first two components).

num.k

Number of clusters if dr.method = kmeans. If NULL (default), a classical plot is drawn, but if a number is indicated, K-means clustering is performed and displayed as ellipse-rounded groups.

perplexity.tsne

Value for perplexity parameter in tSNE calculation (more information). For little number of samples this DR (t-SNE) cannot be calculated because preplexity restrictions. Default = 15.

n.neighbors.umap

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

color.by

Variable name (from colData(fcs.SCE)) for dots coloring. Default = "filename".

shape.by

Variable name (from colData(fcs.SCE)) for dots shaping. Default = "NULL".

label.by

Variable name (from colData(fcs.SCE)) for labelling. Default = NULL.

size

Point size. Default = 3.

return.DR

Final data combining metadata, K-means and DR info should be returned?. Default = FALSE.

Examples

## Not run: 
median.dr(fcs, color.by = "condition")

## End(Not run)

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