method
. Try
ordinate("help")
or ordinate("list")
for the currently
supported method options.ordinate(physeq, method = "DCA", distance = "bray", formula = NULL, ...)
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."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]
"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
.
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.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.phyloseq
package, for example the ordination plotting
function, plot_ordination
.Related component ordination functions described within phyloseq:
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
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:
The following R
task views are also useful for understanding the
available tools in R
:
# 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