DPCoA {phyloseq} | R Documentation

## Calculate Double Principle Coordinate Analysis (DPCoA) using phylogenetic distance

### Description

Function uses abundance (`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 is the square root of the cophenetic/patristic (`cophenetic.phylo`) distance between the species, which is always Euclidean.

Although this distance is Euclidean, for numerical reasons it will sometimes look non-Euclidean, and a correction will be performed. See `correction` argument.

### Usage

    DPCoA(physeq, correction = cailliez, scannf = FALSE, ...)

### Arguments

`physeq` | (Required). A `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.
`correction` | (Optional). A function. The function must be able to take a non-Euclidean `dist`ance object, and return a new `dist`ance object that is Euclidean. If testing a distance object, try `is.euclid`. Although the distance matrix should always be Euclidean, for numerical reasons it will sometimes appear non-Euclidean and a correction method must be applied. Two recommended correction methods are `cailliez` and `lingoes`. The default is `cailliez`, but not for any particularly special reason. If the distance matrix is Euclidian, no correction will be performed, regardless of the value of the `correction` argument.
`scannf` | (Optional). Logical. Default is `FALSE`. This is passed directly to `dpcoa`, and causes a barplot of eigenvalues to be created if `TRUE`. This is not included in `...` because the default for `dpcoa` is `TRUE`, although in many expected situations we would want to suppress creating the barplot.
`...` | Additional arguments passed to `dpcoa`.

### Value

A `dpcoa`-class object (see `dpcoa`).

### Author(s)

Julia Fukuyama julia.fukuyama@gmail.com. Adapted for phyloseq by Paul J. McMurdie.

### References

Pavoine, S., Dufour, A.B. and Chessel, D. (2004) From dissimilarities among species to dissimilarities among communities: a double principal coordinate analysis. Journal of Theoretical Biology, 228, 523-537.

### See Also

`dpcoa`

### Examples

    # # # # # # 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")

[Package phyloseq version 1.26.1 Index]