changeset 37:996c3ef26f37 draft

planemo upload for repository https://github.com/peterjc/galaxy_blast/tree/master/tools/ncbi_blast_plus commit e2ff355ba89947ac15596fa7cb4330fe5590f627-dirty
author peterjc
date Tue, 23 Oct 2018 08:38:16 -0400
parents f0edead5615e
children 2be8f8cc13de
files tools/ncbi_blast_plus/README.rst 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_macros.xml tools/ncbi_blast_plus/ncbi_makeblastdb.xml tools/ncbi_blast_plus/ncbi_rpsblast_wrapper.xml tools/ncbi_blast_plus/ncbi_rpstblastn_wrapper.xml tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml tools/ncbi_blast_plus/ncbi_tblastx_wrapper.xml
diffstat 10 files changed, 37 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/tools/ncbi_blast_plus/README.rst	Tue Oct 23 06:27:03 2018 -0400
+++ b/tools/ncbi_blast_plus/README.rst	Tue Oct 23 08:38:16 2018 -0400
@@ -252,15 +252,18 @@
         - Support for per-matrix recommended gaps settings (``-gapopen`` and
           ``-gapextend``, contribution from Caleb Easterly and Jim Johnson).
         - Support for ``-window_size``, ``-threshold``, ``-comp_based_stats``
-          and revising ``-word_size`` to avoid using zero to mean  default
+          and revising ``-word_size`` to avoid using zero to mean default
           (contribution from Caleb Easterly).
 v0.3.0  - Updated for NCBI BLAST+ 2.7.1,
         - Depends on BioConda or legacy ToolShed ``package_blast_plus_2_7_1``.
         - Document the BLAST+ 2.6.0 change in the standard 12 column output
           from ``qacc,sacc,...`` to ``qaccver,saccver,...`` instead.
-        - Accept gzipped FASTA inputs (contribution from Anton Nekrutenko).
+        - Accept gzipped FASTA inputs for subject files, queries to ``blastn``
+          and input to ``makeblastdb`` (contribution from Anton Nekrutenko).
 v0.3.1  - Clarify help text for max hits option, confusing as depending on the
           output format it must be mapped to different command line arguments.
+        - Extend gzipped query support to all the command line tools.
+        - Workaround for gzipped support under Galaxy release 16.01 or older.
 ======= ======================================================================
 
 
--- a/tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml	Tue Oct 23 06:27:03 2018 -0400
+++ b/tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml	Tue Oct 23 08:38:16 2018 -0400
@@ -11,11 +11,7 @@
 ## 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
-#if $query.is_of_type('fasta.gz'):
--query <(gunzip -c '${query}')
-#else:
--query '${query}'
-#end if
+@QUERY@
 @BLAST_DB_SUBJECT@
 -task '${blast_type}'
 -evalue '${evalue_cutoff}'
@@ -43,7 +39,7 @@
 ]]>
     </command>
     <inputs>
-        <param argument="-query" type="data" format="fasta,fasta.gz" label="Nucleotide query sequence(s)"/>
+        <expand macro="nucl_query" />
         <expand macro="input_conditional_nucleotide_db" />
         <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>
--- a/tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml	Tue Oct 23 06:27:03 2018 -0400
+++ b/tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml	Tue Oct 23 08:38:16 2018 -0400
@@ -10,7 +10,7 @@
 ## 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@
 @BLAST_DB_SUBJECT@
 -task $blast_type
 -evalue $evalue_cutoff
@@ -33,7 +33,7 @@
 #end if
     </command>
     <inputs>
-        <param argument="-query" type="data" format="fasta" label="Protein query sequence(s)"/>
+        <expand macro="prot_query" />
 
         <expand macro="input_conditional_protein_db" />
 
--- a/tools/ncbi_blast_plus/ncbi_blastx_wrapper.xml	Tue Oct 23 06:27:03 2018 -0400
+++ b/tools/ncbi_blast_plus/ncbi_blastx_wrapper.xml	Tue Oct 23 08:38:16 2018 -0400
@@ -10,7 +10,7 @@
 ## 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@
 @BLAST_DB_SUBJECT@
 -query_gencode $query_gencode
 -task $blast_type
@@ -33,7 +33,7 @@
 #end if
     </command>
     <inputs>
-        <param argument="-query" type="data" format="fasta" label="Nucleotide query sequence(s)"/>
+        <expand macro="nucl_query" />
 
         <expand macro="input_conditional_protein_db" />
         <expand macro="input_query_gencode" />
--- a/tools/ncbi_blast_plus/ncbi_macros.xml	Tue Oct 23 06:27:03 2018 -0400
+++ b/tools/ncbi_blast_plus/ncbi_macros.xml	Tue Oct 23 08:38:16 2018 -0400
@@ -12,6 +12,14 @@
         <version_command>@BINARY@ -version</version_command>
     </xml>
 
+    <xml name="nucl_query">
+        <param argument="-query" type="data" format="fasta,fasta.gz" label="Nucleotide query sequence(s)"/>
+    </xml>
+
+    <xml name="prot_query">
+        <param argument="-query" type="data" format="fasta,fasta.gz" label="Protein query sequence(s)"/>
+    </xml>
+
     <xml name="output_change_format">
         <change_format>
             <when input="output.out_format" value="0" format="txt"/>
@@ -558,13 +566,21 @@
 
     <token name="@THREADS@">-num_threads "\${GALAXY_SLOTS:-8}"</token>
 
+    <token name="@QUERY@"><![CDATA[
+#if $query.is_of_type('fasta.gz') and $query.ext != "fasta":
+  -query <(gunzip -c '${query}')
+#else:
+  -query '${query}'
+#end if
+    ]]></token>
+
     <token name="@BLAST_DB_SUBJECT@"><![CDATA[
 #if $db_opts.db_opts_selector == "db":
   -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")}'
 #else:
-    #if $db_opts.subject.is_of_type('fasta.gz'):
+    #if $db_opts.subject.is_of_type('fasta.gz') and $db_opts.subject.ext != "fasta":
         -subject <(gunzip -c '${$db_opts.subject}')
     #else:
         -subject '${db_opts.subject}'
--- a/tools/ncbi_blast_plus/ncbi_makeblastdb.xml	Tue Oct 23 06:27:03 2018 -0400
+++ b/tools/ncbi_blast_plus/ncbi_makeblastdb.xml	Tue Oct 23 08:38:16 2018 -0400
@@ -17,7 +17,7 @@
 ##into a single cat command below
 cat
 #for i in $input_file:
-    #if $i.is_of_type('fasta.gz'):
+    #if $i.is_of_type('fasta.gz') and $i.ext != "fasta":
         <(gunzip -c ${i})
     #else:
         ${i}
--- a/tools/ncbi_blast_plus/ncbi_rpsblast_wrapper.xml	Tue Oct 23 06:27:03 2018 -0400
+++ b/tools/ncbi_blast_plus/ncbi_rpsblast_wrapper.xml	Tue Oct 23 08:38:16 2018 -0400
@@ -10,7 +10,7 @@
 ## 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@
 #if $db_opts.db_opts_selector == "db":
   -db '${db_opts.database.fields.path}'
 #elif $db_opts.db_opts_selector == "histdb":
@@ -28,7 +28,7 @@
 #end if
     </command>
     <inputs>
-        <param argument="-query" type="data" format="fasta" label="Protein query sequence(s)"/>
+        <expand macro="prot_query" />
 
         <expand macro="input_conditional_pssm" />
 
--- a/tools/ncbi_blast_plus/ncbi_rpstblastn_wrapper.xml	Tue Oct 23 06:27:03 2018 -0400
+++ b/tools/ncbi_blast_plus/ncbi_rpstblastn_wrapper.xml	Tue Oct 23 08:38:16 2018 -0400
@@ -10,7 +10,7 @@
 ## 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@
 #if $db_opts.db_opts_selector == "db":
   -db '${db_opts.database.fields.path}'
 #elif $db_opts.db_opts_selector == "histdb":
@@ -28,7 +28,7 @@
 #end if
     </command>
     <inputs>
-        <param argument="-query" type="data" format="fasta" label="Nucleotide query sequence(s)"/>
+        <expand macro="nucl_query" />
 
         <expand macro="input_conditional_pssm" />
 
--- a/tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml	Tue Oct 23 06:27:03 2018 -0400
+++ b/tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml	Tue Oct 23 08:38:16 2018 -0400
@@ -10,7 +10,7 @@
 ## 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@
 @BLAST_DB_SUBJECT@
 -task $blast_type
 -evalue $evalue_cutoff
@@ -33,7 +33,7 @@
 #end if
     </command>
     <inputs>
-        <param argument="-query" type="data" format="fasta" label="Protein query sequence(s)"/>
+        <expand macro="prot_query" />
 
         <expand macro="input_conditional_nucleotide_db" />
         <param name="blast_type" argument="-task" type="select" display="radio" label="Type of BLAST">
--- a/tools/ncbi_blast_plus/ncbi_tblastx_wrapper.xml	Tue Oct 23 06:27:03 2018 -0400
+++ b/tools/ncbi_blast_plus/ncbi_tblastx_wrapper.xml	Tue Oct 23 08:38:16 2018 -0400
@@ -10,7 +10,7 @@
 ## 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@
 @BLAST_DB_SUBJECT@
 -query_gencode $query_gencode
 -evalue $evalue_cutoff
@@ -30,7 +30,7 @@
 #end if
     </command>
     <inputs>
-        <param argument="-query" type="data" format="fasta" label="Nucleotide query sequence(s)"/>
+        <expand macro="nucl_query" />
 
         <expand macro="input_conditional_nucleotide_db" />
         <expand macro="input_query_gencode" />