Blast+ does not accept the 'ALL' argument

I tried to classify my sequences with BLAST+. I had a problem with maxaccept parameter. I searched the error in forum but there was not such an error!
Would you please give me a hint?

Traceback (most recent call last):
File “/home/rabiei/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/q2cli/commands.py”, line 329, in call
results = action(**arguments)
File “”, line 2, in classify_consensus_vsearch
File “/home/rabiei/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 208, in bound_callable
self.signature.check_types(**user_input)
File “/home/rabiei/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/qiime2/core/type/signature.py”, line 354, in check_types
% (name, parameter, spec.qiime_type))
TypeError: Parameter ‘maxaccepts’ received ‘both’ as an argument, which is incompatible with parameter type: Int % Range(1, None) | Str % Choices(‘all’)

Plugin error from feature-classifier:

Parameter ‘maxaccepts’ received ‘both’ as an argument, which is incompatible with parameter type: Int % Range(1, None) | Str % Choices(‘all’)

Thanks,
Qiimer

Hi @TurboQiimer - I’ll remind you that we cannot help without the following information:

  • the version of QIIME 2 you are using
  • the command or commands you ran (copy and paste please)
2 Likes

Oh yea!
The version is 2020.08 QIIME2.

The command is below:

qiime feature-classifier classify-consensus-blast
–i-query refseqdsrB3.qza
–i-reference-reads seqdatabase.qza
–i-reference-taxonomy taxdatabase.qza
–p-maxaccepts all
–p-perc-identity 0.9
–p-query-cov 0.9
–p-strand both
–p-unassignable-label unassigned
–o-classification classif100.qza
–verbose

Thanks @TurboQiimer - are you sure you have your commands in order? The command you shared here is classify-consensus-blast, but the error message you shared above says:

1 Like

I just share the whole command and error altogether!

qiime feature-classifier classify-consensus-blast \

--i-query refseqdsrB3.qza
--i-reference-reads seqdatabase.qza
--i-reference-taxonomy taxdatabase.qza
--p-maxaccepts all
--p-perc-identity 0.90
--p-query-cov 0.9
--p-strand both
--p-unassignable-label unassigned
--o-classification classif100.qza
--verbose
Usage: qiime feature-classifier classify-consensus-blast [OPTIONS]

Assign taxonomy to query sequences using BLAST+. Performs BLAST+ local
alignment between query and reference_reads, then assigns consensus
taxonomy to each query sequence from among maxaccepts hits, min_consensus
of which share that taxonomic assignment. Note that maxaccepts selects the
first N hits with > perc_identity similarity to query, not the top N
matches. For top N hits, use classify-consensus-vsearch.

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 INTEGER Maximum number of hits to keep for each query. Must
Range(1, None) be in range [1, infinity]. BLAST will choose the
first N hits in the reference database that exceed
perc-identity similarity to query. [default: 10]
--p-perc-identity PROPORTION Range(0.0, 1.0, inclusive_end=True)
Reject match if percent identity to query is lower.
Must be in range [0.0, 1.0]. [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. Note: this uses blastn's
qcov_hsp_perc parameter, and may not behave
identically to the query-cov parameter used by
classify-consensus-vsearch. Must be in range [0.0,
1.0]. [default: 0.8]
--p-strand TEXT Choices('both', 'plus', 'minus')
Align against reference sequences in forward
("plus"), reverse ("minus"), or both directions
("both"). [default: 'both']
--p-evalue NUMBER BLAST expectation value (E) threshold for saving
hits. [default: 0.001]
--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. Must be in
range (0.5, 1.0]. [default: 0.51]
--p-unassignable-label TEXT
[default: 'Unassigned']
Outputs:
--o-classification ARTIFACT FeatureData[Taxonomy]
Taxonomy classifications of query sequences.
[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).
--examples Show usage examples and exit.
--citations Show citations and exit.
--help Show this message and exit.

                There was a problem with the command:                     

(1/1) Invalid value for '--p-maxaccepts': received as an argument,
which is incompatible with parameter type: Int % Range(1, None)

Plus a screenshot:

I checked out the command order! It is OK.

Thanks
Qiimer

Thanks @TurboQiimer - I would like to point out that this second error you have shared is completely different from the first error. No problem, but in case someone else comes along and reads this thread, I want to make that clear.

Regarding the error, you have the answer right here in the text you shared:

The --p-maxaccepts parameter accepts a number greater than or equal to “1” - all is not a valid option.

The other relevant part from the help text:

If you need the top N hits, you will need to use the classify-consensus-vsearch method, instead.

3 Likes

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.