Fork me on GitHub

beta-phylogenetic: Beta diversity (phylogenetic)

Citations
  • Qin Chang, Yihui Luan, and Fengzhu Sun. Variance adjusted weighted unifrac: a powerful beta diversity measure for comparing communities based on phylogeny. BMC bioinformatics, 12(1):118, 2011. doi:https://doi.org/10.1186/1471-2105-12-118.

  • Jun Chen, Kyle Bittinger, Emily S Charlson, Christian Hoffmann, James Lewis, Gary D Wu, Ronald G Collman, Frederic D Bushman, and Hongzhe Li. Associating microbiome composition with environmental covariates using generalized unifrac distances. Bioinformatics, 28(16):2106–2113, 2012. doi:10.1093/bioinformatics/bts342.

  • Catherine Lozupone and Rob Knight. Unifrac: a new phylogenetic method for comparing microbial communities. Applied and environmental microbiology, 71(12):8228–8235, 2005. doi:10.1128/AEM.71.12.8228-8235.2005.

  • Catherine A Lozupone, Micah Hamady, Scott T Kelley, and Rob Knight. Quantitative and qualitative $β$ diversity measures lead to different insights into factors that structure microbial communities. Applied and environmental microbiology, 73(5):1576–1585, 2007. doi:10.1128/AEM.01996-06.

  • Daniel McDonald, Yoshiki Vázquez-Baeza, David Koslicki, Jason McClelland, Nicolai Reeve, Zhenjiang Xu, Antonio Gonzalez, and Rob Knight. Striped unifrac: enabling microbiome analysis at unprecedented scale. Nature Methods, 2018. doi:10.1038/s41592-018-0187-8.

Docstring:

Usage: qiime diversity beta-phylogenetic [OPTIONS]

  Computes a user-specified phylogenetic beta diversity metric for all pairs
  of samples in a feature table.

Inputs:
  --i-table ARTIFACT FeatureTable[Frequency]
                          The feature table containing the samples over which
                          beta diversity should be computed.        [required]
  --i-phylogeny ARTIFACT  Phylogenetic tree containing tip identifiers that
    Phylogeny[Rooted]     correspond to the feature identifiers in the table.
                          This tree can contain tip ids that are not present
                          in the table, but all feature ids in the table must
                          be present in this tree.                  [required]
Parameters:
  --p-metric TEXT Choices('weighted_normalized_unifrac',
    'weighted_unifrac', 'unweighted_unifrac', 'generalized_unifrac')
                          The beta diversity metric to be computed. [required]
  --p-n-jobs INTEGER      The number of workers to use.           [default: 1]
  --p-variance-adjusted / --p-no-variance-adjusted
                          Perform variance adjustment based on Chang et al.
                          BMC Bioinformatics 2011. Weights distances based on
                          the proportion of the relative abundance represented
                          between the samples at a given node under
                          evaluation.                         [default: False]
  --p-alpha PROPORTION Range(0, 1, inclusive_end=True)
                          This parameter is only used when the choice of
                          metric is generalized_unifrac. The value of alpha
                          controls importance of sample proportions. 1.0 is
                          weighted normalized UniFrac. 0.0 is close to
                          unweighted UniFrac, but only if the sample
                          proportions are dichotomized.             [optional]
  --p-bypass-tips / --p-no-bypass-tips
                          In a bifurcating tree, the tips make up about 50%
                          of the nodes in a tree. By ignoring them,
                          specificity can be traded for reduced compute time.
                          This has the effect of collapsing the phylogeny, and
                          is analogous (in concept) to moving from 99% to 97%
                          OTUs                                [default: False]
Outputs:
  --o-distance-matrix ARTIFACT DistanceMatrix % Properties('phylogenetic')
                          The resulting distance matrix.            [required]
Miscellaneous:
  --output-dir PATH       Output unspecified results to a directory
  --verbose / --quiet     Display verbose output to stdout and/or stderr
                          during execution of this action. Or silence output
                          if execution is successful (silence is golden).
  --citations             Show citations and exit.
  --help                  Show this message and exit.

Import:

from qiime2.plugins.diversity.methods import beta_phylogenetic

Docstring:

Beta diversity (phylogenetic)

Computes a user-specified phylogenetic beta diversity metric for all pairs
of samples in a feature table.

Parameters
----------
table : FeatureTable[Frequency]
    The feature table containing the samples over which beta diversity
    should be computed.
phylogeny : Phylogeny[Rooted]
    Phylogenetic tree containing tip identifiers that correspond to the
    feature identifiers in the table. This tree can contain tip ids that
    are not present in the table, but all feature ids in the table must be
    present in this tree.
metric : Str % Choices('weighted_normalized_unifrac', 'generalized_unifrac', 'weighted_unifrac', 'unweighted_unifrac')
    The beta diversity metric to be computed.
n_jobs : Int, optional
    The number of workers to use.
variance_adjusted : Bool, optional
    Perform variance adjustment based on Chang et al. BMC Bioinformatics
    2011. Weights distances based on the proportion of the relative
    abundance represented between the samples at a given node under
    evaluation.
alpha : Float % Range(0, 1, inclusive_end=True), optional
    This parameter is only used when the choice of metric is
    generalized_unifrac. The value of alpha controls importance of sample
    proportions. 1.0 is weighted normalized UniFrac. 0.0 is close to
    unweighted UniFrac, but only if the sample proportions are
    dichotomized.
bypass_tips : Bool, optional
    In a bifurcating tree, the tips make up about 50% of the nodes in a
    tree. By ignoring them, specificity can be traded for reduced compute
    time. This has the effect of collapsing the phylogeny, and is analogous
    (in concept) to moving from 99% to 97% OTUs

Returns
-------
distance_matrix : DistanceMatrix % Properties('phylogenetic')
    The resulting distance matrix.