diff tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml @ 23:31e517610e1f draft

v0.3.0 Updated for NCBI BLAST+ 2.7.1
author peterjc
date Sat, 30 Jun 2018 17:22:46 -0400
parents 6f386c5dc4fb
children e25d3acf6e68
line wrap: on
line diff
--- a/tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml	Mon Sep 18 06:21:27 2017 -0400
+++ b/tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml	Sat Jun 30 17:22:46 2018 -0400
@@ -7,31 +7,43 @@
     <expand macro="parallelism" />
     <expand macro="preamble" />
     <command detect_errors="aggressive">
+<![CDATA[
 ## 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'
+#if $query.is_of_type('fasta.gz'):
+-query <(gunzip -c '${query}')
+#else:
+-query '${query}'
+#end if
 @BLAST_DB_SUBJECT@
--task $blast_type
--evalue $evalue_cutoff
+-task '${blast_type}'
+-evalue '${evalue_cutoff}'
 @BLAST_OUTPUT@
 @THREADS@
 #if $adv_opts.adv_opts_selector=="advanced":
-$adv_opts.strand
+${adv_opts.strand}
 @ADV_FILTER_QUERY@
 @ADV_MAX_HITS@
 @ADV_WORD_SIZE@
 #if (str($adv_opts.identity_cutoff) and float(str($adv_opts.identity_cutoff)) > 0 ):
--perc_identity $adv_opts.identity_cutoff
+-perc_identity '${adv_opts.identity_cutoff}'
 #end if
-$adv_opts.ungapped
+${adv_opts.ungapped}
 @ADV_ID_LIST_FILTER@
 @ADV_QCOV_HSP_PERC@
+## only use window size if dc-megablast mode is used
+#if ($blast_type == "dc-megablast"):
+-window_size @ADV_WINDOW_SIZE@
+#end if
+@ADV_GAPOPEN@
+@ADV_GAPEXTEND@
 ## End of advanced options:
 #end if
+]]>
     </command>
     <inputs>
-        <param argument="-query" type="data" format="fasta" label="Nucleotide query sequence(s)"/>
+        <param argument="-query" type="data" format="fasta,fasta.gz" label="Nucleotide query sequence(s)"/>
         <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>
@@ -53,13 +65,18 @@
             <expand macro="input_strand" />
             <expand macro="input_max_hits" />
             <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 argument="-word_size" type="integer" min="0" value="0" label="Word size for wordfinder algorithm" help="Use zero for default, otherwise minimum 4" />
+            <expand macro="input_word_size" />
             <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" />
+            <!-- the help text here is unique to the blastx application, so macro not used -->
+            <param name="window_size" type="integer" optional="true" min="0"
+                label="Multiple hits window size: use 0 to specify 1-hit algorithm, leave blank for default"
+                help="Only relevant for dc-megablast, and otherwise ignored. Default window size changes with substitution matrix and BLAST type.
+                    Entering a non-negative integer will override the default."/>
+            <expand macro="input_gapopen"/>
+            <expand macro="input_gapextend"/>
         </expand>
     </inputs>
     <outputs>
@@ -91,6 +108,16 @@
         <test>
             <param name="query" value="rhodopsin_nucs.fasta" ftype="fasta" />
             <param name="db_opts_selector" value="file" />
+            <param name="subject" value="three_human_mRNA.fasta.gz" ftype="fasta.gz" />
+            <param name="database" value="" />
+            <param name="evalue_cutoff" value="1e-40" />
+            <param name="out_format" value="6" />
+            <param name="adv_opts_selector" value="basic" />
+            <output name="output1" file="blastn_rhodopsin_vs_three_human.tabular" ftype="tabular" />
+        </test>
+        <test>
+            <param name="query" value="rhodopsin_nucs.fasta" ftype="fasta" />
+            <param name="db_opts_selector" value="file" />
             <param name="subject" value="three_human_mRNA.fasta" ftype="fasta" />
             <param name="database" value="" />
             <param name="evalue_cutoff" value="1e-40" />
@@ -168,6 +195,10 @@
 
 -------
 
+@CLI_OPTIONS@
+
+-------
+
 **References**
 
 If you use this Galaxy tool in work leading to a scientific publication please