qiime2 / q2-deblur

BSD 3-Clause "New" or "Revised" License
2 stars 22 forks source link

A ValueError is missing string formatting #71

Closed wasade closed 5 years ago

wasade commented 6 years ago

Bug Description A string formatting is missing the trim length resulting in an incomplete ValueError message. The message right now contains a %d when that string formatting construct should be replaced by the variable value.

Steps to reproduce the behavior Run a dataset in which none of the samples have any sequences which make it past the positive filter.

Expected behavior The message should contain the trim length.

Computation Environment 1) Vanilla qiime2-2018.8 environment

Comments An example of the traceback output being produced is below:

Traceback (most recent call last):
  File "/Users/dtmcdonald/miniconda3/envs/qiime2-2018.8/lib/python3.5/site-packages/q2cli/commands.py", line 274, in __call__
    results = action(**arguments)
  File "<decorator-gen-356>", line 2, in denoise_16S
  File "/Users/dtmcdonald/miniconda3/envs/qiime2-2018.8/lib/python3.5/site-packages/qiime2/sdk/action.py", line 231, in bound_callable
    output_types, provenance)
  File "/Users/dtmcdonald/miniconda3/envs/qiime2-2018.8/lib/python3.5/site-packages/qiime2/sdk/action.py", line 362, in _callable_executor_
    output_views = self._callable(**view_args)
  File "/Users/dtmcdonald/miniconda3/envs/qiime2-2018.8/lib/python3.5/site-packages/q2_deblur/_denoise.py", line 96, in denoise_16S
    hashed_feature_ids=hashed_feature_ids)
  File "/Users/dtmcdonald/miniconda3/envs/qiime2-2018.8/lib/python3.5/site-packages/q2_deblur/_denoise.py", line 170, in _denoise_helper
    raise ValueError("No sequences passed the filter. It is possible "
ValueError: No sequences passed the filter. It is possible the trim_length (%d) may exceed the longest sequence, that all of the sequences are artifacts like PhiX or adapter, or that the positive reference used is not representative of the data being denoised.

Plugin error from deblur:

  No sequences passed the filter. It is possible the trim_length (%d) may exceed the longest sequence, that all of the sequences are artifacts like PhiX or adapter, or that the positive reference used is not representative of the data being denoised.

See above for debug info.
thermokarst commented 5 years ago

Fixed in #78.