phyloseq (version 1.16.2)

ordinate: Perform an ordination on phyloseq data

Description

This function wraps several commonly-used ordination methods. The type of ordination depends upon the argument to method. Try ordinate("help") or ordinate("list") for the currently supported method options.

Usage

ordinate(physeq, method = "DCA", distance = "bray", formula = NULL, ...)

Arguments

physeq
(Required). Phylogenetic sequencing data (phyloseq-class). The data on which you want to perform the ordination. In general, these methods will be based in some fashion on the abundance table ultimately stored as a contingency matrix (otu_table-class). If you're able to import data into phyloseq-class format, than you don't need to worry, as an otu_table is a required component of this class. In addition, some ordination methods require additional data, like a constraining variable or phylogenetic tree. If that is the case, the relevant data should be included in physeq prior to running. Integrating the data in this way also results in these different data components being checked for validity and completeness by the method.
method
(Optional). A character string. Default is "DCA".

Currently supported method options are: c("DCA", "CCA", "RDA", "CAP", "DPCoA", "NMDS", "MDS", "PCoA")

[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

distance
(Optional). A character string. Default is "bray". The name of a supported distance method; or, alternatively, a pre-computed dist-class object. This argument is only utilized if a distance matrix is required by the ordination method specified by the method argument (above).

Any supported distance methods are supported arguments to distance here. See distance for more details, examples.

formula
(Optional). A model formula. Only relevant for certain ordination methods. The left hand side is ignored, defined by the physeq and distance arguemnts. The right hand side gives the constraining variables, and conditioning variables can be given within a special function Condition. See cca or capscale for examples/details.
...
(Optional). Additional arguments to supporting functions. For example, the additional argument weighted=TRUE would be passed on to UniFrac if "unifrac" were chosen as the distance option and "MDS" as the ordination method option. Alternatively, if "DCA" were chosen as the ordination method option, additional arguments would be passed on to the relevant ordination function, decorana, for example.

Value

  • An ordination object. The specific class of the returned object depends upon the ordination method, as well as the function/package that is called internally to perform it. As a general rule, any of the ordination classes returned by this function will be recognized by downstream tools in the phyloseq package, for example the ordination plotting function, plot_ordination.

See Also

http://joey711.github.io/phyloseq/plot_ordination-examples{The plot_ordination Tutorial}

Related component ordination functions described within phyloseq:

DPCoA

Described/provided by other packages:

cca/rda, decorana, metaMDS, pcoa, capscale

NMDS and MDS/PCoA both operate on distance matrices, typically based on some pairwise comparison of the microbiomes in an experiment/project. There are a number of common methods to use to calculate these pairwise distances, and the most convenient function (from a phyloseq point of view) for calculating these distance matrices is the

distance

function. It can be thought of as a distance / dissimilarity-index companion function for ordinate, and indeed the distance options provided to ordinate are often simply passed on to distance.

A good quick summary of ordination is provided in the introductory vignette for vegan:

http://cran.r-project.org/web/packages/vegan/vignettes/intro-vegan.pdf{vegan introductory vignette}

The following R task views are also useful for understanding the available tools in R:

http://cran.r-project.org/web/views/Environmetrics.html{Analysis of Ecological and Environmental Data}

http://cran.r-project.org/web/views/Multivariate.html{Multivariate Statistics}

Examples

Run this code
# See http://joey711.github.io/phyloseq/plot_ordination-examples
# for many more examples.
# plot_ordination(GP, ordinate(GP, "DCA"), "samples", color="SampleType")

Run the code above in your browser using DataLab