diff tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml @ 5:393a7a35383c draft

Uploaded v0.0.14 adding local BLAST database support. This *requires* the matching update to the blast_datatypes repository. This adds basic wrappers for makeblastdb and blastdbinfo. This update includes work by Edward Kirton.
author peterjc
date Fri, 09 Nov 2012 06:53:55 -0500
parents 9d5beacae92b
children a23b0627623c
line wrap: on
line diff
--- a/tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml	Wed Sep 19 13:08:31 2012 -0400
+++ b/tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml	Fri Nov 09 06:53:55 2012 -0500
@@ -1,7 +1,7 @@
-<tool id="ncbi_blastp_wrapper" name="NCBI BLAST+ blastp" version="0.0.13">
+<tool id="ncbi_blastp_wrapper" name="NCBI BLAST+ blastp" version="0.0.14">
     <description>Search protein database with protein query sequence(s)</description>
     <!-- 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" shared_inputs="subject" merge_outputs="output1"></parallelism>
+    <parallelism method="multi" split_inputs="query" split_mode="to_size" split_size="1000" shared_inputs="subject,histdb" merge_outputs="output1"></parallelism>
     <version_command>blastp -version</version_command>
     <command>
 ## The command is a Cheetah template which allows some Python based syntax.
@@ -10,6 +10,8 @@
 -query "$query"
 #if $db_opts.db_opts_selector == "db":
   -db "${db_opts.database.fields.path}"
+#elif $db_opts.db_opts_selector == "histdb":
+  -db "${os.path.join($db_opts.histdb.extra_files_path,'blastdb')}"
 #else:
   -subject "$db_opts.subject"
 #end if
@@ -41,15 +43,20 @@
 #end if
     </command>
     <stdio>
+        <!-- Anything other than zero is an error -->
         <exit_code range="1:" />
-	<exit_code range="://0" />
+        <exit_code range=":-1" />
+        <!-- In case the return code has not been set propery check stderr too -->
+        <regex match="Error:" />
+        <regex match="EXception:" />
     </stdio>
     <inputs>
         <param name="query" type="data" format="fasta" label="Protein query sequence(s)"/> 
         <conditional name="db_opts">
             <param name="db_opts_selector" type="select" label="Subject database/sequences">
               <option value="db" selected="True">BLAST Database</option>
-              <option value="file">FASTA file (pairwise e-values)</option>
+              <option value="histdb">BLAST database from your history</option>
+              <option value="file">FASTA file from your history (pairwise e-values)</option>
             </param>
             <when value="db">
                 <param name="database" type="select" label="Protein BLAST database">
@@ -59,10 +66,17 @@
                       <column name="path" index="2"/>
                     </options>
                 </param>
+                <param name="histdb" type="hidden" value="" />
                 <param name="subject" type="hidden" value="" /> 
             </when>
+            <when value="histdb">
+                <param name="database" type="hidden" value="" />
+                <param name="histdb" type="data" format="blastdbp" label="Protein BLAST database" />
+                <param name="subject" type="hidden" value="" />
+            </when>
             <when value="file">
                 <param name="database" type="hidden" value="" /> 
+                <param name="histdb" type="hidden" value="" />
                 <param name="subject" type="data" format="fasta" label="Protein FASTA file to use as database"/> 
             </when>
         </conditional>