dimred_tsne {animalcules}R Documentation

Dimensionality reduction through t-SNE

Description

Dimensionality reduction through t-SNE

Usage

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

data_dir = system.file("extdata/MAE.rds", package = "animalcules")
toy_data <- readRDS(data_dir)
p <- dimred_tsne(toy_data,
                 tax_level="phylum",
                 color="AGE",
                 shape="GROUP",
                 k="3D",
                 initial_dims=30,
                 perplexity=10,
                 datatype="logcpm")
p


[Package animalcules version 1.0.0 Index]