diff busco.xml @ 18:94170eee0ad8 draft

planemo upload commit 09dff03131fb917a00cc291580ed7c4f38b266c9
author iuc
date Fri, 14 Apr 2023 08:13:46 +0000
parents e824f5d958d0
children 2a5b8b9936bf
line wrap: on
line diff
--- a/busco.xml	Thu Mar 02 17:02:45 2023 +0000
+++ b/busco.xml	Fri Apr 14 08:13:46 2023 +0000
@@ -30,13 +30,19 @@
 
 busco
 --in '${input}'
---update-data
 --mode '${busco_mode.mode}'
 --out busco_galaxy
 --cpu \${GALAXY_SLOTS:-4}
 --evalue ${adv.evalue}
 --limit ${adv.limit}
 
+#if $lineage_conditional.selector == 'cached':
+    --offline
+    --download_path $lineage_conditional.cached_db.fields.path
+#else
+    --update-data
+#end if
+
 #if $lineage.lineage_mode == "auto_detect":
     $lineage.auto_lineage
 #else if $lineage.lineage_mode == "select_lineage":
@@ -75,6 +81,20 @@
 ]]>    </command>
     <inputs>
         <param type="data" name="input" format="fasta" label="Sequences to analyse" help="Can be an assembled genome or transcriptome (DNA), or protein sequences from an annotated gene set." />
+        <conditional name="lineage_conditional">
+            <param name="selector" type="select" label="Lineage data source">
+                <option value="download">Download lineage data</option>
+                <option value="cached">Use cached lineage data</option>
+            </param>
+            <when value="cached">
+                <param name="cached_db" label="Cached database with lineage" type="select">
+                    <options from_data_table="busco_database">
+                        <validator message="No BUSCO database is available" type="no_options" />
+                    </options>
+                </param>
+            </when>
+            <when value="download"/>
+        </conditional>
         <conditional name="busco_mode">
             <param argument="--mode" type="select" label="Mode">
                 <option value="geno">Genome assemblies (DNA)</option>
@@ -309,6 +329,23 @@
             <output name="summary_image" file="genome_results_metaeuk_auto/summary.png" compare="sim_size" />
             <output name="busco_gff" file="genome_results_metaeuk_auto/out.gff" compare="diff" />
         </test>
+        <test expect_num_outputs="2">
+            <param name="input" value="genome.fa" />
+            <conditional name="lineage_conditional">
+                <param name="selector" value="cached"/>
+                <param name="cached_db" value="busco-demo-db-20230328"/>
+            </conditional>
+            <conditional name="lineage">
+                <param name="lineage_mode" value="select_lineage" />
+                <param name="lineage_dataset" value="archaea_odb10" />
+            </conditional>
+            <param name="outputs" value="short_summary" />
+            <output name="busco_sum" file="genome_results/short_summary_cached" compare="diff" lines_diff="6" />
+            <output name="busco_table" file="genome_results/full_table_cached" compare="diff" lines_diff="4" />
+            <assert_stdout>
+                <has_text text="Running BUSCO using lineage dataset archaea_odb10 (prokaryota, 2021-02-23)"/>
+            </assert_stdout>
+        </test>
     </tests>
     <help><![CDATA[