Fork me on GitHub

evaluate-taxonomy: Evaluate expected vs. observed taxonomic assignments

Citations
  • Nicholas A Bokulich, Benjamin D Kaehler, Jai Ram Rideout, Matthew Dillon, Evan Bolyen, Rob Knight, Gavin A Huttley, and J Gregory Caporaso. Optimizing taxonomic classification of marker-gene amplicon sequences with qiime 2's q2-feature-classifier plugin. Microbiome, 2018.

Docstring:

Usage: qiime quality-control evaluate-taxonomy [OPTIONS]

  This visualizer compares a pair of observed and expected taxonomic
  assignments to calculate precision, recall, and F-measure at each taxonomic
  level, up to maximum level specified by the depth parameter. These metrics
  are calculated at each semicolon-delimited rank. This action is useful for
  comparing the accuracy of taxonomic assignment, e.g., between different
  taxonomy classifiers or other bioinformatics methods. Expected taxonomies
  should be derived from simulated or mock community sequences that have known
  taxonomic affiliations.

Inputs:
  --i-expected-taxa ARTIFACT FeatureData[Taxonomy]
                       Expected taxonomic assignments               [required]
  --i-observed-taxa ARTIFACT FeatureData[Taxonomy]
                       Observed taxonomic assignments               [required]
  --i-feature-table ARTIFACT FeatureTable[RelativeFrequency]
                       Optional feature table containing relative frequency
                       of each feature, used to weight accuracy scores by
                       frequency. Must contain all features found in expected
                       and/or observed taxa. Features found in the table but
                       not the expected/observed taxa will be dropped prior to
                       analysis.                                    [optional]
Parameters:
  --p-depth INTEGER    Maximum depth of semicolon-delimited taxonomic ranks
                       to test (e.g., 1 = root, 7 = species for the greengenes
                       reference sequence database).                [required]
  --p-palette TEXT Choices('Set1', 'Set2', 'Set3', 'Pastel1', 'Pastel2',
    'Paired', 'Accent', 'Dark2', 'tab10', 'tab20', 'tab20b', 'tab20c',
    'viridis', 'plasma', 'inferno', 'magma', 'terrain', 'rainbow')
                       Color palette to utilize for plotting.
                                                             [default: 'Set1']
  --p-require-exp-ids / --p-no-require-exp-ids
                       Require that all features found in observed taxa must
                       be found in expected taxa or raise error.
                                                               [default: True]
  --p-require-obs-ids / --p-no-require-obs-ids
                       Require that all features found in expected taxa must
                       be found in observed taxa or raise error.
                                                               [default: True]
  --p-sample-id TEXT   Optional sample ID to use for extracting frequency
                       data from feature table, and for labeling accuracy
                       results. If no sample-id is provided, feature
                       frequencies are derived from the sum of all samples
                       present in the feature table.                [optional]
Outputs:
  --o-visualization VISUALIZATION
                                                                    [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).
  --example-data PATH  Write example data and exit.
  --citations          Show citations and exit.
  --help               Show this message and exit.

Import:

from qiime2.plugins.quality_control.visualizers import evaluate_taxonomy

Docstring:

Evaluate expected vs. observed taxonomic assignments

This visualizer compares a pair of observed and expected taxonomic
assignments to calculate precision, recall, and F-measure at each taxonomic
level, up to maximum level specified by the depth parameter. These metrics
are calculated at each semicolon-delimited rank. This action is useful for
comparing the accuracy of taxonomic assignment, e.g., between different
taxonomy classifiers or other bioinformatics methods. Expected taxonomies
should be derived from simulated or mock community sequences that have
known taxonomic affiliations.

Parameters
----------
expected_taxa : FeatureData[Taxonomy]
    Expected taxonomic assignments
observed_taxa : FeatureData[Taxonomy]
    Observed taxonomic assignments
depth : Int
    Maximum depth of semicolon-delimited taxonomic ranks to test (e.g., 1 =
    root, 7 = species for the greengenes reference sequence database).
palette : Str % Choices('Set1', 'Set2', 'Set3', 'Pastel1', 'Pastel2', 'Paired', 'Accent', 'Dark2', 'tab10', 'tab20', 'tab20b', 'tab20c', 'viridis', 'plasma', 'inferno', 'magma', 'terrain', 'rainbow'), optional
    Color palette to utilize for plotting.
require_exp_ids : Bool, optional
    Require that all features found in observed taxa must be found in
    expected taxa or raise error.
require_obs_ids : Bool, optional
    Require that all features found in expected taxa must be found in
    observed taxa or raise error.
feature_table : FeatureTable[RelativeFrequency], optional
    Optional feature table containing relative frequency of each feature,
    used to weight accuracy scores by frequency. Must contain all features
    found in expected and/or observed taxa. Features found in the table but
    not the expected/observed taxa will be dropped prior to analysis.
sample_id : Str, optional
    Optional sample ID to use for extracting frequency data from feature
    table, and for labeling accuracy results. If no sample_id is provided,
    feature frequencies are derived from the sum of all samples present in
    the feature table.

Returns
-------
visualization : Visualization