
otu_table-class
) and
phylogenetic (phylo
) components of a
phyloseq-class
experiment-level object
to perform a
Double Principle Coordinate Analysis (DPCoA), relying heavily on
the underlying (and more general) function, dpcoa
.
The distance object ultimately provided as the cophenetic/patristic
(cophenetic.phylo
) distance between the species.DPCoA(physeq, correction = cailliez, scannf = FALSE, ...)
phyloseq-class
object
containing, at a minimum, abundance (otu_table-class
) and
phylogenetic (phylo
) components.
As a test, the accessors otu_table
and phy_tree
should return an object without error.dist
ance object,
and return a new dist
ance object that is Euclidean.
If testing a distance object, try is.euclid
. In most real-life, real-data applications, the phylogenetic tree
will not provide a Euclidean distance matrix, and so a correction
will be needed.
Two recommended correction methods are
cailliez
and lingoes
.
The default is cailliez
,
but not for any particularly special reason. If the patristic
distance matrix turns out to be Euclidian, no correction will be
performed, regardless of the value of the correction
argument.
dpcoa
.dpcoa
-class object (see dpcoa
).correction
argument.dpcoa
# # # # # # Esophagus
data(esophagus)
eso.dpcoa <- DPCoA(esophagus)
eso.dpcoa
plot_ordination(esophagus, eso.dpcoa, "samples")
plot_ordination(esophagus, eso.dpcoa, "species")
plot_ordination(esophagus, eso.dpcoa, "biplot")
#
#
# # # # # # GlobalPatterns
data(GlobalPatterns)
# subset GP to top-150 taxa (to save computation time in example)
keepTaxa <- names(sort(taxa_sums(GlobalPatterns), TRUE)[1:150])
GP <- prune_taxa(keepTaxa, GlobalPatterns)
# Perform DPCoA
GP.dpcoa <- DPCoA(GP)
plot_ordination(GP, GP.dpcoa, color="SampleType")
Run the code above in your browser using DataLab