changeset 20:c5f20ca77de2 draft

planemo upload for repository https://github.com/peterjc/galaxy_blast/tree/master/tools/ncbi_blast_plus commit de1ad30e756a7073c422d5677fe5c6750521fa1b-dirty
author peterjc
date Wed, 26 Apr 2017 06:47:08 -0400
parents a212d2984601
children 771b554bc85d
files tools/ncbi_blast_plus/README.rst 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
diffstat 17 files changed, 73 insertions(+), 83 deletions(-) [+]
line wrap: on
line diff
--- a/tools/ncbi_blast_plus/README.rst	Wed Apr 19 05:23:06 2017 -0400
+++ b/tools/ncbi_blast_plus/README.rst	Wed Apr 26 06:47:08 2017 -0400
@@ -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.
 
@@ -242,6 +242,8 @@
         - ``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).
 ======= ======================================================================
 
 
--- a/tools/ncbi_blast_plus/blastxml_to_tabular.xml	Wed Apr 19 05:23:06 2017 -0400
+++ b/tools/ncbi_blast_plus/blastxml_to_tabular.xml	Wed Apr 26 06:47:08 2017 -0400
@@ -3,21 +3,16 @@
     <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"/>
--- a/tools/ncbi_blast_plus/ncbi_blastdbcmd_info.xml	Wed Apr 19 05:23:06 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_blastdbcmd_info.xml	Wed Apr 26 06:47:08 2017 -0400
@@ -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>
--- a/tools/ncbi_blast_plus/ncbi_blastdbcmd_wrapper.xml	Wed Apr 19 05:23:06 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_blastdbcmd_wrapper.xml	Wed Apr 26 06:47:08 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>
--- a/tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml	Wed Apr 19 05:23:06 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml	Wed Apr 26 06:47:08 2017 -0400
@@ -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
--- a/tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml	Wed Apr 19 05:23:06 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml	Wed Apr 26 06:47:08 2017 -0400
@@ -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
 blastp
--query "$query"
+-query '$query'
 @BLAST_DB_SUBJECT@
 -task $blast_type
 -evalue $evalue_cutoff
--- a/tools/ncbi_blast_plus/ncbi_blastx_wrapper.xml	Wed Apr 19 05:23:06 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_blastx_wrapper.xml	Wed Apr 26 06:47:08 2017 -0400
@@ -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
--- a/tools/ncbi_blast_plus/ncbi_convert2blastmask_wrapper.xml	Wed Apr 19 05:23:06 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_convert2blastmask_wrapper.xml	Wed Apr 26 06:47:08 2017 -0400
@@ -5,15 +5,15 @@
         <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>
--- a/tools/ncbi_blast_plus/ncbi_dustmasker_wrapper.xml	Wed Apr 19 05:23:06 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_dustmasker_wrapper.xml	Wed Apr 26 06:47:08 2017 -0400
@@ -6,18 +6,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
 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>
--- a/tools/ncbi_blast_plus/ncbi_macros.xml	Wed Apr 19 05:23:06 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_macros.xml	Wed Apr 26 06:47:08 2017 -0400
@@ -1,5 +1,5 @@
 <macros>
-    <token name="@WRAPPER_VERSION@">0.2.00</token>
+    <token name="@WRAPPER_VERSION@">0.2.01</token>
     <xml name="parallelism">
         <!-- If job splitting is enabled, break up the query file into parts -->
         <parallelism method="multi" split_inputs="query" split_mode="to_size" split_size="1000" merge_outputs="output1" />
@@ -8,15 +8,6 @@
         <requirements>
             <requirement type="package" version="2.5.0">blast</requirement>
         </requirements>
-        <stdio>
-            <!-- Anything other than zero is an error -->
-            <exit_code range="1:" />
-            <!-- Might see negative return codes for Unix signals via Python subprocess -->
-            <exit_code range=":-1" />
-            <!-- In case the return code has not been set properly check stderr too -->
-            <regex match="Error:" />
-            <regex match="Exception:" />
-        </stdio>
         <version_command>@BINARY@ -version</version_command>
     </xml>
     <xml name="output_change_format">
@@ -351,23 +342,24 @@
     <token name="@THREADS@">-num_threads "\${GALAXY_SLOTS:-8}"</token>
     <token name="@BLAST_DB_SUBJECT@">
 #if $db_opts.db_opts_selector == "db":
-  -db "${' '.join(str( $db_opts.database.fields.path ).split( ',' ))}"
+  -db '${" ".join(str($db_opts.database.fields.path).split(","))}'
 #elif $db_opts.db_opts_selector == "histdb":
-  -db "${os.path.join($db_opts.histdb.extra_files_path,'blastdb')}"
+  -db '${os.path.join($db_opts.histdb.extra_files_path, "blastdb")}'
 #else:
-  -subject "$db_opts.subject"
+  -subject '$db_opts.subject'
 #end if
     </token>
-    <token name="@BLAST_OUTPUT@">-out "$output1"
+    <token name="@BLAST_OUTPUT@">-out '$output1'
 ##Set the extended list here so when we add things, saved workflows are not affected
 #if str($output.out_format)=="ext":
-    -outfmt "6 std sallseqid score nident positive gaps ppos qframe sframe qseq sseq qlen slen salltitles"
+    -outfmt '6 std sallseqid score nident positive gaps ppos qframe sframe qseq sseq qlen slen salltitles'
 #elif str($output.out_format)=="cols"
 ##Pick your own columns. Galaxy gives us it comma separated, BLAST+ wants space separated:
 ##TODO - Can we catch the user picking no columns and raise an error here?
 #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()
-    -outfmt "6 $cols"
+    -outfmt '6 $cols'
 #else:
+## Note do not quote this as can be '0 -html' which is really two arguments
     -outfmt $output.out_format
 #end if
     </token>
@@ -394,11 +386,11 @@
     </token>
     <!-- @ON_DB_SUBJECT@ is for use with @BLAST_DB_SUBJECT@ -->
     <token name="@ON_DB_SUBJECT@">#if str($db_opts.db_opts_selector)=='db'
-${db_opts.database}
+'${db_opts.database}'
 #elif str($db_opts.db_opts_selector)=='histdb'
-${db_opts.histdb.name}
+'${db_opts.histdb.name}'
 #else
-${db_opts.subject.name}
+'${db_opts.subject.name}'
 #end if</token>
     <token name="@REFERENCES@">
 Peter J. A. Cock, John M. Chilton, Björn Grüning, James E. Johnson, Nicola Soranzo (2015).
--- a/tools/ncbi_blast_plus/ncbi_makeblastdb.xml	Wed Apr 19 05:23:06 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_makeblastdb.xml	Wed Apr 26 06:47:08 2017 -0400
@@ -5,23 +5,24 @@
         <import>ncbi_macros.xml</import>
     </macros>
     <expand macro="preamble" />
-    <command interpreter="python">check_no_duplicates.py
+    <command detect_errors="aggressive" strict="True">
+python $__tool_directory__/check_no_duplicates.py
 ##First check for duplicates (since BLAST+ 2.2.28 fails to do so)
 ##and abort (via the ampersand ampersand trick) if any are found.
-#for i in $input_file#"${i}" #end for#
+#for i in $input_file#'${i}' #end for#
 &amp;&amp;
-makeblastdb -out "${os.path.join($outfile.files_path,'blastdb')}"
+makeblastdb -out '${os.path.join($outfile.files_path, "blastdb")}'
 $parse_seqids
 $hash_index
 ## Single call to -in with multiple filenames space separated with outer quotes
 ## (presumably any filenames with spaces would be a problem). Note this gives
 ## some extra spaces, e.g. -in "file1 file2 file3 " but BLAST seems happy:
--in "#for i in $input_file#${i} #end for#"
+-in '#for i in $input_file#${i} #end for#'
 #if $title:
--title "$title"
+-title '$title'
 #else:
 ##Would default to being based on the cryptic Galaxy filenames, which is unhelpful
--title "BLAST Database"
+-title 'BLAST Database'
 #end if
 -dbtype $dbtype
 ## --------------------------------------------------------------------
@@ -31,7 +32,7 @@
 ## See Trello issue https://trello.com/c/lp5YmA1O
 #if ' '.join( map(str, $mask_data_file) ) != 'None':
 #for i in $mask_data_file:
--mask_data "${i}"
+-mask_data '${i}'
 #end for
 #end if
 ## --------------------------------------------------------------------
--- a/tools/ncbi_blast_plus/ncbi_makeprofiledb.xml	Wed Apr 19 05:23:06 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_makeprofiledb.xml	Wed Apr 26 06:47:08 2017 -0400
@@ -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
+-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">
--- a/tools/ncbi_blast_plus/ncbi_rpsblast_wrapper.xml	Wed Apr 19 05:23:06 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_rpsblast_wrapper.xml	Wed Apr 26 06:47:08 2017 -0400
@@ -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@
--- a/tools/ncbi_blast_plus/ncbi_rpstblastn_wrapper.xml	Wed Apr 19 05:23:06 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_rpstblastn_wrapper.xml	Wed Apr 26 06:47:08 2017 -0400
@@ -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@
--- a/tools/ncbi_blast_plus/ncbi_segmasker_wrapper.xml	Wed Apr 19 05:23:06 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_segmasker_wrapper.xml	Wed Apr 26 06:47:08 2017 -0400
@@ -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
--- a/tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml	Wed Apr 19 05:23:06 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml	Wed Apr 26 06:47:08 2017 -0400
@@ -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
--- a/tools/ncbi_blast_plus/ncbi_tblastx_wrapper.xml	Wed Apr 19 05:23:06 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_tblastx_wrapper.xml	Wed Apr 26 06:47:08 2017 -0400
@@ -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