Fork me on GitHub

classify-consensus-vsearch: VSEARCH-based consensus taxonomy classifier

Citations
  • Torbjørn Rognes, Tomáš Flouri, Ben Nichols, Christopher Quince, and Frédéric Mahé. Vsearch: a versatile open source tool for metagenomics. PeerJ, 4:e2584, 2016. doi:10.7717/peerj.2584.

Docstring:

Usage: qiime feature-classifier classify-consensus-vsearch
           [OPTIONS]

  Assign taxonomy to query sequences using VSEARCH. Performs VSEARCH global
  alignment between query and reference_reads, then assigns consensus
  taxonomy to each query sequence from among maxaccepts top hits,
  min_consensus of which share that taxonomic assignment. Unlike classify-
  consensus-blast, this method searches the entire reference database before
  choosing the top N hits, not the first N hits.

Inputs:
  --i-query ARTIFACT FeatureData[Sequence]
                        Sequences to classify taxonomically.        [required]
  --i-reference-reads ARTIFACT FeatureData[Sequence]
                        reference sequences.                        [required]
  --i-reference-taxonomy ARTIFACT FeatureData[Taxonomy]
                        reference taxonomy labels.                  [required]
Parameters:
  --p-maxaccepts VALUE Int % Range(1, None) | Str % Choices('all')
                        Maximum number of hits to keep for each query. Set to
                        "all" to keep all hits > perc-identity similarity.
                                                                 [default: 10]
  --p-perc-identity PROPORTION Range(0.0, 1.0, inclusive_end=True)
                        Reject match if percent identity to query is lower.
                                                                [default: 0.8]
  --p-query-cov PROPORTION Range(0.0, 1.0, inclusive_end=True)
                        Reject match if query alignment coverage per
                        high-scoring pair is lower.             [default: 0.8]
  --p-strand TEXT Choices('both', 'plus')
                        Align against reference sequences in forward ("plus")
                        or both directions ("both").         [default: 'both']
  --p-min-consensus NUMBER Range(0.5, 1.0, inclusive_start=False,
    inclusive_end=True) Minimum fraction of assignments must match top hit to
                        be accepted as consensus assignment.   [default: 0.51]
  --p-unassignable-label TEXT
                                                       [default: 'Unassigned']
  --p-search-exact / --p-no-search-exact
                        Search for exact full-length matches to the query
                        sequences. Only 100% exact matches are reported and
                        this command is much faster than the default. If True,
                        the perc-identity and query-cov settings are ignored.
                        Note: query and reference reads must be trimmed to the
                        exact same DNA locus (e.g., primer site) because only
                        exact matches will be reported.       [default: False]
  --p-top-hits-only / --p-no-top-hits-only
                        Only the top hits between the query and reference
                        sequence sets are reported. For each query, the top
                        hit is the one presenting the highest percentage of
                        identity. Multiple equally scored top hits will be
                        used for consensus taxonomic assignment if maxaccepts
                        is greater than 1.                    [default: False]
  --p-threads INTEGER   Number of threads to use for job parallelization.
    Range(1, None)                                                [default: 1]
Outputs:
  --o-classification ARTIFACT FeatureData[Taxonomy]
                        The resulting taxonomy classifications.     [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.feature_classifier.methods import classify_consensus_vsearch

Docstring:

VSEARCH-based consensus taxonomy classifier

Assign taxonomy to query sequences using VSEARCH. Performs VSEARCH global
alignment between query and reference_reads, then assigns consensus
taxonomy to each query sequence from among maxaccepts top hits,
min_consensus of which share that taxonomic assignment. Unlike classify-
consensus-blast, this method searches the entire reference database before
choosing the top N hits, not the first N hits.

Parameters
----------
query : FeatureData[Sequence]
    Sequences to classify taxonomically.
reference_reads : FeatureData[Sequence]
    reference sequences.
reference_taxonomy : FeatureData[Taxonomy]
    reference taxonomy labels.
maxaccepts : Int % Range(1, None) | Str % Choices('all'), optional
    Maximum number of hits to keep for each query. Set to "all" to keep all
    hits > perc_identity similarity.
perc_identity : Float % Range(0.0, 1.0, inclusive_end=True), optional
    Reject match if percent identity to query is lower.
query_cov : Float % Range(0.0, 1.0, inclusive_end=True), optional
    Reject match if query alignment coverage per high-scoring pair is
    lower.
strand : Str % Choices('both', 'plus'), optional
    Align against reference sequences in forward ("plus") or both
    directions ("both").
min_consensus : Float % Range(0.5, 1.0, inclusive_start=False, inclusive_end=True), optional
    Minimum fraction of assignments must match top hit to be accepted as
    consensus assignment.
unassignable_label : Str, optional
search_exact : Bool, optional
    Search for exact full-length matches to the query sequences. Only 100%
    exact matches are reported and this command is much faster than the
    default. If True, the perc_identity and query_cov settings are ignored.
    Note: query and reference reads must be trimmed to the exact same DNA
    locus (e.g., primer site) because only exact matches will be reported.
top_hits_only : Bool, optional
    Only the top hits between the query and reference sequence sets are
    reported. For each query, the top hit is the one presenting the highest
    percentage of identity. Multiple equally scored top hits will be used
    for consensus taxonomic assignment if maxaccepts is greater than 1.
threads : Int % Range(1, None), optional
    Number of threads to use for job parallelization.

Returns
-------
classification : FeatureData[Taxonomy]
    The resulting taxonomy classifications.