dimred_umap: Dimensionality reduction through PCA

View source: R/dimred_umap.R

dimred_umapR Documentation

Dimensionality reduction through PCA

Description

Dimensionality reduction through PCA

Usage

dimred_umap(
  MAE,
  tax_level,
  color,
  shape = NULL,
  cx = 1,
  cy = 2,
  cz = NULL,
  n_neighbors = 15,
  metric = c("euclidean", "manhattan"),
  n_epochs = 200,
  init = c("spectral", "random"),
  min_dist = 0.1,
  datatype = c("logcpm", "relabu", "counts")
)

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"

cx

Component on the x-axis e.g. 1

cy

Component on the y-axis e.g. 2

cz

Component on the z-axis e.g. 3

n_neighbors

Number of nearest neighbors

metric

Distance function e.g. c("euclidean", "manhattan")

n_epochs

Number of iterations

init

Initial embedding using eigenvector e.g c("spectral", "random")

min_dist

Determines how close points appear in the final layout

datatype

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

Value

A list with a plotly object and summary table

Examples

data_dir <- system.file("extdata/MAE.rds", package = "animalcules")
toy_data <- readRDS(data_dir)
result <- dimred_umap(toy_data,
  tax_level = "genus",
  color = "AGE",
  shape = "DISEASE",
  cx = 1,
  cy = 2,
  datatype = "logcpm"
)
result$plot


compbiomed/animalcules documentation built on Feb. 7, 2024, 12:13 p.m.