changeset 2:528a1d91b066 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/kraken_taxonomy_report commit 11ee7ac206d41894c0b6a11f2439aaea490824f0
author iuc
date Thu, 09 Nov 2017 14:06:54 -0500
parents b97694b21bc3
children b11b3ac48bb9
files kraken_taxonomy_report.py kraken_taxonomy_report.xml tool_data_table_conf.xml.sample tool_data_table_conf.xml.test
diffstat 4 files changed, 17 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/kraken_taxonomy_report.py	Wed Nov 23 03:27:33 2016 -0500
+++ b/kraken_taxonomy_report.py	Thu Nov 09 14:06:54 2017 -0500
@@ -8,10 +8,10 @@
 
 from __future__ import print_function
 
-import sys
+import optparse
 import os
-import optparse
 import re
+import sys
 
 __VERSION__ = '0.0.2'
 
@@ -246,7 +246,7 @@
         ranks_to_report = RANK_NAMES_INTS
 
     if options.output:
-        output_fh = open( options.output, 'wb+' )
+        output_fh = open(options.output, 'w')
     else:
         output_fh = sys.stdout
 
--- a/kraken_taxonomy_report.xml	Wed Nov 23 03:27:33 2016 -0500
+++ b/kraken_taxonomy_report.xml	Thu Nov 09 14:06:54 2017 -0500
@@ -8,18 +8,16 @@
         <exit_code range="1:" />
         <exit_code range=":-1" />
     </stdio>
-    <version_command>python ${__tool_directory__}/kraken_taxonomy_report.py --version</version_command>
-    <command>
-<![CDATA[
-
+    <version_command>python '${__tool_directory__}/kraken_taxonomy_report.py' --version</version_command>
+    <command><![CDATA[
 #for $input_classification in $classification:
     ln -s "${input_classification}" "${input_classification.element_identifier}" &&
 #end for
 
-export KRAKEN_DB_PATH="${kraken_database.fields.path}" && 
-python ${__tool_directory__}/kraken_taxonomy_report.py
+export KRAKEN_DB_PATH='${kraken_database.fields.path}' &&
+python '${__tool_directory__}/kraken_taxonomy_report.py'
 
---db "${kraken_database.fields.name}"
+--db '${kraken_database.fields.name}'
 ${show_zeros}
 ${header_line}
 ${otu_name}
@@ -28,23 +26,21 @@
 ${intermediate}
 ${sanitize_names}
 #if str( $cluster.cluster ):
-    --cluster "${cluster.cluster}"
+    --cluster ${cluster.cluster}
 #else:
     ${cluster.summation}
 #end if
 
---output "${output_report}"
+--output '${output_report}'
 
 #if $output_tree:
-    --output-tree "${output_tree}"
+    --output-tree '${output_tree}'
 #end if
 
 #for $input_classification in $classification:
-    "${input_classification.element_identifier}"
+    '${input_classification.element_identifier}'
 #end for
-
-]]>
-    </command>
+    ]]></command>
     <inputs>
         <param format="tabular" label="Kraken output" multiple="True" name="classification" type="data" />
         <param checked="False" falsevalue="" argument="--show-zeros" label="Display taxa even if they lack a read in any sample" name="show_zeros" truevalue="--show-zeros" type="boolean" />
@@ -207,9 +203,7 @@
             <output name="output_tree" file="output_tree_3.newick" />
         </test>
     </tests>
-    <help>
-<![CDATA[
-
+    <help><![CDATA[
 .. class:: warningmark
 
 **Note**: the database used must be the same as the one used in the original Kraken run
@@ -227,10 +221,7 @@
 The output is tab-delimited, with one line per taxon.
 
 Will optionally output a newick tree built from the kraken database taxonomy using the specified options. Tree branch lengths will be set to "1.00000".
-
-
-]]>
-    </help>
+    ]]></help>
     <citations>
         <citation type="bibtex">@unpublished{Kraken-Taxonomy-Report:2016,
           title  = "Kraken Taxonomy Report",
--- a/tool_data_table_conf.xml.sample	Wed Nov 23 03:27:33 2016 -0500
+++ b/tool_data_table_conf.xml.sample	Thu Nov 09 14:06:54 2017 -0500
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <tables>
     <!-- Locations of Kraken database in the required format -->
-    <table name="kraken_databases" comment_char="#">
+    <table name="kraken_databases" comment_char="#" allow_duplicate_entries="False">
         <columns>value, name, path</columns>
         <file path="tool-data/kraken_databases.loc" />
     </table>
--- a/tool_data_table_conf.xml.test	Wed Nov 23 03:27:33 2016 -0500
+++ b/tool_data_table_conf.xml.test	Thu Nov 09 14:06:54 2017 -0500
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <tables>
     <!-- Locations of Kraken database in the required format -->
-    <table name="kraken_databases" comment_char="#">
+    <table name="kraken_databases" comment_char="#" allow_duplicate_entries="False">
         <columns>value, name, path</columns>
         <file path="${__HERE__}/test-data/test_database.loc" />
     </table>