diff kraken-mpa-report.xml @ 4:a3a7440fc618 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/blob/master/tool_collections/kraken/kraken_report/ commit e8fc7c9dad5f583ad6763ecb9bd8c924832abacd
author iuc
date Mon, 07 Aug 2017 17:29:32 -0400
parents 9ae975c30dde
children 6c09bed3444f
line wrap: on
line diff
--- a/kraken-mpa-report.xml	Wed Mar 23 11:01:19 2016 -0400
+++ b/kraken-mpa-report.xml	Mon Aug 07 17:29:32 2017 -0400
@@ -1,35 +1,46 @@
 <?xml version="1.0"?>
-<tool id="kraken-mpa-report" name="Kraken-mpa-report" version="1.2.1">
+<tool id="kraken-mpa-report" name="Kraken-mpa-report" version="@WRAPPER_VERSION@">
     <description>view report of classification for multiple samples</description>
     <macros>
         <import>macros.xml</import>
     </macros>
     <expand macro="requirements" />
-    <expand macro="stdio" />
     <expand macro="version_command" />
-    <command>
-<![CDATA[
+    <command detect_errors="exit_code"><![CDATA[
+    #set $names = []
 
-#for $input_count, $input_classification in enumerate( $classification ):
-    ln -s "${input_classification}" "sample_${input_count}" &&
-#end for
+    #for $input_count, $input_classification in enumerate( $classification ):
+        #set $name_base = str( getattr( $input_classification, 'element_identifier', 'sample' ) ).replace( "/", '-' ).replace( "\t", "-" )
+        #set $name = $name_base
+        #set $i = 1
+        #while $name in $names:
+            #set $name = "%s_%s" % ( $name_base, $i )
+            #set $i = $i + 1
+        #end while
+        #silent $names.append( $name )
+        ln -s '${input_classification}' '${name}' &&
+    #end for
 
-@SET_DATABASE_PATH@ && kraken-mpa-report @INPUT_DATABASE@
+    @SET_DATABASE_PATH@ &&
 
-#for $input_count, $input_classification in enumerate( $classification ):
-    "sample_${input_count}"
-#end for
+    kraken-mpa-report
+        @INPUT_DATABASE@
+        #for $name in $names:
+            "${name}"
+        #end for
 
-${show_zeros}
-${header_line}
+        ${show_zeros}
+        ${header_line}
 
-> "$output_report"
-]]>
-    </command>
+        > '$output_report'
+    ]]></command>
     <inputs>
-        <param format="tabular" label="Kraken output" multiple="True" name="classification" type="data" />
-        <param checked="False" falsevalue="" help="--show-zeros" label="Display taxa even if they lack a read in any sample" name="show_zeros" truevalue="--show-zeros" type="boolean" />
-        <param checked="False" falsevalue="" help="--header-line" label="Display a header line indicating sample IDs" name="header_line" truevalue="--header-line" type="boolean" />
+        <param name="classification" format="tabular" label="Kraken output" multiple="True" type="data" />
+        <param name="show_zeros" argument="--show-zeros" type="boolean" falsevalue=""  truevalue="--show-zeros" checked="False"
+               label="Display taxa even if they lack a read in any sample" />
+        <param name="header_line" argument="--header-line" type="boolean" truevalue="--header-line" falsevalue="" checked="False"
+               label="Display a header line indicating sample IDs"/>
+
         <expand macro="input_database" />
     </inputs>
     <outputs>
@@ -41,7 +52,8 @@
             <param name="show_zeros" value="--show-zeros"/>
             <param name="header_line" value="--header-line"/>
             <param name="kraken_database" value="test_db"/>
-            <output name="output_report" file="kraken_mpa_report_test1_output.tab" ftype="tabular"/>
+
+            <output name="output_report" ftype="tabular" file="kraken_mpa_report_test1_output.tab" />
         </test>
     </tests>
     <help>
@@ -55,17 +67,13 @@
 
 **What is Does**
 
-Kraken-mpa-report summarizes read counts across taxonomic ranks for multiple samples. This is convenient for comparing results across multiple expreriments, conditions, locations, etc. It support sthe following parameters::
-
---show-zeros    Display taxa even if they lack a read in any sample
---header-line   Display a header line indicating sample IDs
-                (sample IDs are the filenames)
+Kraken-mpa-report summarizes read counts across taxonomic ranks for multiple samples. This is convenient for comparing results across multiple experiments, conditions, locations, etc.
 
 -----
 
 **Output**
 
-The output of kraken-mpa-report is tab-delimited, with one line per taxon.
+The output of kraken-mpa-report is a tab-delimited table, with one line per taxon.
 
 ]]>
     </help>