dimred_tsne: Dimensionality reduction through t-SNE

Description Usage Arguments Value Examples

View source: R/dimred_tsne.R

Description

Dimensionality reduction through t-SNE

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
dimred_tsne(
  MAE,
  tax_level,
  color,
  shape = NULL,
  k = c("2D", "3D"),
  initial_dims = 30,
  perplexity = 10,
  datatype = c("logcpm", "relabu", "counts"),
  tsne_cache = NULL
)

Arguments

MAE

A multi-assay experiment object

tax_level

The taxon level used for organisms

color

A condition to color data points by e.g. "AGE"

shape

A condition to shape data points by e.g. "SEX"

k

Plot dimensions e.g. c("2D","3D")

initial_dims

The number of dimensions to use in reduction method

perplexity

Optimal number of neighbors

datatype

Datatype to use e.g. c("logcpm", "relabu", "counts")

tsne_cache

Pass the cached data back into the function

Value

A list with a plotly object and cached data

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data_dir = system.file("extdata/MAE.rds", package = "animalcules")
toy_data <- readRDS(data_dir)
results <- dimred_tsne(toy_data,
                       tax_level="phylum",
                       color="AGE",
                       shape="GROUP",
                       k="3D",
                       initial_dims=30,
                       perplexity=10,
                       datatype="logcpm")
results$plot

hiplot/animalcules documentation built on March 1, 2021, 12:04 a.m.