changeset 55:08f50579102b draft

Uploaded
author p.lucas
date Thu, 06 Jun 2024 13:46:22 +0000
parents 9906fb4afc0b
children eda2d4904bdd
files diamond.xml
diffstat 1 files changed, 29 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/diamond.xml	Thu Jun 06 13:26:56 2024 +0000
+++ b/diamond.xml	Thu Jun 06 13:46:22 2024 +0000
@@ -8,12 +8,23 @@
     <command detect_errors="aggressive">
 <![CDATA[
 
+    #if $ref_db_source.db_source == "history":
+        ln -s $ref_db_source.reference_database ./database.dmnd
+    #else:
+        ln -s ${ref_db_source.index.fields.db_path} ./database.dmnd
+    #end if
+
+    &&
 
     /usr/bin/diamond
         $method_cond.method_select
         --quiet
         --threads "\${GALAXY_SLOTS:-12}"
-        --db /nfs/data/db/nr_blast/nr
+        #if $ref_db_source.db_source == "history":
+          --db ./database
+        #else
+          --db $ref_db_source.index.fields.db_path
+        #end if
         --query '$query'
         #if $method_cond.method_select == "blastx"
           --query-gencode '$method_cond.query_gencode'
@@ -160,6 +171,23 @@
             </when>
         </conditional>
         <param argument="--query" type="data" format="fasta,fastq" label="Input query file in FASTA or FASTQ format" />
+        <conditional name="ref_db_source">
+            <param name="db_source" type="select" label="Will you select a reference database from your history or use a built-in index?" help="Built-ins were indexed using default options">
+                <option value="indexed">Use a built-in index</option>
+                <option value="history">Use one from the history</option>
+            </param>
+            <when value="indexed">
+                <param name="index" type="select" label="Select a reference database" help="If your database of interest is not listed, contact your Galaxy admin">
+                    <options from_data_table="pl_diamond_database">
+                        <filter type="sort_by" column="2"/>
+                        <validator type="no_options" message="No indexes are available for the selected input dataset"/>
+                    </options>
+                </param>
+            </when>
+            <when value="history">
+                <param name="reference_database" argument="--db" type="data" format="dmnd" label="Select the reference database" />
+            </when>
+        </conditional>
         <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.">
                 <option value="no" selected="True">No</option>