changeset 5:19035a7b1106 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bracken commit 004793bd31d2b4dcc065fb1fe3ad40fa98190c56
author iuc
date Wed, 06 Jul 2022 14:47:54 +0000
parents b08ac10aed96
children 79450f7fd718
files est-abundance.xml macros.xml test-data/NC_011750.1_simulated_kraken_style_bracken_report.txt
diffstat 3 files changed, 25 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/est-abundance.xml	Mon Jun 07 20:32:37 2021 +0000
+++ b/est-abundance.xml	Wed Jul 06 14:47:54 2022 +0000
@@ -1,4 +1,4 @@
-<tool id="est_abundance" name="Estimate Abundance at Taxonomic Level" version="@TOOL_VERSION@+galaxy0">
+<tool id="est_abundance" name="Estimate Abundance at Taxonomic Level" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@">
     <description>Bayesian Reestimation of Abundance with KrakEN</description>
     <macros>
         <import>macros.xml</import>
@@ -10,6 +10,9 @@
     <edam_operations>
         <edam_operation>operation_2238</edam_operation>
     </edam_operations>
+    <xrefs>
+        <xref type="bio.tools">bracken</xref>
+    </xrefs>
     <expand macro="requirements" />    
     <command detect_errors="exit_code"><![CDATA[
     est_abundance.py 
@@ -18,6 +21,8 @@
     -l $level 
     -t $threshold 
     -o '$report'
+    ## --out-report needs to be set always, since it is written next to the input file
+    --out-report bracken.report
     ]]>
     </command>    
     <inputs>
@@ -39,22 +44,28 @@
         <param name="threshold" type="integer" value="10" label="Number of mismatches allowed when matching tag"
                help="Threshold for the minimum number of reads kraken must assign to a classification for that 
                      classification to be considered in the final abundance estimation." />
+        <param argument="--out-report" type="boolean" checked="false" label="Produce Kraken-Style Bracken report"/>
     </inputs>
     <outputs>
         <data name="report" format="tabular" label="${tool.name} on ${on_string}: Report" />
+        <data name="kraken_report" format="tabular" from_work_dir="bracken.report" label="${tool.name} on ${on_string}: Kraken style report">
+            <filter>out_report</filter>
+        </data>
     </outputs>
     <tests>
-        <test>
+        <test expect_num_outputs="1">
             <param name="input" value="NC_003198.1_simulated_kraken_report.txt" ftype="tabular"/>
             <param name="level" value="S" />
             <param name="bracken_database" value="test_entry"/>
             <output name="report" file="NC_003198.1_simulated_bracken_report.txt" ftype="tabular"/>
         </test>
-        <test>
+        <test expect_num_outputs="2">
             <param name="input" value="NC_011750.1_simulated_kraken_report.txt" ftype="tabular"/>
             <param name="level" value="S" />
             <param name="bracken_database" value="test_entry"/>
+            <param name="out_report" value="true"/>
             <output name="report" file="NC_011750.1_simulated_bracken_report.txt" ftype="tabular"/>
+            <output name="kraken_report" file="NC_011750.1_simulated_kraken_style_bracken_report.txt" ftype="tabular"/>
         </test>
     </tests>
     <help>
--- a/macros.xml	Mon Jun 07 20:32:37 2021 +0000
+++ b/macros.xml	Wed Jul 06 14:47:54 2022 +0000
@@ -1,5 +1,6 @@
 <macros>
-    <token name="@TOOL_VERSION@">2.6.1</token>
+    <token name="@TOOL_VERSION@">2.7</token>
+    <token name="@VERSION_SUFFIX@">0</token>
     <xml name="requirements">
         <requirements>
             <requirement type="package" version="@TOOL_VERSION@">bracken</requirement>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/NC_011750.1_simulated_kraken_style_bracken_report.txt	Wed Jul 06 14:47:54 2022 +0000
@@ -0,0 +1,9 @@
+100.00	43	0	R	1	root
+100.00	43	0	R1	131567	  cellular organisms
+100.00	43	0	D	2	    Bacteria
+100.00	43	0	P	1224	      Proteobacteria
+100.00	43	0	C	1236	        Gammaproteobacteria
+100.00	43	0	O	91347	          Enterobacterales
+100.00	43	0	F	543	            Enterobacteriaceae
+100.00	43	0	G	561	              Escherichia
+100.00	43	43	S	562	                Escherichia coli