diff diamond.xml @ 8:54f751e413f4 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/diamond commit 75abf7d4b23ed7ae8abce80609d81b20bc882863"
author iuc
date Mon, 22 Mar 2021 13:21:23 +0000
parents 62c9df8382c2
children f921014aba5a
line wrap: on
line diff
--- a/diamond.xml	Tue Dec 03 17:40:05 2019 -0500
+++ b/diamond.xml	Mon Mar 22 13:21:23 2021 +0000
@@ -6,7 +6,7 @@
     <expand macro="requirements" />
     <expand macro="stdio" />
     <expand macro="version_command" />
-    <command>
+    <command detect_errors="aggressive">
 <![CDATA[
 
     #if $ref_db_source.db_source == "history":
@@ -19,27 +19,26 @@
 
     diamond
         $method_cond.method_select
+        --quiet
         --threads "\${GALAXY_SLOTS:-12}"
         --db ./database
         --query '$query'
         #if $method_cond.method_select == "blastx"
           --query-gencode '$method_cond.query_gencode'
           --strand '$method_cond.query_strand'
-	  --min-orf $method_cond.min_orf
-	  #if $method_cond.frameshift_cond.frameshift_select == 'yes'
-	          --frameshift $method_cond.frameshift_cond.frameshift
-		  $method_cond.frameshift_cond.range_culling
+          --min-orf $method_cond.min_orf
+          #if $method_cond.frameshift_cond.frameshift_select == 'yes'
+            --frameshift $method_cond.frameshift_cond.frameshift
+            $method_cond.frameshift_cond.range_culling
           #end if
+        #else if $method_cond.method_select == "blastp"
+            $method_cond.no_self_hits
         #end if
 
         @OUTPUT_ARGS@
 
         --compress '0'
-        #if $sensitivity == "1"
-          --sensitive
-        #else if $sensitivity == "2"
-          --more-sensitive
-        #end if
+        $sens_cond.sensitivity
 
         #if str($gapopen) != "":
           --gapopen '$gapopen'
@@ -48,7 +47,7 @@
           --gapextend '$gapextend'
         #end if
         --matrix '$matrix'
-        --comp-based-stats '$comp_based_stats'
+        --comp-based-stats '$method_cond.comp_based_stats'
         --masking '$masking'
 
         @HITFILTER_ARGS@
@@ -62,11 +61,10 @@
         --id '$id'
         --query-cover '$query_cover'
         --subject-cover '$subject_cover'
-        --block-size '$block_size'
+        --block-size '$sens_cond.block_size'
         #if str($unal) == '1':
             --unal 1 --un '$unalqueries'
         #end if
-        $no_self_hits
         #if $tax_cond.tax_select == 'file':
             --taxonlist `cat '$tax_cond.taxonlistfile' | grep -v "^#" | grep -v "^$" | tr "\n" "," | sed 's/,$//'`
         #else if  $tax_cond.tax_select == 'list':
@@ -120,8 +118,22 @@
                     </when>
                     <when value="no"/>
                 </conditional>
+
+                <param name="comp_based_stats" argument="--comp-based-stats" type="select" label="Composition based statistics" help="Compositionally biased sequences often cause false positive matches, which are effectively filtered by this algorithm in a way similar to the composition based statistics used by BLAST">
+                    <option value="0">Disable</option>
+                    <option value="1" selected="True">Default mode (Hauser, 2016)</option>
+                </param>
             </when>
             <when value="blastp">
+                <param name="no_self_hits" argument="--no-self-hits" type="boolean" truevalue="--no-self-hits" falsevalue="" checked="true" label="suppress reporting of identical self hits?" help=""/>
+
+                <param name="comp_based_stats" argument="--comp-based-stats" type="select" label="Composition based statistics" help="Compositionally biased sequences often cause false positive matches, which are effectively filtered by this algorithm in a way similar to the composition based statistics used by BLAST">
+                    <option value="0">Disable</option>
+                    <option value="1" selected="True">Default mode (Hauser, 2016)</option>
+                    <option value="2">Compositional matrix adjust conditioned on sequence properties, simplified (Yu, 2005)</option>
+                    <option value="3">Compositional matrix adjust conditioned on sequence properties (Yu, 2005)</option>
+                    <option value="4">Compositional matrix adjust unconditionally (Yu, 2005)</option>
+                </param>
             </when>
         </conditional>
         <param argument="--query" type="data" format="fasta,fastq" label="Input query file in FASTA or FASTQ format" />
@@ -139,16 +151,45 @@
                 </param>
             </when>
             <when value="history">
-                <param name="reference_database" type="data" format="dmnd" label="Select the reference database" />
+                <param name="reference_database" argument="--db" type="data" format="dmnd" label="Select the reference database" />
             </when>
         </conditional>
-        <expand macro="output_type_macro" />
-        <param name="no_self_hits" argument="--no-self-hits" type="boolean" truevalue="--no-self-hits" falsevalue="" checked="true" label="suppress reporting of identical self hits?" help=""/>
-        <param name='sensitivity' type="select" label="Sensitivity Mode" help="Choose one of the sensitivity modes. The default mode is mainly designed for short read alignment, i.e. finding significant matches of >50 bits on 30-40aa fragments. The sensitive mode is a lot more sensitive than the default and generally recommended for aligning longer sequences. The more sensitive mode provides even more sensitivity. More sensitivity may increase computation time.">
-            <option value="0" selected="True">Default</option>
-            <option value="1">Sensitive</option>
-            <option value="2">More Sensitive</option>
-        </param>
+        <expand macro="output_type_macro">
+            <!-- Taxonomy features are not supported for the DAA format (i.e.
+                 can't be used in diamond view) -->
+            <option value="staxids">unique Subject Taxonomy ID(s), separated by a ';' (in numerical order)</option>
+            <option value="sskingdoms">Subject super kingdoms</option>
+            <option value="skingdoms">Subject kingdoms</option>
+            <option value="sphylums">Subject phylums</option>
+        </expand>
+        <conditional name="sens_cond">
+            <param name='sensitivity' type="select" label="Sensitivity Mode" help="Choose one of the sensitivity modes. The default mode is mainly designed for short read alignment, i.e. finding significant matches of >50 bits on 30-40aa fragments. The sensitive mode is a lot more sensitive than the default and generally recommended for aligning longer sequences. The more sensitive mode provides even more sensitivity. More sensitivity may increase computation time.">
+                <option value="" selected="True">Default</option>
+                <option value="--mid-sensitive">Mid Sensitive (--mid-sensitive)</option>
+                <option value="--sensitive">Sensitive (--sensitive)</option>
+                <option value="--more-sensitive">More Sensitive (--more-sensitive)</option>
+                <option value="--very-sensitive">Very Sensitive (--very-sensitive)</option>
+                <option value="--ultra-sensitive">Ultra Sensitive (--ultra-sensitive)</option>
+            </param>
+            <when value="">
+                <expand macro="block_size_low_sens"/>
+            </when>
+            <when value="--mid-sensitive">
+                <expand macro="block_size_low_sens"/>
+            </when>
+            <when value="--sensitive">
+                <expand macro="block_size_low_sens"/>
+            </when>
+            <when value="--more-sensitive">
+                <expand macro="block_size_low_sens"/>
+            </when>
+            <when value="--very-sensitive">
+                <expand macro="block_size_hi_sens"/>
+            </when>
+            <when value="--ultra-sensitive">
+                <expand macro="block_size_hi_sens"/>
+            </when>
+        </conditional>
         <param argument="--matrix" type="select" label="Scoring matrix" help="In parentheses are the supported values for (gap open)/(gap extend). In brackets are default gap penalties">
             <option value="BLOSUM45">BLOSUM45 ((10-13)/3; (12-16)/2; (16-19)/1) [14/2]</option>
             <option value="BLOSUM50">BLOSUM50 ((9-13)/3; (12-16)/2; (15-19)/1) [13/2]</option>
@@ -161,7 +202,6 @@
         </param>
         <param argument="--gapopen" type="integer" optional="True" value="" label="Gap open penalty" help="leave empty for default (see scoring matrix)" />
         <param argument="--gapextend" type="integer" optional="True" value="" label="Gap extension penalty" help="leave empty for default (see scoring matrix)" />
-        <param name="comp_based_stats" argument="--comp-based-stats" type="boolean" truevalue="1" falsevalue="0" checked="true" label="enable composition based statistics?" help="Compositionally biased sequences often cause false positive matches, which are effectively filtered by this algorithm in a way similar to the composition based statistics used by BLAST"/>
         <param argument="--masking" type="boolean" truevalue="1" falsevalue="0" checked="true" label="enable masking of low complexity regions?" help="Masked residues appear in the output as X"/>
         <conditional name="tax_cond">
             <param name="tax_select" type="select" label="Restrict search taxonomically?" help="Any taxonomic rank can be used, and only reference sequences matching one of the specified taxon ids will be searched against">
@@ -171,7 +211,10 @@
             </param>
             <when value="no"/>
             <when value="list">
-                <param name="taxonlist" argument="--taxonlist" type="text" value="" label="comma separated list of taxon ids" help="" />
+                <param name="taxonlist" argument="--taxonlist" type="text" value="" label="comma separated list of taxon ids" help="">
+                    <validator type="regex" message="taxonlist needs to be a comma separated list of integers">[0-9,]*</validator>
+                    <validator type="expression" message="taxon ids 0 and 1 are not allowed">not ("0" in value.split(",") or "1" in value.split(","))</validator>
+                </param>
             </when>
             <when value="file">
                 <param name="taxonlistfile" argument="--taxonlist" type="data" format="tabular" label="Keep alignments within the given percentage range of the top alignment score for a quer" help="" />
@@ -193,7 +236,6 @@
         <param argument="--id" type="integer" value="0" label="Minimum identity percentage to report an alignment" help="" />
         <param name="query_cover" argument="--query-cover" type="integer" value="0" label="Minimum query cover percentage to report an alignment" help="" />
         <param name="subject_cover" argument="--subject-cover" type="integer" value="0" label="Minimum subject cover percentage to report an alignment" help="" />
-        <param name="block_size" argument="--block-size" type="float" value="2" label="Block size in billions of sequence letters to be processed at a time" help="" />
         <param argument="--unal" type="boolean" truevalue="1" falsevalue="0" checked="false" label="report unaligned queries" help=""/>
     </inputs>
     <outputs>
@@ -210,13 +252,15 @@
             <param name="query" value="protein.fasta" ftype="fasta"/>
             <conditional name="ref_db_source">
                 <param name="db_source" value="history"/>
-                <param name="reference_database" value="db.dmnd"/>
+                <param name="reference_database" value="db-wtax.dmnd"/>
             </conditional>
             <conditional name="output">
                 <param name="outfmt" value="6"/>
-                <param name="fields" value="qseqid,sseqid,pident,length,mismatch,gapopen,qstart,qend,sstart,send,evalue,bitscore"/>
+                <param name="fields" value="qseqid,sseqid,pident,length,mismatch,gapopen,qstart,qend,sstart,send,evalue,bitscore,cigar,scovhsp,sskingdoms,skingdoms,sphylums"/>
             </conditional>
-            <param name="sensitivity" value="0"/>
+            <conditional name="sens_cond">
+                <param name="sensitivity" value=""/>
+            </conditional>
             <param name="matrix" value="BLOSUM62"/>
             <param name="comp-based-stat" value="1"/>
             <param name="masking" value="1"/>
@@ -230,7 +274,9 @@
             </conditional>
             <param name="id" value="0"/>
             <param name="query_cover" value="0"/>
-            <param name="block_size" value="2"/>
+            <conditional name="sens_cond">
+                <param name="block_size" value="2"/>
+            </conditional>
             <output name="blast_tabular" file="diamond_results.tabular"/>
         </test>
         <test>
@@ -243,14 +289,16 @@
                 <param name="reference_database" value="db-wtax.dmnd"/>
             </conditional>
             <conditional name="tax_cond">
-		    <param name="tax_select" value="list"/>
-                    <param name="taxonlist" value="2" />
+                <param name="tax_select" value="list"/>
+                <param name="taxonlist" value="2" />
             </conditional>
             <conditional name="output">
                 <param name="outfmt" value="6"/>
                 <param name="fields" value="qseqid,sseqid,pident,length,mismatch,gapopen,qstart,qend,sstart,send,evalue,bitscore"/>
             </conditional>
-            <param name="sensitivity" value="0"/>
+            <conditional name="sens_cond">
+                <param name="sensitivity" value=""/>
+            </conditional>
             <param name="matrix" value="BLOSUM62"/>
             <param name="comp-based-stat" value="1"/>
             <param name="masking" value="1"/>
@@ -264,7 +312,9 @@
             </conditional>
             <param name="id" value="0"/>
             <param name="query_cover" value="0"/>
-            <param name="block_size" value="2"/>
+            <conditional name="sens_cond">
+                <param name="block_size" value="2"/>
+            </conditional>
             <output name="blast_tabular" file="diamond_results.wtax.tabular"/>
         </test>
         <test>
@@ -282,7 +332,9 @@
             <conditional name="output">
                 <param name="outfmt" value="0"/>
             </conditional>
-            <param name="sensitivity" value="0"/>
+            <conditional name="sens_cond">
+                <param name="sensitivity" value=""/>
+            </conditional>
             <param name="matrix" value="BLOSUM62"/>
             <param name="comp-based-stat" value="1"/>
             <param name="masking" value="1"/>
@@ -291,12 +343,14 @@
                 <param name="top" value="10" />
             </conditional>
             <conditional name="filter_score">
-                <param name="filter_score_select" value="score"/>
-                <param name="evalue" value="1" />
+                <param name="filter_score_select" value="min-score"/>
+                <param name="min_score" value="1" />
             </conditional>
             <param name="id" value="0"/>
             <param name="query_cover" value="0"/>
-            <param name="block_size" value="2"/>
+            <conditional name="sens_cond">
+                <param name="block_size" value="2"/>
+            </conditional>
             <output name="blast_tabular" file="diamond_results.pairwise"/>
         </test>
         <test>
@@ -313,6 +367,42 @@
             </conditional>
             <output name="daa_output" file="diamond_results.daa" compare="sim_size" delta="10"/>
         </test>
+        <test>
+            <conditional name="method_cond">
+                <param name="method_select" value="blastx" />
+                <conditional name="frameshift_cond">
+                    <param name="frameshift_select" value="yes"/>
+                </conditional>
+            </conditional>
+            <param name="query" value="nucleotide.fasta" ftype="fasta"/>
+            <conditional name="ref_db_source">
+                <param name="db_source" value="indexed"/>
+                <param name="index" value="testDb"/>
+            </conditional>
+            <conditional name="output">
+                <param name="outfmt" value="0"/>
+            </conditional>
+            <conditional name="sens_cond">
+                <param name="sensitivity" value=""/>
+            </conditional>
+            <param name="matrix" value="BLOSUM62"/>
+            <param name="comp-based-stat" value="1"/>
+            <param name="masking" value="1"/>
+            <conditional name="hit_filter">
+                <param name="hit_filter_select" value="top"/>
+                <param name="top" value="10" />
+            </conditional>
+            <conditional name="filter_score">
+                <param name="filter_score_select" value="min-score"/>
+                <param name="min_score" value="1" />
+            </conditional>
+            <param name="id" value="0"/>
+            <param name="query_cover" value="0"/>
+            <conditional name="sens_cond">
+                <param name="block_size" value="2"/>
+            </conditional>
+            <output name="blast_tabular" file="diamond_results.pairwise"/>
+        </test>
     </tests>
     <help>
 <![CDATA[