Fork me on GitHub

beta-rarefaction: Beta diversity rarefactionΒΆ

Citations

[diversity:beta-rarefaction:Man67]Nathan Mantel. The detection of disease clustering and a generalized regression approach. Cancer research, 27(2 Part 1):209–220, 1967.
[diversity:beta-rarefaction:Pea95]Karl Pearson. Note on regression and inheritance in the case of two parents. Proceedings of the Royal Society of London, 58:240–242, 1895.
[diversity:beta-rarefaction:Spe04]Charles Spearman. The proof and measurement of association between two things. The American journal of psychology, 15(1):72–101, 1904.

Docstring:

Usage: qiime diversity beta-rarefaction [OPTIONS]

  Repeatedly rarefy a feature table to compare beta diversity results within
  a given rarefaction depth.

  For a given beta diversity metric, this visualizer will provide: an
  Emperor jackknifed PCoA plot, samples clustered by UPGMA or neighbor
  joining with support calculation, and a heatmap showing the correlation
  between rarefaction trials of that beta diversity metric.

Options:
  --i-table ARTIFACT PATH FeatureTable[Frequency]
                                  Feature table upon which to perform beta
                                  diversity rarefaction analyses.  [required]
  --p-metric [yule|hamming|dice|unweighted_unifrac|russellrao|kulsinski|wminkowski|sqeuclidean|mahalanobis|seuclidean|weighted_normalized_unifrac|braycurtis|cosine|euclidean|jaccard|aitchison|canberra_adkins|correlation|generalized_unifrac|rogerstanimoto|matching|cityblock|sokalsneath|canberra|sokalmichener|weighted_unifrac|chebyshev]
                                  The beta diversity metric to be computed.
                                  [required]
  --p-clustering-method [nj|upgma]
                                  Samples can be clustered with neighbor
                                  joining or UPGMA. An arbitrary rarefaction
                                  trial will be used for the tree, and the
                                  remaining trials are used to calculate the
                                  support of the internal nodes of that tree.
                                  [required]
  --m-metadata-file MULTIPLE FILE
                                  Metadata file or artifact viewable as
                                  metadata. This option may be supplied
                                  multiple times to merge metadata. The sample
                                  metadata used for the Emperor jackknifed
                                  PCoA plot.  [required]
  --p-sampling-depth INTEGER RANGE
                                  The total frequency that each sample should
                                  be rarefied to prior to computing the
                                  diversity metric.  [required]
  --p-iterations INTEGER RANGE    Number of times to rarefy the feature table
                                  at a given sampling depth.  [default: 10]
  --i-phylogeny ARTIFACT PATH 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. [required for phylogenetic
                                  metrics]  [optional]
  --p-correlation-method [pearson|spearman]
                                  The Mantel correlation test to be applied
                                  when computing correlation between beta
                                  diversity distance matrices.  [default:
                                  spearman]
  --p-color-scheme [PiYG|PRGn_r|RdYlBu_r|PuOr|RdYlGn|BrBG|RdYlBu|RdGy|RdYlGn_r|PiYG_r|RdBu_r|RdBu|RdGy_r|PuOr_r|BrBG_r|PRGn]
                                  The matplotlib color scheme to generate the
                                  heatmap with.  [default: BrBG]
  --o-visualization VISUALIZATION PATH
                                  [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.visualizers import beta_rarefaction

Docstring:

Beta diversity rarefaction

Repeatedly rarefy a feature table to compare beta diversity results within
a given rarefaction depth.  For a given beta diversity metric, this
visualizer will provide: an Emperor jackknifed PCoA plot, samples clustered
by UPGMA or neighbor joining with support calculation, and a heatmap
showing the correlation between rarefaction trials of that beta diversity
metric.

Parameters
----------
table : FeatureTable[Frequency]
    Feature table upon which to perform beta diversity rarefaction
    analyses.
metric : Str % Choices({'aitchison', 'braycurtis', 'canberra', 'canberra_adkins', 'chebyshev', 'cityblock', 'correlation', 'cosine', 'dice', 'euclidean', 'generalized_unifrac', 'hamming', 'jaccard', 'kulsinski', 'mahalanobis', 'matching', 'rogerstanimoto', 'russellrao', 'seuclidean', 'sokalmichener', 'sokalsneath', 'sqeuclidean', 'unweighted_unifrac', 'weighted_normalized_unifrac', 'weighted_unifrac', 'wminkowski', 'yule'})
    The beta diversity metric to be computed.
clustering_method : Str % Choices({'nj', 'upgma'})
    Samples can be clustered with neighbor joining or UPGMA. An arbitrary
    rarefaction trial will be used for the tree, and the remaining trials
    are used to calculate the support of the internal nodes of that tree.
metadata : Metadata
    The sample metadata used for the Emperor jackknifed PCoA plot.
sampling_depth : Int % Range(1, None)
    The total frequency that each sample should be rarefied to prior to
    computing the diversity metric.
iterations : Int % Range(2, None), optional
    Number of times to rarefy the feature table at a given sampling depth.
phylogeny : Phylogeny[Rooted], optional
    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. [required for phylogenetic metrics]
correlation_method : Str % Choices({'pearson', 'spearman'}), optional
    The Mantel correlation test to be applied when computing correlation
    between beta diversity distance matrices.
color_scheme : Str % Choices({'BrBG', 'BrBG_r', 'PRGn', 'PRGn_r', 'PiYG', 'PiYG_r', 'PuOr', 'PuOr_r', 'RdBu', 'RdBu_r', 'RdGy', 'RdGy_r', 'RdYlBu', 'RdYlBu_r', 'RdYlGn', 'RdYlGn_r'}), optional
    The matplotlib color scheme to generate the heatmap with.

Returns
-------
visualization : Visualization