qiime/qiime — pull request #1250 by gregcaporaso (2013-12-03 22:17:29+00:00)
Title: updated so script usage test output from all_tests.py is more informative

Not 100% sure we want this, as it requires me to move a function (now ``qiime.test.run_script_usage_tests``) from qcli 0.1.0. I don't think this is really a bad thing since QIIME is likely the only software using ``run_script_usage_tests`` currently, and QIIME will be ported to use pyqi instead of qcli, so ``run_script_usage_tests`` is likely going to only be in QIIME for one release cycle.

If we go with this, the new script usage test failure output will look like the following (note that one of the ``align_seqs.py`` scripts is failing):

```
$ python tests/all_tests.py --suppress_unit_tests --script_usage_tests align_seqs,make_otu_table,summarize_taxa
Tests to run:
align_seqs make_otu_table summarize_taxa

Testing 4 usage examples from: /Users/caporaso/code/Qiime/scripts/align_seqs.py
Running tests in: /Users/caporaso/temp/script_usage_tests/align_seqs
Tests:
/Users/caporaso/code/Qiime/scripts/align_seqs.py -i $PWD/unaligned.fna -t $PWD/core_set_aligned.fasta.imputed -o $PWD/pynast_aligned_defaults/ : Pass
/Users/caporaso/code/Qiime/scripts/align_seqs.py -i $PWD/unaligned.fna -t core_set_aligned.fasta.imputed -o $PWD/pynast_aligned/ -e 500 -p 95.0 : Pass
/Users/caporaso/code/Qiime/scripts/align_seqs.py -i $PWD/unaligned.fna -m muscle -o $PWD/muscle_alignment/ : Pass
/Users/caporaso/code/Qiime/scripts/align_seqs.py -m infernal -i $PWD/unaligned.fna -t $PWD/seed.16s.reference_model.sto -o $PWD/infernal_aligned/ : Failed
Stdout:
Stderr: Traceback (most recent call last):
File "/Users/caporaso/code/Qiime/scripts/align_seqs.py", line 205, in
main()
File "/Users/caporaso/code/Qiime/scripts/align_seqs.py", line 188, in main
log_path=log_path,failure_path=failure_path)
File "/Users/caporaso/.virtualenvs/qiime/lib/python2.7/site-packages/qiime/align_seqs.py", line 182, in __call__
cmbuild_params=cmbuild_params)
File "/Users/caporaso/.virtualenvs/qiime/lib/python2.7/site-packages/cogent/app/infernal.py", line 1347, in cmalign_from_alignment
refine=refine,return_alignment=True,params=cmbuild_params)
File "/Users/caporaso/.virtualenvs/qiime/lib/python2.7/site-packages/cogent/app/infernal.py", line 1259, in cmbuild_from_alignment
params=params)
File "/Users/caporaso/.virtualenvs/qiime/lib/python2.7/site-packages/cogent/app/util.py", line 165, in __init__
self._error_on_missing_application(params)
File "/Users/caporaso/.virtualenvs/qiime/lib/python2.7/site-packages/cogent/app/util.py", line 434, in _error_on_missing_application
% command
cogent.app.util.ApplicationNotFoundError: Cannot find cmbuild. Is it installed? Is it in your path?

Testing 3 usage examples from: /Users/caporaso/code/Qiime/scripts/make_otu_table.py
Running tests in: /Users/caporaso/temp/script_usage_tests/make_otu_table
Tests:
/Users/caporaso/code/Qiime/scripts/make_otu_table.py -i otu_map.txt -t tax_assignments.txt -o otu_table.biom : Pass
/Users/caporaso/code/Qiime/scripts/make_otu_table.py -i otu_map.txt -o otu_table_no_pynast_failures.biom -e pynast_failures.fna : Pass
/Users/caporaso/code/Qiime/scripts/make_otu_table.py -i otu_map.txt -o otu_table_non_chimeric.biom -e chimeric_seqs.txt : Pass

Testing 2 usage examples from: /Users/caporaso/code/Qiime/scripts/summarize_taxa.py
Running tests in: /Users/caporaso/temp/script_usage_tests/summarize_taxa
Tests:
/Users/caporaso/code/Qiime/scripts/summarize_taxa.py -i otu_table.biom -o ./tax : Pass
/Users/caporaso/code/Qiime/scripts/summarize_taxa.py -i otu_table.biom -o tax_mapping/ -m Fasting_Map.txt : Pass

==============
Result summary
==============

Script usage test result summary
------------------------------------

Ran 9 commands to test 3 scripts. 1 of these commands failed.
Failed scripts were: align_seqs.py
```