Fork me on GitHub

beta: Beta diversity

Citations
  • Daniel P. Faith, Peter R. Minchin, and Lee Belbin. Compositional dissimilarity as a robust measure of ecological distance. Vegetatio, 69(1):57–68, 1987. doi:10.1007/BF00038687.

Docstring:

Usage: qiime diversity beta [OPTIONS]

  Computes a user-specified 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]
Parameters:
  --p-metric TEXT Choices('wminkowski', 'sqeuclidean', 'canberra_adkins',
    'russellrao', 'braycurtis', 'seuclidean', 'jaccard', 'dice', 'hamming',
    'aitchison', 'chebyshev', 'canberra', 'kulsinski', 'sokalsneath',
    'cosine', 'matching', 'sokalmichener', 'rogerstanimoto', 'correlation',
    'yule', 'euclidean', 'mahalanobis', 'cityblock')
                       The beta diversity metric to be computed.    [required]
  --p-pseudocount INTEGER
    Range(1, None)     A pseudocount to handle zeros for compositional
                       metrics.  This is ignored for other metrics.
                                                                  [default: 1]
  --p-n-jobs INTEGER   The number of jobs to use for the computation. This
                       works by breaking down the pairwise matrix into n-jobs
                       even slices and computing them in parallel. If -1 all
                       CPUs are used. If 1 is given, no parallel computing
                       code is used at all, which is useful for debugging. For
                       n-jobs below -1, (n_cpus + 1 + n-jobs) are used. Thus
                       for n-jobs = -2, all CPUs but one are used.
                       (Description from sklearn.metrics.pairwise_distances)
                                                                  [default: 1]
Outputs:
  --o-distance-matrix ARTIFACT
    DistanceMatrix     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

Docstring:

Beta diversity

Computes a user-specified 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.
metric : Str % Choices('kulsinski', 'correlation', 'mahalanobis', 'dice', 'hamming', 'cosine', 'euclidean', 'canberra', 'chebyshev', 'braycurtis', 'sokalsneath', 'seuclidean', 'jaccard', 'yule', 'cityblock', 'sqeuclidean', 'aitchison', 'canberra_adkins', 'matching', 'wminkowski', 'sokalmichener', 'rogerstanimoto', 'russellrao')
    The beta diversity metric to be computed.
pseudocount : Int % Range(1, None), optional
    A pseudocount to handle zeros for compositional metrics.  This is
    ignored for other metrics.
n_jobs : Int, optional
    The number of jobs to use for the computation. This works by breaking
    down the pairwise matrix into n_jobs even slices and computing them in
    parallel. If -1 all CPUs are used. If 1 is given, no parallel computing
    code is used at all, which is useful for debugging. For n_jobs below
    -1, (n_cpus + 1 + n_jobs) are used. Thus for n_jobs = -2, all CPUs but
    one are used. (Description from sklearn.metrics.pairwise_distances)

Returns
-------
distance_matrix : DistanceMatrix
    The resulting distance matrix.