Description Usage Arguments Details Value References See Also Examples
t-Distributed Stochastic Neighbor Embedding (t-SNE) for microbiota data.
1 2 3 | tsne_phyloseq(physeq, distance = "bray", perplexity = 25, dimensions = 2,
precomputed_distance = NULL, pseudocounts = 1, verbose = 1,
rng_seed = NULL, philr_options = list(), control = list())
|
physeq |
Phylogenetic sequencing data ( |
distance |
The dissimilarity measure to use. Either one of |
perplexity |
The perplexity. Usually a number between 5 and 50. Default is 25. |
dimensions |
The number of dimensions of the t-SNE embedding. Default is 2, which is usually adequate. |
precomputed_distance |
Matrix or dist object of a precomputed dissimilarity matrix. If you use other ordination techniques or trying different perplexities it will be faster to compute the dissimilarities beforehand. |
pseudocounts |
The number of psuedocounts, which is added to all elements in the otu table. Only applied when distance is philr. |
verbose |
The amount of output during the t-SNE estimation. Can be 0 (no output), 1 (some output, including a progress bar) and 2 (detailed output, mostly usefull for debugging purposes) |
rng_seed |
Provide a seed for generating intiial values for the coordiantes. The final t-SNE result is highly sensitive for starting values, so to get reproducible results you should provide a seed. |
philr_options |
A list of options to use with philr distances. See 'Details'. |
control |
A list of control parameters. See the 'Details' section for |
The philr_options
argument can conatin two elements, part.weights and ilr.weights.
The default is 'enorm.x.gm.counts' and 'blw.sqrt', respectively, since these are
used in the philr vignette. See philr
for more details.
A list of class tsne_phyloseq.
distance_matrix | The distance matrix computed using the method
specified in the distance argument. |
sne_distance_matrix | The SNE dissimilarity matrix computed from the distance_matrix with the perplexity given via the perplexity argument. |
names | Samples names from the phyloseq object. |
tsne | A list of class tsne as returned from the tsne function. Contains the t-SNE layout and some fit diagnostics, |
L.J.P. van der Maaten and G.E. Hinton. Visualizing High-Dimensional Data Using t-SNE. Journal of Machine Learning Research 9(Nov):2579-2605, 2008.
L.J.P. van der Maaten. The t-SNE FAQ https://lvdmaaten.github.io/tsne/
Paul J. McMurdie & Susan Holmes phyloseq: An R Package for Reproducible Interactive Analysis and Graphics of Microbiome Census Data https://doi.org/10.1371/journal.pone.0061217
plot_tsne_phyloseq
, add_tsne_to_sample_data
,
tsne
.
Other dimension reduction methods for microbiota data is available
via the ordinate
function in the phyloseq package.
1 2 3 4 5 6 | library(phyloseq)
data("GlobalPatterns")
tsne_res <- tsne_phyloseq(GlobalPatterns, distance='wunifrac',
perplexity = 8, verbose=0, rng_seed = 3901)
plot_tsne_phyloseq(GlobalPatterns, tsne_res,
color = 'SampleType', title='t-SNE (Weighted UniFrac)')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.