Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better error message when truncating past max seq length #16

Closed
jairideout opened this issue Oct 10, 2016 · 1 comment
Closed

better error message when truncating past max seq length #16

jairideout opened this issue Oct 10, 2016 · 1 comment

Comments

@jairideout
Copy link
Member

When passing --p-trunc-len with a length greater than the length of the input sequences, dada2 denoise (which runs run_data.R) fails with an uninformative error message. For example, running this command (--p-trunc-len 98) on sequences that have 90 positions:

$ qiime dada2 denoise --i-demultiplexed-seqs 88soils-tutorial-demux-1p.qza --o-representative-sequences rep-seqs --o-table table --p-trim-left 0 --p-trunc-len 98 --verbose
Running external command line application(s). This may print messages to stdout and/or stderr.
The command(s) being run are below. These commands cannot be manually re-run as they will depend on temporary files that no longer exist.

Command: run_dada.R /var/folders/h3/2l54lt8d69db92g2mlsc_wnw0000gp/T/qiime2-archive-tg33bd_3/52802aaa-e515-4eb6-a193-4466da154458/data /var/folders/h3/2l54lt8d69db92g2mlsc_wnw0000gp/T/tmp83ajfcmt/output.tsv.biom 98 0 /var/folders/h3/2l54lt8d69db92g2mlsc_wnw0000gp/T/tmp83ajfcmt

Loading required package: Rcpp
There were 50 or more warnings (use warnings() to see the first 50)
Initial error matrix unspecified. Error rates will be initialized to the maximum possible estimate from this data.
Error in colSums(trans[paste0(nti, "2", c("A", "C", "G", "T")), ]) :
  'x' must be an array of at least two dimensions
Calls: dada -> errorEstimationFunction -> colSums
Execution halted
Traceback (most recent call last):
  File "/Users/jairideout/miniconda3/envs/qiime2-test/bin/qiime", line 6, in <module>
    sys.exit(q2cli.__main__.qiime())
  File "/Users/jairideout/miniconda3/envs/qiime2-test/lib/python3.5/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/Users/jairideout/miniconda3/envs/qiime2-test/lib/python3.5/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/Users/jairideout/miniconda3/envs/qiime2-test/lib/python3.5/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/jairideout/miniconda3/envs/qiime2-test/lib/python3.5/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/jairideout/miniconda3/envs/qiime2-test/lib/python3.5/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/jairideout/miniconda3/envs/qiime2-test/lib/python3.5/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/Users/jairideout/miniconda3/envs/qiime2-test/lib/python3.5/site-packages/q2cli-0.0.5-py3.5.egg/q2cli/commands.py", line 210, in __call__
  File "<decorator-gen-131>", line 2, in denoise
  File "/Users/jairideout/miniconda3/envs/qiime2-test/lib/python3.5/site-packages/qiime-2.0.5-py3.5.egg/qiime/core/callable.py", line 221, in callable_wrapper
    output_types)
  File "/Users/jairideout/miniconda3/envs/qiime2-test/lib/python3.5/site-packages/qiime-2.0.5-py3.5.egg/qiime/core/callable.py", line 321, in _callable_executor_
    output_views = callable(**view_args)
  File "/Users/jairideout/miniconda3/envs/qiime2-test/lib/python3.5/site-packages/q2_dada2-0.0.5-py3.5.egg/q2_dada2/_denoise.py", line 29, in denoise
  File "/Users/jairideout/miniconda3/envs/qiime2-test/lib/python3.5/site-packages/q2_dada2-0.0.5-py3.5.egg/q2_dada2/_plot.py", line 29, in run_commands
  File "/Users/jairideout/miniconda3/envs/qiime2-test/lib/python3.5/subprocess.py", line 708, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['run_dada.R', '/var/folders/h3/2l54lt8d69db92g2mlsc_wnw0000gp/T/qiime2-archive-tg33bd_3/52802aaa-e515-4eb6-a193-4466da154458/data', '/var/folders/h3/2l54lt8d69db92g2mlsc_wnw0000gp/T/tmp83ajfcmt/output.tsv.biom', '98', '0', '/var/folders/h3/2l54lt8d69db92g2mlsc_wnw0000gp/T/tmp83ajfcmt']' returned non-zero exit status 1

It would be helpful to have a more informative error message. Not sure if this should happen in the R dada2 library itself or in q2-dada2.

benjjneb added a commit that referenced this issue Jan 15, 2017
Samples that pass the filter with >0 reads get a “.”, while those with
no reads that pass the filter get a “x”. Unfortunately more
fine-grained output (fraction of reads passing) has to wait until the
next update of the dada2 package (to 1.4).

Also quits with an informative error message if no reads pass the
filter, addressing #16
@jairideout
Copy link
Member Author

This is no longer an issue, thanks @ebolyen!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant