Fork me on GitHub

beta: Beta diversity

Citations

[diversity:beta:FMB87]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.

Options:
  --i-table ARTIFACT PATH FeatureTable[Frequency]
                                  The feature table containing the samples
                                  over which beta diversity should be
                                  computed.  [required]
  --p-metric [yule|hamming|dice|russellrao|kulsinski|wminkowski|sqeuclidean|mahalanobis|seuclidean|braycurtis|cosine|euclidean|jaccard|aitchison|canberra_adkins|correlation|rogerstanimoto|matching|cityblock|sokalsneath|canberra|sokalmichener|chebyshev]
                                  The beta diversity metric to be computed.
                                  [required]
  --p-pseudocount INTEGER RANGE   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]
  --o-distance-matrix ARTIFACT PATH DistanceMatrix
                                  The resulting distance matrix.  [required if
                                  not passing --output-dir]
  --output-dir DIRECTORY          Output unspecified results to a directory
  --cmd-config FILE               Use config file for command options
  --verbose                       Display verbose output to stdout and/or
                                  stderr during execution of this action.
                                  [default: False]
  --quiet                         Silence output if execution is successful
                                  (silence is golden).  [default: False]
  --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({'aitchison', 'braycurtis', 'canberra', 'canberra_adkins', 'chebyshev', 'cityblock', 'correlation', 'cosine', 'dice', 'euclidean', 'hamming', 'jaccard', 'kulsinski', 'mahalanobis', 'matching', 'rogerstanimoto', 'russellrao', 'seuclidean', 'sokalmichener', 'sokalsneath', 'sqeuclidean', 'wminkowski', 'yule'})
    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.