diff busco.xml @ 16:bb935709506a draft

planemo upload commit f7f94fe1eccafe1e29657bbd79197b4b32e03ffe
author iuc
date Thu, 12 Jan 2023 13:28:58 +0000
parents 41030a6c03b7
children e824f5d958d0
line wrap: on
line diff
--- a/busco.xml	Mon Apr 11 09:02:11 2022 +0000
+++ b/busco.xml	Thu Jan 12 13:28:58 2023 +0000
@@ -1,11 +1,11 @@
 <tool id="busco" name="Busco" profile="20.01" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@">
     <description>assess genome assembly and annotation completeness</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
     <xrefs>
         <xref type="bio.tools">busco</xref>
     </xrefs>
-    <macros>
-        <import>macros.xml</import>
-    </macros>
     <requirements>
         <requirement type="package" version="@TOOL_VERSION@">busco</requirement>
         <requirement type="package" version="1.34">tar</requirement>
@@ -13,16 +13,21 @@
     </requirements>
     <version_command>busco --version</version_command>
     <command><![CDATA[
+
+#if $busco_mode.mode == 'geno' and $busco_mode.use_augustus.use_augustus_selector == 'yes':
+
 if [ -z "\$AUGUSTUS_CONFIG_PATH" ] ; then BUSCO_PATH=\$(dirname \$(which busco)) ; export AUGUSTUS_CONFIG_PATH=\$(realpath \${BUSCO_PATH}/../config) ; fi &&
 cp -r "\$AUGUSTUS_CONFIG_PATH/" augustus_dir/ &&
 export AUGUSTUS_CONFIG_PATH=`pwd`/augustus_dir/ &&
 
-#if $busco_mode.mode == 'geno' and $busco_mode.use_augustus.use_augustus_selector == 'yes' and $busco_mode.use_augustus.aug_prediction.augustus_mode == 'history':
+#if $busco_mode.use_augustus.aug_prediction.augustus_mode == 'history':
     ## Using an augustus model from history, we need to unzip it and let augustus find it
     mkdir -p 'augustus_dir/species/' &&
     tar -C 'augustus_dir/species/' -xzf '${busco_mode.use_augustus.aug_prediction.augustus_model}' &&
 #end if
 
+#end if
+
 busco
 --in '${input}'
 --update-data
@@ -59,6 +64,14 @@
     generate_plot.py -wd BUSCO_summaries -rt specific
 #end if
 
+#if $outputs and 'gff' in $outputs:
+    &&
+    echo "\##gff-version 3" > busco_output.gff
+    &&
+    ## gff files can be absent
+    cat busco_galaxy/run_*/busco_sequences/*busco_sequences/*.gff >> busco_output.gff 2> /dev/null || true
+#end if
+
 ]]>    </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." />
@@ -123,6 +136,7 @@
             <option value="short_summary" selected="true">short summary text</option>
             <option value="missing">list with missing IDs</option>
             <option value="image">summary image</option>
+            <option value="gff">gff</option>
         </param>
 
         <section name="adv" title="Advanced Options" expanded="False">
@@ -141,9 +155,12 @@
         <data name='summary_image' format='png' label="${tool.name} on ${on_string}: summary image" from_work_dir="BUSCO_summaries/busco_figure.png">
             <filter>outputs and 'image' in outputs</filter>
         </data>
+        <data name='busco_gff' format='gff3' label="${tool.name} on ${on_string}: GFF" from_work_dir="busco_output.gff">
+            <filter>outputs and 'gff' in outputs</filter>
+        </data>
     </outputs>
     <tests>
-        <test expect_num_outputs="3">
+        <test expect_num_outputs="4">
             <param name="input" value="genome.fa" />
             <conditional name="lineage">
                 <param name="lineage_mode" value="select_lineage" />
@@ -155,16 +172,22 @@
                     <param name="use_augustus_selector" value="yes" />
                 </conditional>
             </conditional>
-            <param name="outputs" value="short_summary,missing" />
+            <param name="outputs" value="short_summary,missing,gff" />
             <output name="busco_sum" file="genome_results/short_summary" compare="diff" lines_diff="4" />
             <output name="busco_table" file="genome_results/full_table" compare="diff" lines_diff="4" />
+            <output name="busco_gff">
+                <assert_contents>
+                    <has_n_lines n="1"/>
+                    <has_text text="##gff-version 3" />
+                </assert_contents>
+            </output>
             <output name="busco_missing" file="genome_results/missing_buscos_list" compare="diff" lines_diff="4">
                 <assert_contents>
                     <has_text text="# BUSCO version is: @TOOL_VERSION@" />
                 </assert_contents>
             </output>
         </test>
-        <test expect_num_outputs="4">
+        <test expect_num_outputs="5">
             <param name="input" value="proteome.fa" />
             <conditional name="lineage">
                 <param name="lineage_mode" value="select_lineage" />
@@ -173,13 +196,19 @@
             <conditional name="busco_mode">
                 <param name="mode" value="prot" />
             </conditional>
-            <param name="outputs" value="short_summary,missing,image" />
+            <param name="outputs" value="short_summary,missing,image,gff" />
             <output name="busco_sum" file="proteome_results/short_summary" compare="diff" lines_diff="4" />
             <output name="busco_table" file="proteome_results/full_table" compare="diff" lines_diff="4" />
             <output name="busco_missing" file="proteome_results/missing_buscos_list" compare="diff" lines_diff="4" />
             <output name="summary_image" file="proteome_results/summary.png" compare="sim_size" />
+            <output name="busco_gff">
+                <assert_contents>
+                    <has_n_lines n="1"/>
+                    <has_text text="##gff-version 3" />
+                </assert_contents>
+            </output>
         </test>
-        <test expect_num_outputs="4">
+        <test expect_num_outputs="5">
             <param name="input" value="transcriptome.fa" />
             <conditional name="lineage">
                 <param name="lineage_mode" value="select_lineage" />
@@ -188,13 +217,14 @@
             <conditional name="busco_mode">
                 <param name="mode" value="tran" />
             </conditional>
-            <param name="outputs" value="short_summary,missing,image" />
+            <param name="outputs" value="short_summary,missing,image,gff" />
             <output name="busco_sum" file="transcriptome_results/short_summary" compare="diff" lines_diff="6" />
             <output name="busco_table" file="transcriptome_results/full_table" compare="diff" lines_diff="6" />
             <output name="busco_missing" file="transcriptome_results/missing_buscos_list" compare="diff" lines_diff="6" />
             <output name="summary_image" file="transcriptome_results/summary.png" compare="sim_size" />
+            <output name="busco_gff" file="transcriptome_results/out.gff" compare="diff" />
         </test>
-        <test expect_num_outputs="2">
+        <test expect_num_outputs="3">
             <param name="input" value="genome.fa" />
             <conditional name="lineage">
                 <param name="lineage_mode" value="select_lineage" />
@@ -210,9 +240,15 @@
                     </conditional>
                 </conditional>
             </conditional>
-            <param name="outputs" value="short_summary" />
+            <param name="outputs" value="short_summary,gff" />
             <output name="busco_sum" file="genome_results/short_summary" compare="diff" lines_diff="4" />
             <output name="busco_table" file="genome_results/full_table" compare="diff" lines_diff="4" />
+            <output name="busco_gff">
+                <assert_contents>
+                    <has_n_lines n="1"/>
+                    <has_text text="##gff-version 3" />
+                </assert_contents>
+            </output>
         </test>
         <test expect_num_outputs="3">
             <param name="input" value="genome.fa" />
@@ -235,7 +271,7 @@
             <output name="busco_table" file="genome_results/full_table" compare="diff" lines_diff="4" />
             <output name="busco_missing" file="genome_results/missing_buscos_list" compare="diff" lines_diff="4" />
         </test>
-        <test expect_num_outputs="4">
+        <test expect_num_outputs="5">
             <param name="input" value="genome.fa" />
             <conditional name="lineage">
                 <param name="lineage_mode" value="select_lineage" />
@@ -247,13 +283,14 @@
                     <param name="use_augustus_selector" value="no" />
                 </conditional>
             </conditional>
-            <param name="outputs" value="short_summary,missing,image" />
+            <param name="outputs" value="short_summary,missing,image,gff" />
             <output name="busco_sum" file="genome_results_metaeuk/short_summary" compare="diff" lines_diff="6" />
             <output name="busco_table" file="genome_results_metaeuk/full_table" compare="diff" lines_diff="6" />
             <output name="busco_missing" file="genome_results_metaeuk/missing_buscos_list" compare="diff" lines_diff="6" />
             <output name="summary_image" file="genome_results_metaeuk/summary.png" compare="sim_size" />
+            <output name="busco_gff" file="genome_results_metaeuk/out.gff" compare="diff" />
         </test>
-        <test expect_num_outputs="4">
+        <test expect_num_outputs="5">
             <param name="input" value="genome.fa" />
             <conditional name="lineage">
                 <param name="lineage_mode" value="auto_detect" />
@@ -265,11 +302,12 @@
                     <param name="use_augustus_selector" value="no" />
                 </conditional>
             </conditional>
-            <param name="outputs" value="short_summary,missing,image" />
+            <param name="outputs" value="short_summary,missing,image,gff" />
             <output name="busco_sum" file="genome_results_metaeuk_auto/short_summary" compare="diff" lines_diff="6" />
             <output name="busco_table" file="genome_results_metaeuk_auto/full_table" compare="diff" lines_diff="2" />
             <output name="busco_missing" file="genome_results_metaeuk_auto/missing_buscos_list" compare="diff" lines_diff="2" />
             <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>
     </tests>
     <help><![CDATA[