dimred_pca: Dimensionality reduction through PCA

Description Usage Arguments Value Examples

View source: R/dimred_pca.R

Description

Dimensionality reduction through PCA

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
dimred_pca(
  MAE,
  tax_level,
  color,
  shape = NULL,
  pcx = 1,
  pcy = 2,
  pcz = NULL,
  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"

pcx

Principal component on the x-axis e.g. 1

pcy

Principal component on the y-axis e.g. 2

pcz

Principal component on the z-axis e.g. 3

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
11
data_dir = system.file("extdata/MAE.rds", package = "animalcules")
toy_data <- readRDS(data_dir)
result <- dimred_pca(toy_data,
                     tax_level="genus",
                     color="AGE",
                     shape="DISEASE",
                     pcx=1,
                     pcy=2,
                     datatype="logcpm")
result$plot
result$table

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