Skip to contents

Calculate tSNE dimensionality reduction.

Usage

runtSNE(
  fcd,
  input_type,
  data_slot,
  perplexity = 30,
  seed = 91,
  prefix = NULL,
  nThreads = 1,
  nPC = ncol(fcd$pca[[data_slot]]),
  markers = colnames(fcd$expr[[data_slot]]),
  discard = FALSE
)

Arguments

fcd

flow cytometry dataset.

input_type

data to use for the calculation, e.g. "expr" or "pca" (suggested: "pca").

data_slot

data slot to use for the calculation, e.g. "orig" or "norm".

perplexity

Value that controls how many nearest neighbors are taken into account when constructing the embedding (see Rtsne documentation for details).

seed

A seed is set for reproducibility.

prefix

Optional prefix for the slot name of the output.

nThreads

Number of threads to be used in the tSNE calculation.

nPC

Number of principal components to use for the analysis.

markers

Vector of marker names to include or exclude from UMAP calculation according to the discard parameter. See functions used_markers and measured_markers for the extraction of markers directly from the condor object.

discard

Boolean to decide if the markers specified should be included, "F", or excluded, "T", from the UMAP calculation. Default = F.

Value

The function returns a fcd including a data frame with the tSNE coordinates saved in fcd$tSNE. The name of the output consists of the prefix (if given) and the data slot. If a nPC is given it will be added to the output name.

Details

runtSNE

See [Jesse H. Krijthe (2015). Rtsne: T-Distributed Stochastic Neighbor Embedding using a Barnes-Hut Implementation], (https://github.com/jkrijthe/Rtsne) for more details on the Rtsne method.