tsne_pq: Compute tSNE position of samples from a phyloseq object

View source: R/plot_functions.R

tsne_pqR Documentation

Compute tSNE position of samples from a phyloseq object

Description

Compute tSNE position of samples from a phyloseq object

Usage

tsne_pq(physeq, method = "bray", dims = 2, theta = 0, perplexity = 30, ...)

Arguments

physeq

(required): a phyloseq-class object obtained using the phyloseq package.

method

A method to calculate distance using vegan::vegdist() function

dims

(Int) Output dimensionality (default: 2)

theta

(Numeric) Speed/accuracy trade-off (increase for less accuracy), set to 0.0 for exact TSNE (default: 0.0 see details in the man page of Rtsne::Rtsne).

perplexity

(Numeric) Perplexity parameter (should not be bigger than 3 * perplexity < nrow(X) - 1, see details in the man page of Rtsne::Rtsne)

...

Other arguments passed on to Rtsne::Rtsne()

Value

A list of element including the matrix Y containing the new representations for the objects. See ?Rtsne::Rtsne() for more information

Examples


if (requireNamespace("Rtsne")) {
  res_tsne <- tsne_pq(data_fungi)
}


adrientaudiere/MiscMetabar documentation built on Oct. 13, 2024, 9:42 p.m.