Repository 'ncbi_blast_plus'
hg clone https://toolshed.g2.bx.psu.edu/repos/devteam/ncbi_blast_plus

Changeset 22:6f386c5dc4fb (2017-09-18)
Previous changeset 21:7538e2bfcd41 (2017-04-19) Next changeset 23:31e517610e1f (2018-06-30)
Commit message:
v0.2.01 add -max_hsps, -use_sw_tback; lists args; internal updates
modified:
tools/ncbi_blast_plus/README.rst
tools/ncbi_blast_plus/blastxml_to_tabular.py
tools/ncbi_blast_plus/blastxml_to_tabular.xml
tools/ncbi_blast_plus/ncbi_blastdbcmd_info.xml
tools/ncbi_blast_plus/ncbi_blastdbcmd_wrapper.xml
tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml
tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml
tools/ncbi_blast_plus/ncbi_blastx_wrapper.xml
tools/ncbi_blast_plus/ncbi_convert2blastmask_wrapper.xml
tools/ncbi_blast_plus/ncbi_dustmasker_wrapper.xml
tools/ncbi_blast_plus/ncbi_macros.xml
tools/ncbi_blast_plus/ncbi_makeblastdb.xml
tools/ncbi_blast_plus/ncbi_makeprofiledb.xml
tools/ncbi_blast_plus/ncbi_rpsblast_wrapper.xml
tools/ncbi_blast_plus/ncbi_rpstblastn_wrapper.xml
tools/ncbi_blast_plus/ncbi_segmasker_wrapper.xml
tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml
tools/ncbi_blast_plus/ncbi_tblastx_wrapper.xml
b
diff -r 7538e2bfcd41 -r 6f386c5dc4fb tools/ncbi_blast_plus/README.rst
--- a/tools/ncbi_blast_plus/README.rst Wed Apr 19 05:27:19 2017 -0400
+++ b/tools/ncbi_blast_plus/README.rst Mon Sep 18 06:21:27 2017 -0400
b
@@ -1,7 +1,7 @@
 Galaxy wrappers for NCBI BLAST+ suite
 =====================================
 
-These wrappers are copyright 2010-2016 by Peter Cock (The James Hutton Institute,
+These wrappers are copyright 2010-2017 by Peter Cock (The James Hutton Institute,
 UK) and additional contributors including Edward Kirton, John Chilton,
 Nicola Soranzo, Jim Johnson, and Bjoern Gruening.
 
@@ -213,7 +213,7 @@
           table definitions in Galaxy's ``tool_data_table_conf.xml`` file,
           setup via ``tool-data/tool_data_table_conf.xml.sample``
         - Replace ``.extra_files_path`` with ``.files_path`` (internal change,
-   thanks to Bjoern Gruening and John Chilton).
+          thanks to Bjoern Gruening and John Chilton).
         - Added "NCBI BLAST+ integrated into Galaxy" preprint citation.
 v0.1.03 - Reorder XML elements (internal change only).
         - Planemo for Tool Shed upload (``.shed.yml``, internal change only).
@@ -233,15 +233,21 @@
           (contribution from Gildas Le CorguillĂ© and Emma Prudent).
         - Minor XML and Python style changes (internal change only).
         - Set ``allow_duplicate_entries="False"`` in sample configuration file
-   ``tool_data_table_conf.xml``.
+          ``tool_data_table_conf.xml``.
         - Fix identifers with pipes in ``blastdbcmd`` wrapper (Devon Ryan).
 v0.2.00 - Updated for NCBI BLAST+ 2.5.0, where GI numbers are less visible,
           tabular output changes with `-parse_deflines`, and percentage
-   identifies are now given to 3dp rather than 2dp.
+          identifies are now given to 3dp rather than 2dp.
         - Depends on ``package_blast_plus_2_5_0`` in ToolShed, or BioConda.
         - ``blastxml_to_tabular`` now also gives percentage idenity to 3dp.
         - Removed never-used binary and Python module dependency declarations
           (internal change only).
+v0.2.01 - Use ``<command detect_errors="aggressive">`` (internal change only).
+        - Single quote command line arguments (internal change only).
+        - Show BLAST command line argument corresponding to each tool
+          parameter (contribution from Nicola Soranzo).
+        - Add ``-max_hsps`` option (contribution from Nicola Soranzo).
+        - Add ``-use_sw_tback`` option for BLASTP (Nicola Soranzo).
 ======= ======================================================================
 
 
@@ -278,7 +284,7 @@
 
     $ planemo shed_upload --tar_only tools/ncbi_blast_plus/
     ...
-    $ tar -tzf shed_upload.tar.gz 
+    $ tar -tzf shed_upload.tar.gz
     test-data/blastdb.loc
     ...
     tools/ncbi_blast_plus/tool_dependencies.xml
b
diff -r 7538e2bfcd41 -r 6f386c5dc4fb tools/ncbi_blast_plus/blastxml_to_tabular.py
--- a/tools/ncbi_blast_plus/blastxml_to_tabular.py Wed Apr 19 05:27:19 2017 -0400
+++ b/tools/ncbi_blast_plus/blastxml_to_tabular.py Mon Sep 18 06:21:27 2017 -0400
[
@@ -61,6 +61,7 @@
 space character (probably a bug).
 """
 
+from __future__ import print_function
 
 import os
 import re
@@ -69,7 +70,7 @@
 from optparse import OptionParser
 
 if "-v" in sys.argv or "--version" in sys.argv:
-    print "v0.2.00"
+    print("v0.2.01")
     sys.exit(0)
 
 if sys.version_info[:2] >= (2, 5):
@@ -295,7 +296,7 @@
                             salltitles = "<>".join(name.split(None, 1)[1] for name in hit_def.split(" >"))
                         except IndexError as e:
                             sys.exit("Problem splitting multuple hits?\n%r\n--> %s" % (hit_def, e))
-                        # print hit_def, "-->", sallseqid
+                        # print(hit_def, "-->", sallseqid)
                         positive = hsp.findtext("Hsp_positive")
                         ppos = "%0.2f" % (100 * float(positive) / float(length))
                         qframe = hsp.findtext("Hsp_query-frame")
@@ -325,7 +326,7 @@
                     if cols:
                         # Only a subset of the columns are needed
                         values = [values[colnames.index(c)] for c in cols]
-                    # print "\t".join(values)
+                    # print("\t".join(values))
                     output_handle.write("\t".join(values) + "\n")
             # prevents ElementTree from growing large datastructure
             root.clear()
b
diff -r 7538e2bfcd41 -r 6f386c5dc4fb tools/ncbi_blast_plus/blastxml_to_tabular.xml
--- a/tools/ncbi_blast_plus/blastxml_to_tabular.xml Wed Apr 19 05:27:19 2017 -0400
+++ b/tools/ncbi_blast_plus/blastxml_to_tabular.xml Mon Sep 18 06:21:27 2017 -0400
b
@@ -3,27 +3,22 @@
     <macros>
         <import>ncbi_macros.xml</import>
     </macros>
-    <stdio>
-        <!-- Anything other than zero is an error -->
-        <exit_code range="1:" />
-        <exit_code range=":-1" />
-    </stdio>
-    <version_command interpreter="python">blastxml_to_tabular.py --version</version_command>
-    <command interpreter="python">
-blastxml_to_tabular.py -o "$tabular_file"
+    <version_command>python $__tool_directory__/blastxml_to_tabular.py --version</version_command>
+    <command detect_errors="aggressive">
+python $__tool_directory__/blastxml_to_tabular.py -o '$tabular_file'
 #if $output.out_format == "cols":
 #set cols = (str($output.std_cols)+","+str($output.ext_cols)).replace("None", " ").replace(",,", ",").replace(",", " ")
--c "$cols"
+-c '$cols'
 #else
--c "$output.out_format"
+-c '$output.out_format'
 #end if
-#for i in $blastxml_file#"${i}" #end for#
+#for i in $blastxml_file#'${i}' #end for#
     </command>
     <inputs>
         <param name="blastxml_file" type="data" format="blastxml" multiple="true" label="BLAST results as XML"/>
         <conditional name="output">
           <param name="out_format" type="select" label="Output format">
-            <option value="std" selected="True">Tabular (standard 12 columns)</option>
+            <option value="std" selected="true">Tabular (standard 12 columns)</option>
             <option value="ext">Tabular (extended 25 columns)</option>
             <option value="cols">Tabular (select columns to output)</option>
           </param>
@@ -139,7 +134,7 @@
         </test>
     </tests>
     <help>
-    
+
 **What it does**
 
 NCBI BLAST+ (and the older NCBI 'legacy' BLAST) can output in a range of
b
diff -r 7538e2bfcd41 -r 6f386c5dc4fb tools/ncbi_blast_plus/ncbi_blastdbcmd_info.xml
--- a/tools/ncbi_blast_plus/ncbi_blastdbcmd_info.xml Wed Apr 19 05:27:19 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_blastdbcmd_info.xml Mon Sep 18 06:21:27 2017 -0400
b
@@ -5,7 +5,7 @@
         <import>ncbi_macros.xml</import>
     </macros>
     <expand macro="preamble" />
-    <command>
+    <command detect_errors="aggressive">
 blastdbcmd -dbtype $db_opts.db_type -db "${db_opts.database.fields.path}" -info -out "$info"
     </command>
     <inputs>
@@ -32,7 +32,7 @@
         </test>
     </tests>
     <help>
-    
+
 **What it does**
 
 Calls the NCBI BLAST+ blastdbcmd command line tool with the -info
b
diff -r 7538e2bfcd41 -r 6f386c5dc4fb tools/ncbi_blast_plus/ncbi_blastdbcmd_wrapper.xml
--- a/tools/ncbi_blast_plus/ncbi_blastdbcmd_wrapper.xml Wed Apr 19 05:27:19 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_blastdbcmd_wrapper.xml Mon Sep 18 06:21:27 2017 -0400
[
@@ -5,7 +5,7 @@
         <import>ncbi_macros.xml</import>
     </macros>
     <expand macro="preamble" />
-    <command>
+    <command detect_errors="aggressive" strict="true">
 ## The command is a Cheetah template which allows some Python based syntax.
 ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces
 blastdbcmd -dbtype $db_opts.db_type -db "${db_opts.database.fields.path}"
@@ -13,7 +13,7 @@
 ##TODO: What about -ctrl_a and -target_only as advanced options?
 
 #if $id_opts.id_type=="file":
--entry_batch "$id_opts.entries"
+-entry_batch '$id_opts.entries'
 #else:
 ##Perform some simple search/replaces to remove whitespace
 ##and make it comma separated. Quoted so don't escape pipes.
@@ -40,11 +40,11 @@
 ##using sed, however the exact syntax differs for Mac OS X's sed
 
 #if str($outfmt)=="blastid":
--out "$seq"
+-out '$seq'
 #else if sys.platform == "darwin":
-| sed -E 's/^>(lcl\||gnl\|BL_ORD_ID\|[0-9]* )/>/1' > "$seq"
+| sed -E 's/^&gt;(lcl\||gnl\|BL_ORD_ID\|[0-9]* )/&gt;/1' &gt; "$seq"
 #else:
-| sed 's/>\(lcl|\|gnl|BL_ORD_ID|[0-9]* \)/>/1' > "$seq"
+| sed 's/&gt;\(lcl|\|gnl|BL_ORD_ID|[0-9]* \)/&gt;/1' &gt; "$seq"
 #end if
     </command>
     <inputs>
@@ -55,10 +55,10 @@
               <option value="prompt">User entered</option>
             </param>
             <when value="file">
-                <param name="entries" type="data" format="txt,tabular" label="Sequence identifier(s)" help="Plain text file with one ID per line (i.e. single column tabular file)"/>
+                <param name="entries" argument="-entry_batch" type="data" format="txt,tabular" label="Sequence identifier(s)" help="Plain text file with one ID per line (i.e. single column tabular file)"/>
             </when>
             <when value="prompt">
-                <param name="entries" type="text" label="Sequence identifier(s)" help="Comma or new line separated list." optional="False" area="True" size="10x30"/>
+                <param name="entries" argument="-entry" type="text" optional="false" area="true" size="10x30" label="Sequence identifier(s)" help="Comma or new line separated list"/>
             </when>
         </conditional>
         <param name="outfmt" type="select" label="Output format">
@@ -105,7 +105,7 @@
         </test>
     </tests>
     <help>
-    
+
 **What it does**
 
 Extracts FASTA formatted sequences from a BLAST database
@@ -138,5 +138,5 @@
 
 @REFERENCES@
     </help>
-    <expand macro="blast_citations" />    
+    <expand macro="blast_citations" />
 </tool>
b
diff -r 7538e2bfcd41 -r 6f386c5dc4fb tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml
--- a/tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml Wed Apr 19 05:27:19 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml Mon Sep 18 06:21:27 2017 -0400
b
@@ -6,11 +6,11 @@
     </macros>
     <expand macro="parallelism" />
     <expand macro="preamble" />
-    <command>
+    <command detect_errors="aggressive">
 ## The command is a Cheetah template which allows some Python based syntax.
 ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces
 blastn
--query "$query"
+-query '$query'
 @BLAST_DB_SUBJECT@
 -task $blast_type
 -evalue $evalue_cutoff
@@ -31,9 +31,9 @@
 #end if
     </command>
     <inputs>
-        <param name="query" type="data" format="fasta" label="Nucleotide query sequence(s)"/> 
+        <param argument="-query" type="data" format="fasta" label="Nucleotide query sequence(s)"/>
         <expand macro="input_conditional_nucleotide_db" />
-        <param name="blast_type" type="select" display="radio" label="Type of BLAST">
+        <param name="blast_type" argument="-task" type="select" display="radio" label="Type of BLAST">
             <option value="megablast">megablast - Traditional megablast used to find very similar (e.g., intraspecies or closely related species) sequences</option>
             <option value="blastn">blastn - Traditional BLASTN requiring an exact match of 11, for somewhat similar sequences</option>
             <option value="blastn-short">blastn-short - BLASTN program optimized for sequences shorter than 50 bases</option>
@@ -49,16 +49,14 @@
         <expand macro="input_out_format" />
         <expand macro="advanced_options">
             <!-- Could use a select (yes, no, other) where other allows setting 'level window linker' -->
-            <param name="filter_query" type="boolean" label="Filter out low complexity regions (with DUST)" truevalue="-dust yes" falsevalue="-dust no" checked="true" />
+            <param name="filter_query" argument="-dust" type="boolean" label="Filter out low complexity regions (with DUST)" truevalue="-dust yes" falsevalue="-dust no" checked="true" />
             <expand macro="input_strand" />
             <expand macro="input_max_hits" />
-            <param name="identity_cutoff" type="float" min="0" max="100" value="0" label="Percent identity cutoff (-perc_identity)" help="Use zero for no cutoff" />
-            
+            <param name="identity_cutoff" argument="-perc_identity" type="float" min="0" max="100" value="0" label="Percent identity cutoff" help="Use zero for no cutoff" />
+
             <!-- I'd like word_size to be optional, with minimum 4 for blastn -->
-            <param name="word_size" type="integer" value="0" label="Word size for wordfinder algorithm" help="Use zero for default, otherwise minimum 4.">
-                <validator type="in_range" min="0" />
-            </param>
-            <param name="ungapped" type="boolean" label="Perform ungapped alignment only?" truevalue="-ungapped" falsevalue="" checked="false" />
+            <param argument="-word_size" type="integer" min="0" value="0" label="Word size for wordfinder algorithm" help="Use zero for default, otherwise minimum 4" />
+            <param argument="-ungapped" type="boolean" label="Perform ungapped alignment only?" truevalue="-ungapped" falsevalue="" checked="false" />
             <expand macro="input_parse_deflines" />
             <expand macro="advanced_optional_id_files" />
             <expand macro="input_qcov_hsp_perc" />
@@ -134,6 +132,15 @@
             <param name="out_format" value="6" />
             <output name="output1" file="blastn_chimera_vs_rhodopsin_db.tabular" ftype="tabular" />
         </test>
+        <test>
+            <param name="query" value="chimera.fasta" ftype="fasta" />
+            <param name="db_opts_selector" value="db" />
+            <param name="database" value="rhodopsin_nucs" />
+            <param name="out_format" value="6" />
+            <param name="adv_opts_selector" value="advanced" />
+            <param name="max_hsps" value="1" />
+            <output name="output1" file="blastn_chimera_vs_rhodopsin_db_max_hsps1.tabular" ftype="tabular" />
+        </test>
         <!-- next test is passing in two blast databases -->
         <test>
             <param name="query" value="chimera.fasta" ftype="fasta" />
@@ -144,7 +151,7 @@
         </test>
     </tests>
     <help>
-    
+
 @SEARCH_TIME_WARNING@
 
 **What it does**
b
diff -r 7538e2bfcd41 -r 6f386c5dc4fb tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml
--- a/tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml Wed Apr 19 05:27:19 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml Mon Sep 18 06:21:27 2017 -0400
b
@@ -6,34 +6,34 @@
     </macros>
     <expand macro="parallelism" />
     <expand macro="preamble" />
-    <command>
+    <command detect_errors="aggressive">
 ## The command is a Cheetah template which allows some Python based syntax.
 ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces
 blastp
--query "$query"
+-query '$query'
 @BLAST_DB_SUBJECT@
 -task $blast_type
 -evalue $evalue_cutoff
 @BLAST_OUTPUT@
 @THREADS@
 #if $adv_opts.adv_opts_selector=="advanced":
--matrix $adv_opts.matrix
-@ADV_FILTER_QUERY@
-@ADV_MAX_HITS@
-@ADV_WORD_SIZE@
-##Ungapped disabled for now - see comments below
-##$adv_opts.ungapped
-@ADV_ID_LIST_FILTER@
-@ADV_QCOV_HSP_PERC@
-## End of advanced options:
+    -matrix $adv_opts.matrix
+    @ADV_FILTER_QUERY@
+    @ADV_MAX_HITS@
+    @ADV_WORD_SIZE@
+    ##Ungapped disabled for now - see comments below
+    ##$adv_opts.ungapped
+    @ADV_ID_LIST_FILTER@
+    @ADV_QCOV_HSP_PERC@
+    $adv_opts.use_sw_tback
 #end if
     </command>
     <inputs>
-        <param name="query" type="data" format="fasta" label="Protein query sequence(s)"/> 
+        <param argument="-query" type="data" format="fasta" label="Protein query sequence(s)"/>
 
         <expand macro="input_conditional_protein_db" />
 
-        <param name="blast_type" type="select" display="radio" label="Type of BLAST">
+        <param name="blast_type" argument="-task" type="select" display="radio" label="Type of BLAST">
             <option value="blastp">blastp - Traditional BLASTP to compare a protein query to a protein database</option>
             <option value="blastp-fast">blastp-fast - Use longer words for seeding, faster but less accurate</option>
             <option value="blastp-short">blastp-short - BLASTP optimized for queries shorter than 30 residues</option>
@@ -50,11 +50,12 @@
             Can't use '-ungapped' on its own, error back is:
             Composition-adjusted searched are not supported with an ungapped search, please add -comp_based_stats F or do a gapped search
             Tried using '-ungapped -comp_based_stats F' and blastp crashed with 'Attempt to access NULL pointer.'
-            <param name="ungapped" type="boolean" label="Perform ungapped alignment only?" truevalue="-ungapped -comp_based_stats F" falsevalue="" checked="false" />
+            <param argument="-ungapped" type="boolean" label="Perform ungapped alignment only?" truevalue="-ungapped -comp_based_stats F" falsevalue="" checked="false" />
             -->
             <expand macro="input_parse_deflines" />
             <expand macro="advanced_optional_id_files" />
             <expand macro="input_qcov_hsp_perc" />
+            <param argument="-use_sw_tback" type="boolean" truevalue="-use_sw_tback" falsevalue="" label="Compute locally optimal Smith-Waterman alignments" />
         </expand>
     </inputs>
     <outputs>
@@ -72,11 +73,11 @@
             <param name="blast_type" value="blastp" />
             <param name="out_format" value="5" />
             <param name="adv_opts_selector" value="advanced" />
-            <param name="filter_query" value="False" />
+            <param name="filter_query" value="false" />
             <param name="matrix" value="BLOSUM62" />
             <param name="max_hits" value="0" />
             <param name="word_size" value="0" />
-            <param name="parse_deflines" value="True" />
+            <param name="parse_deflines" value="true" />
             <param name="qcov_hsp_perc" value="25" />
             <output name="output1" file="blastp_four_human_vs_rhodopsin.xml" ftype="blastxml" />
         </test>
@@ -89,11 +90,11 @@
             <param name="blast_type" value="blastp" />
             <param name="out_format" value="6" />
             <param name="adv_opts_selector" value="advanced" />
-            <param name="filter_query" value="False" />
+            <param name="filter_query" value="false" />
             <param name="matrix" value="BLOSUM62" />
             <param name="max_hits" value="0" />
             <param name="word_size" value="0" />
-            <param name="parse_deflines" value="True" />
+            <param name="parse_deflines" value="true" />
             <param name="qcov_hsp_perc" value="25" />
             <output name="output1" file="blastp_four_human_vs_rhodopsin.tabular" ftype="tabular" />
         </test>
@@ -106,11 +107,11 @@
             <param name="blast_type" value="blastp" />
             <param name="out_format" value="ext" />
             <param name="adv_opts_selector" value="advanced" />
-            <param name="filter_query" value="False" />
+            <param name="filter_query" value="false" />
             <param name="matrix" value="BLOSUM62" />
             <param name="max_hits" value="0" />
             <param name="word_size" value="0" />
-            <param name="parse_deflines" value="True" />
+            <param name="parse_deflines" value="true" />
             <param name="qcov_hsp_perc" value="25" />
             <output name="output1" file="blastp_four_human_vs_rhodopsin_ext.tabular" ftype="tabular" />
         </test>
@@ -127,7 +128,7 @@
         </test>
     </tests>
     <help>
-    
+
 @SEARCH_TIME_WARNING@
 
 **What it does**
@@ -150,5 +151,5 @@
 
 @REFERENCES@
     </help>
-    <expand macro="blast_citations" />    
+    <expand macro="blast_citations" />
 </tool>
b
diff -r 7538e2bfcd41 -r 6f386c5dc4fb tools/ncbi_blast_plus/ncbi_blastx_wrapper.xml
--- a/tools/ncbi_blast_plus/ncbi_blastx_wrapper.xml Wed Apr 19 05:27:19 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_blastx_wrapper.xml Mon Sep 18 06:21:27 2017 -0400
b
@@ -6,11 +6,11 @@
     </macros>
     <expand macro="parallelism" />
     <expand macro="preamble" />
-    <command>
+    <command detect_errors="aggressive">
 ## The command is a Cheetah template which allows some Python based syntax.
 ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces
 blastx
--query "$query"
+-query '$query'
 @BLAST_DB_SUBJECT@
 -query_gencode $query_gencode
 -task $blast_type
@@ -30,11 +30,11 @@
 #end if
     </command>
     <inputs>
-        <param name="query" type="data" format="fasta" label="Nucleotide query sequence(s)"/> 
+        <param argument="-query" type="data" format="fasta" label="Nucleotide query sequence(s)"/>
 
         <expand macro="input_conditional_protein_db" />
         <expand macro="input_query_gencode" />
-        <param name="blast_type" type="select" display="radio" label="Type of BLAST">
+        <param name="blast_type" argument="-task" type="select" display="radio" label="Type of BLAST">
             <option value="blastx">blastx - Traditional BLASTX to compare translated nucleotide query to protein database</option>
             <option value="blastx-fast">blastx-fast - Use longer words for seeding, faster but less accurate</option>
         </param>
@@ -48,7 +48,7 @@
             <expand macro="input_scoring_matrix" />
             <expand macro="input_max_hits" />
             <expand macro="input_word_size" />
-            <param name="ungapped" type="boolean" label="Perform ungapped alignment only?" truevalue="-ungapped" falsevalue="" checked="false" />
+            <param argument="-ungapped" type="boolean" label="Perform ungapped alignment only?" truevalue="-ungapped" falsevalue="" checked="false" />
             <expand macro="input_parse_deflines" />
             <expand macro="advanced_optional_id_files" />
             <expand macro="input_qcov_hsp_perc" />
@@ -107,7 +107,7 @@
         </test>
     </tests>
     <help>
-    
+
 @SEARCH_TIME_WARNING@
 
 **What it does**
b
diff -r 7538e2bfcd41 -r 6f386c5dc4fb tools/ncbi_blast_plus/ncbi_convert2blastmask_wrapper.xml
--- a/tools/ncbi_blast_plus/ncbi_convert2blastmask_wrapper.xml Wed Apr 19 05:27:19 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_convert2blastmask_wrapper.xml Mon Sep 18 06:21:27 2017 -0400
b
@@ -5,36 +5,36 @@
         <import>ncbi_macros.xml</import>
     </macros>
     <expand macro="preamble" />
-    <command>
+    <command detect_errors="aggressive">
 ## The command is a Cheetah template which allows some Python based syntax.
 ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces
 convert2blastmask
--in $infile
--masking_algorithm "$masking_algorithm"
--masking_options "$masking_options"
+-in '$infile'
+-masking_algorithm '$masking_algorithm'
+-masking_options '$masking_options'
 $parse_seqids
--out "$outfile"
+-out '$outfile'
 -outfmt $outformat
     </command>
     <inputs>
-        <param name="infile" type="data" format="fasta" label="masked FASTA file"/> 
-        <param name="masking_algorithm" type="select" label="Used masking algorithm">
+        <param name="infile" argument="-in" type="data" format="fasta" label="Masked FASTA file"/>
+        <param argument="-masking_algorithm" type="select" label="Used masking algorithm">
             <option value="dust">DUST</option>
             <option value="seg" selected="true">SEG</option>
             <option value="windowmasker">windowmasker</option>
             <option value="repeat">repeat</option>
             <option value="other">other</option>
         </param>
-        <param name="masking_options" type="text" value="" size="20" label="Masking algorithm options to create the masked input" 
-            help ="free text to describe the options used to create the masking files. (-masking_options)">
+        <param argument="-masking_options" type="text" value="" size="20" label="Masking algorithm options to create the masked input"
+            help ="Free text to describe the options used to create the masking files">
             <sanitizer invalid_char="">
                 <valid initial="string.printable" />
             </sanitizer>
         </param>
-        <param name="parse_seqids" type="boolean" truevalue="-parse_seqids" falsevalue="" checked="true" label="Parse Seq-ids in FASTA input" help="(-parse_seqids)" />
-        <param name="outformat" type="select" label="Output format">
+        <param argument="-parse_seqids" type="boolean" truevalue="-parse_seqids" falsevalue="" checked="true" label="Parse Seq-ids in FASTA input" help="(-parse_seqids)" />
+        <param name="outformat" argument="-outfmt" type="select" label="Output format">
             <option value="maskinfo_asn1_bin">maskinfo ASN.1 binary</option>
-            <option value="maskinfo_asn1_text" selected="True">maskinfo ASN.1 text</option>
+            <option value="maskinfo_asn1_text" selected="true">maskinfo ASN.1 text</option>
             <option value="maskinfo_xml">maskinfo_xml</option>
         </param>
     </inputs>
@@ -42,9 +42,9 @@
         <data name="outfile" format="maskinfo-asn1" label="SEG Masked File">
             <change_format>
                 <when input="outformat" value="maskinfo_asn1_bin" format="maskinfo-asn1-binary" />
- <!--
+                <!--
                 <when input="outformat" value="maskinfo_asn1_text" format="maskinfo-asn1" />
- -->
+                -->
                 <when input="outformat" value="maskinfo_xml" format="xml" />
             </change_format>
         </data>
@@ -54,7 +54,7 @@
             <param name="infile" value="four_human_proteins_masked.fasta" ftype="fasta" />
             <param name="masking_algorithm" value="seg" />
             <param name="masking_options" value="window=12; locut=2.2; hicut=2.5" />
-            <param name="parse_seqids" value="True" />
+            <param name="parse_seqids" value="true" />
             <param name="outformat" value="maskinfo_asn1_bin" />
             <output name="outfile" file="convert2blastmask_four_human_masked.maskinfo-asn1-binary" />
         </test>
@@ -62,7 +62,7 @@
             <param name="infile" value="four_human_proteins_masked.fasta" ftype="fasta" />
             <param name="masking_algorithm" value="seg" />
             <param name="masking_options" value="window=12; locut=2.2; hicut=2.5" />
-            <param name="parse_seqids" value="True" />
+            <param name="parse_seqids" value="true" />
             <param name="outformat" value="maskinfo_asn1_text" />
             <output name="outfile" file="convert2blastmask_four_human_masked.maskinfo-asn1" />
         </test>
b
diff -r 7538e2bfcd41 -r 6f386c5dc4fb tools/ncbi_blast_plus/ncbi_dustmasker_wrapper.xml
--- a/tools/ncbi_blast_plus/ncbi_dustmasker_wrapper.xml Wed Apr 19 05:27:19 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_dustmasker_wrapper.xml Mon Sep 18 06:21:27 2017 -0400
b
@@ -6,26 +6,26 @@
         <import>ncbi_macros.xml</import>
     </macros>
     <expand macro="preamble" />
-    <command>
+    <command detect_errors="aggressive">
 ## The command is a Cheetah template which allows some Python based syntax.
 ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces
 dustmasker
 #if $db_opts.db_opts_selector == "db":
-  -in "${db_opts.database.fields.path}" -infmt blastdb
+  -in '${db_opts.database.fields.path}' -infmt blastdb
 #elif $db_opts.db_opts_selector == "histdb":
-  -in "${os.path.join($db_opts.histdb.files_path, 'blastdb')}" -infmt blastdb
+  -in '${os.path.join($db_opts.histdb.files_path, "blastdb")}' -infmt blastdb
 #else:
-  -in "$subject" -infmt fasta
+  -in '$subject' -infmt fasta
 #end if
--out "$outfile"
+-out '$outfile'
 -window $window -level $level -linker $linker -outfmt $outformat
     </command>
     <inputs>
         <expand macro="input_conditional_nucleotide_db" />
-        <param name="window" type="integer" value="64" label="DUST window length" />
-        <param name="level" type="integer" value="20" label="DUST level" help="Score threshold for subwindows" />
-        <param name="linker" type="integer" value="1" label="DUST linker" help="How close masked intervals should be to get merged together" />
-        <param name="outformat" type="select" label="Output format">
+        <param argument="-window" type="integer" value="64" label="DUST window length" />
+        <param argument="-level" type="integer" value="20" label="DUST level" help="Score threshold for subwindows" />
+        <param argument="-linker" type="integer" value="1" label="DUST linker" help="How close masked intervals should be to get merged together" />
+        <param name="outformat" argument="-outfmt" type="select" label="Output format">
             <!-- seqloc_* formats are not very useful
                  and what BLAST+ calls 'interval' is not what Galaxy calls interval format
             -->
@@ -40,9 +40,9 @@
             <change_format>
                 <when input="outformat" value="fasta" format="fasta" />
                 <when input="outformat" value="maskinfo_asn1_bin" format="maskinfo-asn1-binary" />
- <!--
+                <!--
                 <when input="outformat" value="maskinfo_asn1_text" format="maskinfo-asn1" />
- -->
+                -->
                 <when input="outformat" value="maskinfo_xml" format="xml" />
             </change_format>
         </data>
b
diff -r 7538e2bfcd41 -r 6f386c5dc4fb tools/ncbi_blast_plus/ncbi_macros.xml
--- a/tools/ncbi_blast_plus/ncbi_macros.xml Wed Apr 19 05:27:19 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_macros.xml Mon Sep 18 06:21:27 2017 -0400
[
b'@@ -1,5 +1,5 @@\n <macros>\n-    <token name="@WRAPPER_VERSION@">0.2.00</token>\n+    <token name="@WRAPPER_VERSION@">0.2.01</token>\n     <xml name="parallelism">\n         <!-- If job splitting is enabled, break up the query file into parts -->\n         <parallelism method="multi" split_inputs="query" split_mode="to_size" split_size="1000" merge_outputs="output1" />\n@@ -8,15 +8,6 @@\n         <requirements>\n             <requirement type="package" version="2.5.0">blast</requirement>\n         </requirements>\n-        <stdio>\n-            <!-- Anything other than zero is an error -->\n-            <exit_code range="1:" />\n-            <!-- Might see negative return codes for Unix signals via Python subprocess -->\n-            <exit_code range=":-1" />\n-            <!-- In case the return code has not been set properly check stderr too -->\n-            <regex match="Error:" />\n-            <regex match="Exception:" />\n-        </stdio>\n         <version_command>@BINARY@ -version</version_command>\n     </xml>\n     <xml name="output_change_format">\n@@ -32,9 +23,9 @@\n     </xml>\n     <xml name="input_out_format">\n         <conditional name="output">\n-            <param name="out_format" type="select" label="Output format">\n+            <param name="out_format" argument="-outfmt" type="select" label="Output format">\n                 <option value="6">Tabular (standard 12 columns)</option>\n-                <option value="ext" selected="True">Tabular (extended 25 columns)</option>\n+                <option value="ext" selected="true">Tabular (extended 25 columns)</option>\n                 <option value="cols">Tabular (select which columns)</option>\n                 <option value="5">BLAST XML</option>\n                 <option value="0">Pairwise text</option>\n@@ -118,11 +109,11 @@\n         </conditional>\n     </xml>\n     <xml name="input_scoring_matrix">\n-        <param name="matrix" type="select" label="Scoring matrix">\n+        <param argument="-matrix" type="select" label="Scoring matrix">\n             <option value="BLOSUM90">BLOSUM90</option>\n             <option value="BLOSUM80">BLOSUM80</option>\n             <option value="BLOSUM62" selected="true">BLOSUM62 (default)</option>\n-            <option value="BLOSUM50">BLOSUM50</option> \n+            <option value="BLOSUM50">BLOSUM50</option>\n             <option value="BLOSUM45">BLOSUM45</option>\n             <option value="PAM250">PAM250</option>\n             <option value="PAM70">PAM70</option>\n@@ -130,9 +121,9 @@\n         </param>\n     </xml>\n     <xml name="input_query_gencode">\n-        <param name="query_gencode" type="select" label="Query genetic code">\n+        <param argument="-query_gencode" type="select" label="Query genetic code">\n             <!-- See http://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi for details -->\n-            <option value="1" selected="True">1. Standard</option>\n+            <option value="1" selected="true">1. Standard</option>\n             <option value="2">2. Vertebrate Mitochondrial</option>\n             <option value="3">3. Yeast Mitochondrial</option>\n             <option value="4">4. Mold, Protozoan, and Coelenterate Mitochondrial Code and the Mycoplasma/Spiroplasma Code</option>\n@@ -153,9 +144,9 @@\n         </param>\n     </xml>\n     <xml name="input_db_gencode">\n-        <param name="db_gencode" type="select" label="Database/subject genetic code">\n+        <param argument="-db_gencode" type="select" label="Database/subject genetic code">\n             <!-- See http://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi for details -->\n-            <option value="1" selected="True">1. Standard</option>\n+            <option value="1" selected="true">1. Standard</option>\n             <option value="2">2. Vertebrate Mitochondrial</option>\n             <option value="3">3. Yeast Mitochondrial</option>\n             <option value="4">4. Mold, Protozoan, and Coelenterate Mitochondrial Code and the Mycoplasma/Spiroplasma Code</option>\n@@ -176,9 +167,10 @@\n'..b'for database searches."/>\n             </when>\n             <when value="seqidlist">\n-                <param name="seqidlist" type="data" format="txt" label=" Restrict search of database to list of SeqId\'s"\n+                <param argument="-seqidlist" type="data" format="txt" label=" Restrict search of database to list of SeqId\'s"\n                        help="This option is only available for database searches."/>\n             </when>\n         </conditional>\n@@ -351,23 +341,24 @@\n     <token name="@THREADS@">-num_threads "\\${GALAXY_SLOTS:-8}"</token>\n     <token name="@BLAST_DB_SUBJECT@">\n #if $db_opts.db_opts_selector == "db":\n-  -db "${\' \'.join(str( $db_opts.database.fields.path ).split( \',\' ))}"\n+  -db \'${" ".join(str($db_opts.database.fields.path).split(","))}\'\n #elif $db_opts.db_opts_selector == "histdb":\n-  -db "${os.path.join($db_opts.histdb.extra_files_path,\'blastdb\')}"\n+  -db \'${os.path.join($db_opts.histdb.extra_files_path, "blastdb")}\'\n #else:\n-  -subject "$db_opts.subject"\n+  -subject \'$db_opts.subject\'\n #end if\n     </token>\n-    <token name="@BLAST_OUTPUT@">-out "$output1"\n+    <token name="@BLAST_OUTPUT@">-out \'$output1\'\n ##Set the extended list here so when we add things, saved workflows are not affected\n #if str($output.out_format)=="ext":\n-    -outfmt "6 std sallseqid score nident positive gaps ppos qframe sframe qseq sseq qlen slen salltitles"\n+    -outfmt \'6 std sallseqid score nident positive gaps ppos qframe sframe qseq sseq qlen slen salltitles\'\n #elif str($output.out_format)=="cols"\n ##Pick your own columns. Galaxy gives us it comma separated, BLAST+ wants space separated:\n ##TODO - Can we catch the user picking no columns and raise an error here?\n #set cols = (str($output.std_cols)+","+str($output.ext_cols)+","+str($output.ids_cols)+","+str($output.misc_cols)+","+str($output.tax_cols)).replace("None", "").replace(",,", ",").replace(",", " ").strip()\n-    -outfmt "6 $cols"\n+    -outfmt \'6 $cols\'\n #else:\n+## Note do not quote this as can be \'0 -html\' which is really two arguments\n     -outfmt $output.out_format\n #end if\n     </token>\n@@ -377,13 +368,16 @@\n ## Note -max_target_seqs used to simply override -num_descriptions and -num_alignments\n ## but this was changed in BLAST+ 2.2.27 onwards to force their use (raised with NCBI)\n #if (str($adv_opts.max_hits) and int(str($adv_opts.max_hits)) > 0):\n-#if str($output.out_format) in ["6", "ext", "cols", "5"]:\n-## Most output formats use this, including tabular and XML:\n--max_target_seqs $adv_opts.max_hits\n-#else\n-## Text and HTML output formats 0-4 currently need this instead:\n--num_descriptions $adv_opts.max_hits -num_alignments $adv_opts.max_hits\n+    #if str($output.out_format) in ["6", "ext", "cols", "5"]:\n+        ## Most output formats use this, including tabular and XML:\n+        -max_target_seqs $adv_opts.max_hits\n+    #else\n+        ## Text and HTML output formats 0-4 currently need this instead:\n+        -num_descriptions $adv_opts.max_hits -num_alignments $adv_opts.max_hits\n+    #end if\n #end if\n+#if str($adv_opts.max_hsps)\n+    -max_hsps $adv_opts.max_hsps\n #end if\n     </token>\n     <token name="@ADV_WORD_SIZE@">\n@@ -394,11 +388,11 @@\n     </token>\n     <!-- @ON_DB_SUBJECT@ is for use with @BLAST_DB_SUBJECT@ -->\n     <token name="@ON_DB_SUBJECT@">#if str($db_opts.db_opts_selector)==\'db\'\n-${db_opts.database}\n+\'${db_opts.database}\'\n #elif str($db_opts.db_opts_selector)==\'histdb\'\n-${db_opts.histdb.name}\n+\'${db_opts.histdb.name}\'\n #else\n-${db_opts.subject.name}\n+\'${db_opts.subject.name}\'\n #end if</token>\n     <token name="@REFERENCES@">\n Peter J. A. Cock, John M. Chilton, Bj\xc3\xb6rn Gr\xc3\xbcning, James E. Johnson, Nicola Soranzo (2015).\n@@ -491,7 +485,7 @@\n     <token name="@SEARCH_TIME_WARNING@">.. class:: warningmark\n \n **Note**. Database searches may take a substantial amount of time.\n-For large input datasets it is advisable to allow overnight processing.  \n+For large input datasets it is advisable to allow overnight processing.\n \n -----\n     </token>\n'
b
diff -r 7538e2bfcd41 -r 6f386c5dc4fb tools/ncbi_blast_plus/ncbi_makeblastdb.xml
--- a/tools/ncbi_blast_plus/ncbi_makeblastdb.xml Wed Apr 19 05:27:19 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_makeblastdb.xml Mon Sep 18 06:21:27 2017 -0400
b
b'@@ -5,23 +5,24 @@\n         <import>ncbi_macros.xml</import>\n     </macros>\n     <expand macro="preamble" />\n-    <command interpreter="python">check_no_duplicates.py\n+    <command detect_errors="aggressive" strict="true">\n+python $__tool_directory__/check_no_duplicates.py\n ##First check for duplicates (since BLAST+ 2.2.28 fails to do so)\n ##and abort (via the ampersand ampersand trick) if any are found.\n-#for i in $input_file#"${i}" #end for#\n+#for i in $input_file#\'${i}\' #end for#\n &amp;&amp;\n-makeblastdb -out "${os.path.join($outfile.files_path,\'blastdb\')}"\n+makeblastdb -out \'${os.path.join($outfile.files_path, "blastdb")}\'\n $parse_seqids\n $hash_index\n ## Single call to -in with multiple filenames space separated with outer quotes\n ## (presumably any filenames with spaces would be a problem). Note this gives\n ## some extra spaces, e.g. -in "file1 file2 file3 " but BLAST seems happy:\n--in "#for i in $input_file#${i} #end for#"\n+-in \'#for i in $input_file#${i} #end for#\'\n #if $title:\n--title "$title"\n+-title \'$title\'\n #else:\n ##Would default to being based on the cryptic Galaxy filenames, which is unhelpful\n--title "BLAST Database"\n+-title \'BLAST Database\'\n #end if\n -dbtype $dbtype\n ## --------------------------------------------------------------------\n@@ -31,7 +32,7 @@\n ## See Trello issue https://trello.com/c/lp5YmA1O\n #if \' \'.join( map(str, $mask_data_file) ) != \'None\':\n #for i in $mask_data_file:\n--mask_data "${i}"\n+-mask_data \'${i}\'\n #end for\n #end if\n ## --------------------------------------------------------------------\n@@ -48,7 +49,7 @@\n &gt; "$outfile"\n     </command>\n     <inputs>\n-        <param name="dbtype" type="select" display="radio" label="Molecule type of input">\n+        <param argument="-dbtype" type="select" display="radio" label="Molecule type of input">\n             <option value="prot">protein</option>\n             <option value="nucl">nucleotide</option>\n         </param>\n@@ -56,13 +57,13 @@\n              NOTE Double check the new database would be self contained first\n         -->\n         <!-- Note this is a mandatory parameter - default should be most recent FASTA file -->\n-        <param name="input_file" type="data" multiple="true" optional="false" format="fasta" label="Input FASTA files(s)" help="One or more FASTA files" />\n-        <param name="title" type="text" value="" label="Title for BLAST database" help="This is the database name shown in BLAST search output" />\n-        <param name="parse_seqids" type="boolean" truevalue="-parse_seqids" falsevalue="" checked="False" label="Parse the sequence identifiers" help="This is only advised if your FASTA file follows the NCBI naming conventions using pipe \'|\' symbols" />\n-        <param name="hash_index" type="boolean" truevalue="-hash_index" falsevalue="" checked="true" label="Enable the creation of sequence hash values" help="These hash values can then be used to quickly determine if a given sequence data exists in this BLAST database." />\n+        <param name="input_file" argument="-in" type="data" multiple="true" optional="false" format="fasta" label="Input FASTA files(s)" help="One or more FASTA files" />\n+        <param argument="-title" type="text" value="" label="Title for BLAST database" help="This is the database name shown in BLAST search output" />\n+        <param argument="-parse_seqids" type="boolean" truevalue="-parse_seqids" falsevalue="" checked="false" label="Parse the sequence identifiers" help="This is only advised if your FASTA file follows the NCBI naming conventions using pipe \'|\' symbols" />\n+        <param argument="-hash_index" type="boolean" truevalue="-hash_index" falsevalue="" checked="true" label="Enable the creation of sequence hash values" help="These hash values can then be used to quickly determine if a given sequence data exists in this BLAST database." />\n         <!-- SEQUENCE MASKING OPTIONS -->\n         <!-- Note this is an optional parameter - default should be NO files -->\n-        <param name="mask_data_'..b'TODO - Option to create GI indexed masking data? via -gi_mask and -gi_mask_name? -->\n         <!-- TAXONOMY OPTIONS -->\n         <conditional name="tax">\n@@ -76,11 +77,11 @@\n             <when value="">\n             </when>\n             <when value="id">\n-                <param name="taxid" type="integer" value="" label="NCBI taxonomy ID" help="Integer &gt;=0, e.g. 9606 for Homo sapiens" min="0" />\n+                <param argument="-taxid" type="integer" min="0" value="" label="NCBI taxonomy ID" help="Integer &gt;=0, e.g. 9606 for Homo sapiens" />\n             </when>\n             <!-- TODO: File format?\n             <when value="map">\n-                <param name="taxmap" type="data" format="txt" label="Seq ID : Tax ID mapping file" help="Format: SequenceId TaxonomyId" />\n+                <param name="taxmap" argument="-taxid_map" type="data" format="txt" label="Seq ID : Tax ID mapping file" help="Format: SequenceId TaxonomyId" />\n             </when>\n             -->\n         </conditional>\n@@ -107,7 +108,7 @@\n             <param name="title" value="Just 4 human proteins" />\n             <param name="parse_seqids" value="" />\n             <param name="hash_index" value="true" />\n-            <output name="out_file" compare="contains" file="four_human_proteins.fasta.log.txt" ftype="blastdbp">\n+            <output name="outfile" compare="contains" file="four_human_proteins.fasta.log.txt" ftype="blastdbp">\n                 <extra_files type="file" value="four_human_proteins.fasta.phr" name="blastdb.phr" />\n                 <extra_files type="file" value="four_human_proteins.fasta.pin" name="blastdb.pin" lines_diff="2" />\n                 <extra_files type="file" value="four_human_proteins.fasta.psq" name="blastdb.psq" />\n@@ -126,7 +127,7 @@\n             <param name="hash_index" value="true" />\n             <param name="taxselect" value="id" />\n             <param name="taxid" value="9606" />\n-            <output name="out_file" compare="contains" file="four_human_proteins_taxid.fasta.log.txt" ftype="blastdbp">\n+            <output name="outfile" compare="contains" file="four_human_proteins_taxid.fasta.log.txt" ftype="blastdbp">\n                 <extra_files type="file" value="four_human_proteins_taxid.fasta.phr" name="blastdb.phr" />\n                 <extra_files type="file" value="four_human_proteins_taxid.fasta.pin" name="blastdb.pin" lines_diff="2" />\n                 <extra_files type="file" value="four_human_proteins_taxid.fasta.psq" name="blastdb.psq" />\n@@ -144,7 +145,7 @@\n             <param name="parse_seqids" value="" />\n             <param name="hash_index" value="true" />\n             <param name="mask_data_file" value="segmasker_four_human.maskinfo-asn1" ftype="maskinfo-asn1" />\n-            <output name="out_file" compare="contains" file="four_human_proteins.fasta.log.txt" ftype="blastdbp">\n+            <output name="outfile" compare="contains" file="four_human_proteins.fasta.log.txt" ftype="blastdbp">\n                 <extra_files type="file" value="four_human_proteins.fasta.phr" name="blastdb.phr" />\n                 <extra_files type="file" value="four_human_proteins.fasta.pin" name="blastdb.pin" lines_diff="2" />\n                 <extra_files type="file" value="four_human_proteins.fasta.psq" name="blastdb.psq" />\n@@ -163,7 +164,7 @@\n             <param name="hash_index" value="true" />\n             <param name="taxselect" value="id" />\n             <param name="taxid" value="9606" />\n-            <output name="out_file" compare="contains" file="three_human_mRNA.fasta.log.txt" ftype="blastdbn">\n+            <output name="outfile" compare="contains" file="three_human_mRNA.fasta.log.txt" ftype="blastdbn">\n                 <extra_files type="file" value="three_human_mRNA.fasta.nhr" name="blastdb.nhr" />\n                 <extra_files type="file" value="three_human_mRNA.fasta.nin" name="blastdb.nin" lines_diff="2" />\n                 <extra_files type="file" value="three_human_mRNA.fasta.nsq" name="blastdb.nsq" />\n'
b
diff -r 7538e2bfcd41 -r 6f386c5dc4fb tools/ncbi_blast_plus/ncbi_makeprofiledb.xml
--- a/tools/ncbi_blast_plus/ncbi_makeprofiledb.xml Wed Apr 19 05:27:19 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_makeprofiledb.xml Mon Sep 18 06:21:27 2017 -0400
b
@@ -5,19 +5,19 @@
         <import>ncbi_macros.xml</import>
     </macros>
     <expand macro="preamble" />
-    <command>
+    <command detect_errors="aggressive" strict="true">
 ##Unlike makeblastdb, makeprofiledb needs directory to exist already:
 mkdir -p $outfile.files_path &amp;&amp;
-makeprofiledb -out "${os.path.join($outfile.files_path,'blastdb')}"
+makeprofiledb -out '${os.path.join($outfile.files_path, "blastdb")}'
 
-##We turn $infile_list into $infiles with a configfile entry defined below
--in $infiles
+##We turn $input_file into $infiles with a configfile entry defined below
+-in '$infiles'
 
 #if $title:
--title "$title"
+-title '$title'
 #else:
 ##Would default to being based on the cryptic Galaxy filenames, which is unhelpful
--title "Profile Database"
+-title 'Profile Database'
 #end if
 
 -threshold $threshold
@@ -32,7 +32,7 @@
 -obsr_threshold $obsr_threshold
 -exclude_invalid $exclude_invalid
 
--logfile "$outfile"
+-logfile '$outfile'
     </command>
     <configfiles>
         <configfile name="infiles">
@@ -42,13 +42,12 @@
         </configfile>
     </configfiles>
     <inputs>
-        <param name="input_file" type="data" multiple="true" optional="false" format="pssm-asn1"
-        label="Input PSSM files(s)"
-        help="One or NCBI PSSM ASN.1 format scoremat files (often named *.smp)" />
-        <param name="infile_list" type="data" multiple="true" format="pssm-asn1" />
+        <param name="input_file" argument="-in" type="data" multiple="true" optional="false" format="pssm-asn1"
+               label="Input PSSM files(s)"
+               help="One or NCBI PSSM ASN.1 format scoremat files (often named *.smp)" />
 
-        <param name="title" type="text" value="" label="Title for the profile database" help="This is the database name shown in BLAST search output" />
-        <param name="threshold" type="float" size="5" value="9.82" label="Minimum word score to add a word to the lookup table" />
+        <param argument="-title" type="text" value="" label="Title for the profile database" help="This is the database name shown in BLAST search output" />
+        <param argument="-threshold" type="float" size="5" value="9.82" label="Minimum word score to add a word to the lookup table" />
 
         <!-- output options -->
         <!-- Initially we're only offering the default, RPS databases for use with rpsblast and rpstblastn
@@ -61,24 +60,24 @@
 
         <conditional name="contain_pssm_scores">
             <param name="contain_pssm_scores_type" type="select" label="Does your input file contain PSSM scores?">
-              <option value="yes" selected="True">Yes</option>
+              <option value="yes" selected="true">Yes</option>
               <option value="no">No</option>
             </param>
             <when value="yes" />
             <when value="no">
-                <param name="gapopen" type="integer" size="5" value="" label="Cost to open a gap" />
-                <param name="gapextend" type="integer" size="5" value="" label="Cost to extend a gap" />
-                <param name="scale" type="float" size="5" value="" label="PSSM scale factor" />
+                <param argument="-gapopen" type="integer" size="5" value="" label="Cost to open a gap" />
+                <param argument="-gapextend" type="integer" size="5" value="" label="Cost to extend a gap" />
+                <param argument="-scale" type="float" size="5" value="" label="PSSM scale factor" />
                 <expand macro="input_scoring_matrix" />
             </when>
         </conditional>
 
         <!--  Delta Blast Options -->
-        <param name="exclude_invalid" type="boolean" truevalue="true" falsevalue="false" checked="true" 
+        <param argument="-exclude_invalid" type="boolean" truevalue="true" falsevalue="false" checked="true"
             label="Exclude invalid domains?"
             help="Exclude domains that do not pass validation test" />
-        <param name="obsr_threshold" type="float" size="5" value="6.0"
-            label="Observation threshold"            
+        <param argument="-obsr_threshold" type="float" size="5" value="6.0"
+            label="Observation threshold"
             help="Exclude domains with with maximum number of independent observations below this threshold" />
     </inputs>
     <outputs>
@@ -89,7 +88,7 @@
             <param name="input_file" value="cd00003.smp,cd00008.smp" ftype="pssm-asn1" />
             <param name="title" value="Just 2 PSSM matrices" />
             <param name="contain_pssm_scores_type" value="yes" />
-            <output name="out_file" file="empty_file.dat" ftype="blastdbd" >
+            <output name="outfile" file="empty_file.dat" ftype="blastdbd" >
                 <extra_files type="file" value="cd00003_and_cd00008.phr" name="blastdb.phr" />
                 <extra_files type="file" value="cd00003_and_cd00008.pin" name="blastdb.pin" lines_diff="2" />
                 <extra_files type="file" value="cd00003_and_cd00008.psq" name="blastdb.psq" />
b
diff -r 7538e2bfcd41 -r 6f386c5dc4fb tools/ncbi_blast_plus/ncbi_rpsblast_wrapper.xml
--- a/tools/ncbi_blast_plus/ncbi_rpsblast_wrapper.xml Wed Apr 19 05:27:19 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_rpsblast_wrapper.xml Mon Sep 18 06:21:27 2017 -0400
b
@@ -6,15 +6,15 @@
     </macros>
     <expand macro="parallelism" />
     <expand macro="preamble" />
-    <command>
+    <command detect_errors="aggressive">
 ## The command is a Cheetah template which allows some Python based syntax.
 ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces
 rpsblast
--query "$query"
+-query '$query'
 #if $db_opts.db_opts_selector == "db":
-  -db "${db_opts.database.fields.path}"
+  -db '${db_opts.database.fields.path}'
 #elif $db_opts.db_opts_selector == "histdb":
-  -db "${os.path.join($db_opts.histdb.files_path,'blastdb')}"
+  -db '${os.path.join($db_opts.histdb.files_path, "blastdb")}'
 #end if
 -evalue $evalue_cutoff
 @BLAST_OUTPUT@
@@ -27,7 +27,7 @@
 #end if
     </command>
     <inputs>
-        <param name="query" type="data" format="fasta" label="Protein query sequence(s)"/> 
+        <param argument="-query" type="data" format="fasta" label="Protein query sequence(s)"/>
 
         <expand macro="input_conditional_pssm" />
 
@@ -61,7 +61,7 @@
         </test>
     </tests>
     <help>
-    
+
 @SEARCH_TIME_WARNING@
 
 **What it does**
@@ -76,7 +76,7 @@
 http://www.ncbi.nlm.nih.gov/Structure/cdd/cdd_help.shtml#NCBI_curated_domains
 
 *Kog* - PSSMs from automatically aligned sequences and sequence
-fragments classified in the KOGs resource, the eukaryotic 
+fragments classified in the KOGs resource, the eukaryotic
 counterpart to COGs, see http://www.ncbi.nlm.nih.gov/COG/
 
 *Cog* - PSSMs from automatically aligned sequences and sequence
b
diff -r 7538e2bfcd41 -r 6f386c5dc4fb tools/ncbi_blast_plus/ncbi_rpstblastn_wrapper.xml
--- a/tools/ncbi_blast_plus/ncbi_rpstblastn_wrapper.xml Wed Apr 19 05:27:19 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_rpstblastn_wrapper.xml Mon Sep 18 06:21:27 2017 -0400
b
@@ -6,15 +6,15 @@
     </macros>
     <expand macro="parallelism" />
     <expand macro="preamble" />
-    <command>
+    <command detect_errors="aggressive">
 ## The command is a Cheetah template which allows some Python based syntax.
 ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces
 rpstblastn
--query "$query"
+-query '$query'
 #if $db_opts.db_opts_selector == "db":
-  -db "${db_opts.database.fields.path}"
+  -db '${db_opts.database.fields.path}'
 #elif $db_opts.db_opts_selector == "histdb":
-  -db "${os.path.join($db_opts.histdb.files_path,'blastdb')}"
+  -db '${os.path.join($db_opts.histdb.files_path, "blastdb")}'
 #end if
 -evalue $evalue_cutoff
 @BLAST_OUTPUT@
@@ -28,7 +28,7 @@
 #end if
     </command>
     <inputs>
-        <param name="query" type="data" format="fasta" label="Nucleotide query sequence(s)"/> 
+        <param argument="-query" type="data" format="fasta" label="Nucleotide query sequence(s)"/>
 
         <expand macro="input_conditional_pssm" />
 
@@ -61,7 +61,7 @@
         </test>
     </tests>
     <help>
-    
+
 @SEARCH_TIME_WARNING@
 
 **What it does**
@@ -76,7 +76,7 @@
 http://www.ncbi.nlm.nih.gov/Structure/cdd/cdd_help.shtml#NCBI_curated_domains
 
 *Kog* - PSSMs from automatically aligned sequences and sequence
-fragments classified in the KOGs resource, the eukaryotic 
+fragments classified in the KOGs resource, the eukaryotic
 counterpart to COGs, see http://www.ncbi.nlm.nih.gov/COG/
 
 *Cog* - PSSMs from automatically aligned sequences and sequence
b
diff -r 7538e2bfcd41 -r 6f386c5dc4fb tools/ncbi_blast_plus/ncbi_segmasker_wrapper.xml
--- a/tools/ncbi_blast_plus/ncbi_segmasker_wrapper.xml Wed Apr 19 05:27:19 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_segmasker_wrapper.xml Mon Sep 18 06:21:27 2017 -0400
b
@@ -5,18 +5,18 @@
         <import>ncbi_macros.xml</import>
     </macros>
     <expand macro="preamble" />
-    <command>
+    <command detect_errors="aggressive">
 ## The command is a Cheetah template which allows some Python based syntax.
 ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces
 segmasker
 #if $db_opts.db_opts_selector == "db":
-  -in "${db_opts.database.fields.path}" -infmt blastdb
+  -in '${db_opts.database.fields.path}' -infmt blastdb
 #elif $db_opts.db_opts_selector == "histdb":
-  -in "${os.path.join($db_opts.histdb.files_path, 'blastdb')}" -infmt blastdb
+  -in '${os.path.join($db_opts.histdb.files_path, "blastdb")}' -infmt blastdb
 #else:
-  -in "$subject" -infmt fasta
+  -in '$subject' -infmt fasta
 #end if
--out "$outfile"
+-out '$outfile'
 -window $window
 -locut $locut
 -hicut $hicut
@@ -42,9 +42,9 @@
             <change_format>
                 <when input="outformat" value="fasta" format="fasta" />
                 <when input="outformat" value="maskinfo_asn1_bin" format="maskinfo-asn1-binary" />
- <!--
+                <!--
                 <when input="outformat" value="maskinfo_asn1_text" format="maskinfo-asn1" />
- -->
+                -->
                 <when input="outformat" value="maskinfo_xml" format="xml" />
             </change_format>
         </data>
b
diff -r 7538e2bfcd41 -r 6f386c5dc4fb tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml
--- a/tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml Wed Apr 19 05:27:19 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml Mon Sep 18 06:21:27 2017 -0400
b
@@ -6,11 +6,11 @@
     </macros>
     <expand macro="parallelism" />
     <expand macro="preamble" />
-    <command>
+    <command detect_errors="aggressive">
 ## The command is a Cheetah template which allows some Python based syntax.
 ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces
 tblastn
--query "$query"
+-query '$query'
 @BLAST_DB_SUBJECT@
 -task $blast_type
 -evalue $evalue_cutoff
@@ -30,10 +30,10 @@
 #end if
     </command>
     <inputs>
-        <param name="query" type="data" format="fasta" label="Protein query sequence(s)"/> 
+        <param argument="-query" type="data" format="fasta" label="Protein query sequence(s)"/>
 
         <expand macro="input_conditional_nucleotide_db" />
-        <param name="blast_type" type="select" display="radio" label="Type of BLAST">
+        <param name="blast_type" argument="-task" type="select" display="radio" label="Type of BLAST">
             <option value="tblastn">tblastn - Traditional TBLASTN to compare protein query to translated nucleotide database</option>
             <option value="tblastn-fast">tblastn-fast - Use longer words for seeding, faster but less accurate</option>
         </param>
@@ -51,7 +51,7 @@
             Can't use '-ungapped' on its own, error back is:
             Composition-adjusted searched are not supported with an ungapped search, please add -comp_based_stats F or do a gapped search
             Tried using '-ungapped -comp_based_stats F' and tblastn crashed with 'Attempt to access NULL pointer.'
-            <param name="ungapped" type="boolean" label="Perform ungapped alignment only?" truevalue="-ungapped -comp_based_stats F" falsevalue="" checked="false" />
+            <param argument="-ungapped" type="boolean" label="Perform ungapped alignment only?" truevalue="-ungapped -comp_based_stats F" falsevalue="" checked="false" />
             -->
             <expand macro="input_parse_deflines" />
             <expand macro="advanced_optional_id_files" />
@@ -144,7 +144,7 @@
         </test>
     </tests>
     <help>
-    
+
 @SEARCH_TIME_WARNING@
 
 **What it does**
b
diff -r 7538e2bfcd41 -r 6f386c5dc4fb tools/ncbi_blast_plus/ncbi_tblastx_wrapper.xml
--- a/tools/ncbi_blast_plus/ncbi_tblastx_wrapper.xml Wed Apr 19 05:27:19 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_tblastx_wrapper.xml Mon Sep 18 06:21:27 2017 -0400
b
@@ -6,11 +6,11 @@
     </macros>
     <expand macro="parallelism" />
     <expand macro="preamble" />
-    <command>
+    <command detect_errors="aggressive">
 ## The command is a Cheetah template which allows some Python based syntax.
 ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces
 tblastx
--query "$query"
+-query '$query'
 @BLAST_DB_SUBJECT@
 -query_gencode $query_gencode
 -evalue $evalue_cutoff
@@ -29,7 +29,7 @@
 #end if
     </command>
     <inputs>
-        <param name="query" type="data" format="fasta" label="Nucleotide query sequence(s)"/> 
+        <param argument="-query" type="data" format="fasta" label="Nucleotide query sequence(s)"/>
 
         <expand macro="input_conditional_nucleotide_db" />
         <expand macro="input_query_gencode" />
@@ -69,7 +69,7 @@
         </test>
     </tests>
     <help>
-    
+
 @SEARCH_TIME_WARNING@
 
 **What it does**