dimred_umap: Dimensionality reduction through PCA

Description Usage Arguments Value Examples

View source: R/dimred_umap.R

Description

Dimensionality reduction through PCA

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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

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