Repository 'kraken_report'
hg clone https://toolshed.g2.bx.psu.edu/repos/devteam/kraken_report

Changeset 6:1902d3de4a4f (2019-12-04)
Previous changeset 5:6c09bed3444f (2018-09-13) Next changeset 7:1c677354ab18 (2024-03-12)
Commit message:
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/blob/master/tool_collections/kraken/ commit 06345505a91f3dcfa8a37dceb6f25e95806dddc8"
modified:
kraken-report.xml
macros.xml
tool-data/kraken_databases.loc.sample
added:
test-data/kraken-report/kraken_mpa_report_input1.tab
test-data/kraken-report/kraken_mpa_report_input2.tab
test-data/kraken-report/kraken_mpa_report_test1_output.tab
test-data/kraken-report/kraken_report_test1.tab
test-data/kraken-report/kraken_report_test1_output.tab
test-data/kraken-report/test_database.loc
removed:
kraken-mpa-report.xml
test-data/kraken_mpa_report_input1.tab
test-data/kraken_mpa_report_input2.tab
test-data/kraken_mpa_report_test1_output.tab
test-data/kraken_report_test1.tab
test-data/kraken_report_test1_output.tab
test-data/test_database.loc
test-data/test_db/database.idx
test-data/test_db/database.kdb
test-data/test_db/taxonomy/names.dmp
test-data/test_db/taxonomy/nodes.dmp
b
diff -r 6c09bed3444f -r 1902d3de4a4f kraken-mpa-report.xml
--- a/kraken-mpa-report.xml Thu Sep 13 09:45:15 2018 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,81 +0,0 @@
-<?xml version="1.0"?>
-<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="version_command" />
-    <command detect_errors="exit_code"><![CDATA[
-    #set $names = []
-
-    #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@
-        #for $name in $names:
-            '${name}'
-        #end for
-
-        ${show_zeros}
-        ${header_line}
-
-        > '$output_report'
-    ]]></command>
-    <inputs>
-        <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>
-        <data format="tabular" name="output_report" />
-    </outputs>
-    <tests>
-        <test>
-            <param name="classification" value="kraken_mpa_report_input1.tab,kraken_mpa_report_input2.tab" ftype="tabular"/>
-            <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" ftype="tabular" file="kraken_mpa_report_test1_output.tab" />
-        </test>
-    </tests>
-    <help>
-<![CDATA[
-
-.. class:: warningmark
-
-**Note**: the database used must be the same as the one used in the original Kraken run
-
------
-
-**What is Does**
-
-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 a tab-delimited table, with one line per taxon.
-
-]]>
-    </help>
-    <expand macro="citations" />
-</tool>
b
diff -r 6c09bed3444f -r 1902d3de4a4f kraken-report.xml
--- a/kraken-report.xml Thu Sep 13 09:45:15 2018 -0400
+++ b/kraken-report.xml Wed Dec 04 06:52:03 2019 -0500
b
@@ -24,9 +24,9 @@
     </outputs>
     <tests>
         <test>
-            <param name="kraken_output" value="kraken_report_test1.tab" ftype="tabular"/>
-            <param name="kraken_database" value="test_db"/>
-            <output name="output_report" ftype="tabular" file="kraken_report_test1_output.tab"/>
+            <param name="kraken_output" value="kraken-report/kraken_report_test1.tab" ftype="tabular"/>
+            <param name="kraken_database" value="new_style_test_entry"/>
+            <output name="output_report" ftype="tabular" file="kraken-report/kraken_report_test1_output.tab"/>
         </test>
     </tests>
 
b
diff -r 6c09bed3444f -r 1902d3de4a4f macros.xml
--- a/macros.xml Thu Sep 13 09:45:15 2018 -0400
+++ b/macros.xml Wed Dec 04 06:52:03 2019 -0500
[
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
 <macros>
-    <token name="@WRAPPER_VERSION@">1.2.4</token>
+    <token name="@WRAPPER_VERSION@">1.3.1</token>
     <xml name="requirements">
         <requirements>
-            <requirement type="package" version="0.10.6_eaf8fb68">kraken</requirement>
+            <requirement type="package" version="1.1.1">kraken</requirement>
         </requirements>
     </xml>
     <xml name="version_command">
@@ -23,6 +23,10 @@
             <citation type="doi">10.1186/gb-2014-15-3-r46</citation>
         </citations>
     </xml>
-    <token name="@INPUT_DATABASE@">--db '${kraken_database.fields.name}'</token>
-    <token name="@SET_DATABASE_PATH@">export KRAKEN_DB_PATH='${kraken_database.fields.path}'</token>
+    <!-- See the kraken_databases.loc.sample documentation,
+         this if statement is for backward compatibility as early
+         versions of the wrapper assumed the UI facing field name
+         was also part of the directory path -->
+    <token name="@SET_DATABASE_PATH@">if [ -d '${kraken_database.fields.path}/${kraken_database.fields.name}' ]; then export KRAKEN_DEFAULT_DB='${kraken_database.fields.path}/${kraken_database.fields.name}'; else export KRAKEN_DEFAULT_DB='${kraken_database.fields.path}'; fi</token>
+    <token name="@INPUT_DATABASE@">--db "\$KRAKEN_DEFAULT_DB"</token>
 </macros>
b
diff -r 6c09bed3444f -r 1902d3de4a4f test-data/kraken-report/kraken_mpa_report_input1.tab
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/kraken-report/kraken_mpa_report_input1.tab Wed Dec 04 06:52:03 2019 -0500
b
@@ -0,0 +1,4 @@
+C gi|145231|gb|M33724.1|ECOALPHOA 83333 171 83333:162
+C gi|145232|gb|M33725.1|ECOALPHOB 83333 183 83333:174
+C gi|145234|gb|M33727.1|ECOALPHOE 83333 97 83333:88
+C gi|146195|gb|J01619.1|ECOGLTA 83333 3850 83333:3841
b
diff -r 6c09bed3444f -r 1902d3de4a4f test-data/kraken-report/kraken_mpa_report_input2.tab
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/kraken-report/kraken_mpa_report_input2.tab Wed Dec 04 06:52:03 2019 -0500
b
@@ -0,0 +1,4 @@
+C gi|145231|gb|M33724.1|ECOALPHOA 83333 171 83333:162
+C gi|145232|gb|M33725.1|ECOALPHOB 83333 183 83333:174
+C gi|145234|gb|M33727.1|ECOALPHOE 83333 97 83333:88
+C gi|146195|gb|J01619.1|ECOGLTA 83333 3850 83333:3841
b
diff -r 6c09bed3444f -r 1902d3de4a4f test-data/kraken-report/kraken_mpa_report_test1_output.tab
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/kraken-report/kraken_mpa_report_test1_output.tab Wed Dec 04 06:52:03 2019 -0500
b
@@ -0,0 +1,8 @@
+#Sample ID kraken_mpa_report_input1.tab kraken_mpa_report_input2.tab
+d__Bacteria 4 4
+d__Bacteria|p__Proteobacteria 4 4
+d__Bacteria|p__Proteobacteria|c__Gammaproteobacteria 4 4
+d__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacteriales 4 4
+d__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacteriales|f__Enterobacteriaceae 4 4
+d__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacteriales|f__Enterobacteriaceae|g__Escherichia 4 4
+d__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacteriales|f__Enterobacteriaceae|g__Escherichia|s__Escherichia_coli 4 4
b
diff -r 6c09bed3444f -r 1902d3de4a4f test-data/kraken-report/kraken_report_test1.tab
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/kraken-report/kraken_report_test1.tab Wed Dec 04 06:52:03 2019 -0500
b
@@ -0,0 +1,4 @@
+C gi|145231|gb|M33724.1|ECOALPHOA 83333 171 83333:162
+C gi|145232|gb|M33725.1|ECOALPHOB 83333 183 83333:174
+C gi|145234|gb|M33727.1|ECOALPHOE 83333 97 83333:88
+C gi|146195|gb|J01619.1|ECOGLTA 83333 3850 83333:3841
b
diff -r 6c09bed3444f -r 1902d3de4a4f test-data/kraken-report/kraken_report_test1_output.tab
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/kraken-report/kraken_report_test1_output.tab Wed Dec 04 06:52:03 2019 -0500
b
@@ -0,0 +1,11 @@
+  0.00 0 0 U 0 unclassified
+100.00 4 0 - 1 root
+100.00 4 0 - 131567   cellular organisms
+100.00 4 0 D 2     Bacteria
+100.00 4 0 P 1224       Proteobacteria
+100.00 4 0 C 1236         Gammaproteobacteria
+100.00 4 0 O 91347           Enterobacteriales
+100.00 4 0 F 543             Enterobacteriaceae
+100.00 4 0 G 561               Escherichia
+100.00 4 0 S 562                 Escherichia coli
+100.00 4 4 - 83333                   Escherichia coli K-12
b
diff -r 6c09bed3444f -r 1902d3de4a4f test-data/kraken-report/test_database.loc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/kraken-report/test_database.loc Wed Dec 04 06:52:03 2019 -0500
b
@@ -0,0 +1,20 @@
+# Tab separated with three columns:
+# - value (Galaxy records this in the Galaxy DB)
+# - name (Galaxy shows this in the UI)
+# - path (folder name containing the Kraken DB)
+#
+# Modern usage assumes $path is the folder containing
+# the Kraken database of interest:
+#
+new_style_test_entry "Test Database" ${__HERE__}/test_db
+
+# The kraken wrapper still supports an alternative
+# legacy usage where $path/$name is the folder
+# containing the Kraken database of interest, meaning
+# $name must be both a folder name and human readable
+# description of the DB to show in the Galaxy UI:
+old_style_test_entry test_db ${__HERE__}
+
+# NOTE: This legacy style should be avoided as other
+# tools also using the kraken_database.loc file may
+# not understand it!
b
diff -r 6c09bed3444f -r 1902d3de4a4f test-data/kraken_mpa_report_input1.tab
--- a/test-data/kraken_mpa_report_input1.tab Thu Sep 13 09:45:15 2018 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,4 +0,0 @@
-C gi|145231|gb|M33724.1|ECOALPHOA 83333 171 83333:162
-C gi|145232|gb|M33725.1|ECOALPHOB 83333 183 83333:174
-C gi|145234|gb|M33727.1|ECOALPHOE 83333 97 83333:88
-C gi|146195|gb|J01619.1|ECOGLTA 83333 3850 83333:3841
b
diff -r 6c09bed3444f -r 1902d3de4a4f test-data/kraken_mpa_report_input2.tab
--- a/test-data/kraken_mpa_report_input2.tab Thu Sep 13 09:45:15 2018 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,4 +0,0 @@
-C gi|145231|gb|M33724.1|ECOALPHOA 83333 171 83333:162
-C gi|145232|gb|M33725.1|ECOALPHOB 83333 183 83333:174
-C gi|145234|gb|M33727.1|ECOALPHOE 83333 97 83333:88
-C gi|146195|gb|J01619.1|ECOGLTA 83333 3850 83333:3841
b
diff -r 6c09bed3444f -r 1902d3de4a4f test-data/kraken_mpa_report_test1_output.tab
--- a/test-data/kraken_mpa_report_test1_output.tab Thu Sep 13 09:45:15 2018 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,8 +0,0 @@
-#Sample ID kraken_mpa_report_input1.tab kraken_mpa_report_input2.tab
-d__Bacteria 4 4
-d__Bacteria|p__Proteobacteria 4 4
-d__Bacteria|p__Proteobacteria|c__Gammaproteobacteria 4 4
-d__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacteriales 4 4
-d__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacteriales|f__Enterobacteriaceae 4 4
-d__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacteriales|f__Enterobacteriaceae|g__Escherichia 4 4
-d__Bacteria|p__Proteobacteria|c__Gammaproteobacteria|o__Enterobacteriales|f__Enterobacteriaceae|g__Escherichia|s__Escherichia_coli 4 4
b
diff -r 6c09bed3444f -r 1902d3de4a4f test-data/kraken_report_test1.tab
--- a/test-data/kraken_report_test1.tab Thu Sep 13 09:45:15 2018 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,4 +0,0 @@
-C gi|145231|gb|M33724.1|ECOALPHOA 83333 171 83333:162
-C gi|145232|gb|M33725.1|ECOALPHOB 83333 183 83333:174
-C gi|145234|gb|M33727.1|ECOALPHOE 83333 97 83333:88
-C gi|146195|gb|J01619.1|ECOGLTA 83333 3850 83333:3841
b
diff -r 6c09bed3444f -r 1902d3de4a4f test-data/kraken_report_test1_output.tab
--- a/test-data/kraken_report_test1_output.tab Thu Sep 13 09:45:15 2018 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,11 +0,0 @@
-  0.00 0 0 U 0 unclassified
-100.00 4 0 - 1 root
-100.00 4 0 - 131567   cellular organisms
-100.00 4 0 D 2     Bacteria
-100.00 4 0 P 1224       Proteobacteria
-100.00 4 0 C 1236         Gammaproteobacteria
-100.00 4 0 O 91347           Enterobacteriales
-100.00 4 0 F 543             Enterobacteriaceae
-100.00 4 0 G 561               Escherichia
-100.00 4 0 S 562                 Escherichia coli
-100.00 4 4 - 83333                   Escherichia coli K-12
b
diff -r 6c09bed3444f -r 1902d3de4a4f test-data/test_database.loc
--- a/test-data/test_database.loc Thu Sep 13 09:45:15 2018 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,1 +0,0 @@
-test_db test_db ${__HERE__}
\ No newline at end of file
b
diff -r 6c09bed3444f -r 1902d3de4a4f test-data/test_db/database.idx
b
Binary file test-data/test_db/database.idx has changed
b
diff -r 6c09bed3444f -r 1902d3de4a4f test-data/test_db/database.kdb
b
Binary file test-data/test_db/database.kdb has changed
b
diff -r 6c09bed3444f -r 1902d3de4a4f test-data/test_db/taxonomy/names.dmp
--- a/test-data/test_db/taxonomy/names.dmp Thu Sep 13 09:45:15 2018 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
[
@@ -1,74 +0,0 @@
-83333 | Escherichia coli K-12 | | scientific name |
-83333 | Escherichia coli K12 | | equivalent name |
-562 | "Bacillus coli" Migula 1895 | | authority |
-562 | "Bacterium coli commune" Escherich 1885 | | authority |
-562 | "Bacterium coli" (Migula 1895) Lehmann and Neumann 1896 | | authority |
-562 | ATCC 11775 | | type material |
-562 | Bacillus coli | | synonym |
-562 | Bacterium coli | | synonym |
-562 | Bacterium coli commune | | synonym |
-562 | CCUG 24 | | type material |
-562 | CCUG 29300 | | type material |
-562 | CIP 54.8 | | type material |
-562 | DSM 30083 | | type material |
-562 | Enterococcus coli | | synonym |
-562 | Escherchia coli | | misspelling |
-562 | Escherichia coli | | scientific name |
-562 | Escherichia coli (Migula 1895) Castellani and Chalmers 1919 | | authority |
-562 | Escherichia sp. MAR | | includes |
-562 | Escherichia/Shigella coli | | equivalent name |
-562 | Eschericia coli | | misspelling |
-562 | JCM 1649 | | type material |
-562 | LMG 2092 | | type material |
-562 | NBRC 102203 | | type material |
-562 | NCCB 54008 | | type material |
-562 | NCTC 9001 | | type material |
-562 | bacterium 10a | | includes |
-562 | bacterium E3 | | includes |
-561 | Escherchia | | misspelling |
-561 | Escherichia | | scientific name |
-561 | Escherichia Castellani and Chalmers 1919 | | authority |
-543 | Enterobacteraceae | | synonym |
-543 | Enterobacteraceae (ex Lapage 1979) Lapage 1982, fam. nov., nom. rev. | | synonym |
-543 | Enterobacteriaceae | | scientific name |
-543 | Enterobacteriaceae (ex Rahn 1937) Ewing et al. 1980, fam. nov., nom. rev. | | synonym |
-543 | Enterobacteriaceae Rahn 1937 | | synonym |
-543 | gamma-3 proteobacteria | gamma-3 proteobacteria <#1> | in-part |
-91347 | 'Enterobacteriales' | | synonym |
-91347 | Enterobacteriaceae and related endosymbionts | | synonym |
-91347 | Enterobacteriaceae group | | synonym |
-91347 | Enterobacteriales | | scientific name |
-91347 | enterobacteria | enterobacteria<blast91347> | blast name |
-91347 | gamma-3 proteobacteria | gamma-3 proteobacteria <#5> | in-part |
-1236 | Gammaproteobacteria | | scientific name |
-1236 | Gammaproteobacteria Garrity et al. 2005 | | synonym |
-1236 | Proteobacteria gamma subdivision | | synonym |
-1236 | Purple bacteria, gamma subdivision | | synonym |
-1236 | g-proteobacteria | gamma proteos<blast1236> | blast name |
-1236 | gamma proteobacteria | | synonym |
-1236 | gamma subdivision | | synonym |
-1236 | gamma subgroup | | synonym |
-1224 | Proteobacteria | | scientific name |
-1224 | Proteobacteria Garrity et al. 2005 | | authority |
-1224 | Proteobacteria [class] Stackebrandt et al. 1988 | | authority |
-1224 | not Proteobacteria Cavalier-Smith 2002 | | authority |
-1224 | proteobacteria | proteobacteria<blast1224> | blast name |
-1224 | purple bacteria | | common name |
-1224 | purple bacteria and relatives | | common name |
-1224 | purple non-sulfur bacteria | | common name |
-1224 | purple photosynthetic bacteria | | common name |
-1224 | purple photosynthetic bacteria and relatives | | common name |
-2 | Bacteria | Bacteria <prokaryote> | scientific name |
-2 | Monera | Monera <Bacteria> | in-part |
-2 | Procaryotae | Procaryotae <Bacteria> | in-part |
-2 | Prokaryota | Prokaryota <Bacteria> | in-part |
-2 | Prokaryotae | Prokaryotae <Bacteria> | in-part |
-2 | bacteria | bacteria <blast2> | blast name |
-2 | eubacteria | | genbank common name |
-2 | not Bacteria Haeckel 1894 | | synonym |
-2 | prokaryote | prokaryote <Bacteria> | in-part |
-2 | prokaryotes | prokaryotes <Bacteria> | in-part |
-1 | all | | synonym |
-1 | root | | scientific name |
-131567 | biota | | synonym |
-131567 | cellular organisms | | scientific name |
b
diff -r 6c09bed3444f -r 1902d3de4a4f test-data/test_db/taxonomy/nodes.dmp
--- a/test-data/test_db/taxonomy/nodes.dmp Thu Sep 13 09:45:15 2018 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,10 +0,0 @@
-83333 | 562 | no rank | | 0 | 1 | 11 | 1 | 0 | 1 | 1 | 0 | |
-562 | 561 | species | EC | 0 | 1 | 11 | 1 | 0 | 1 | 1 | 0 | |
-561 | 543 | genus | | 0 | 1 | 11 | 1 | 0 | 1 | 0 | 0 | |
-543 | 91347 | family | | 0 | 1 | 11 | 1 | 0 | 1 | 0 | 0 | |
-91347 | 1236 | order | | 0 | 1 | 11 | 1 | 0 | 1 | 0 | 0 | |
-1236 | 1224 | class | | 0 | 1 | 11 | 1 | 0 | 1 | 0 | 0 | |
-1224 | 2 | phylum | | 0 | 1 | 11 | 1 | 0 | 1 | 0 | 0 | |
-2 | 131567 | superkingdom | | 0 | 0 | 11 | 0 | 0 | 0 | 0 | 0 | |
-131567 | 1 | no rank | | 8 | 1 | 1 | 1 | 0 | 1 | 1 | 0 | |
-1 | 1 | no rank | | 8 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | |
b
diff -r 6c09bed3444f -r 1902d3de4a4f tool-data/kraken_databases.loc.sample
--- a/tool-data/kraken_databases.loc.sample Thu Sep 13 09:45:15 2018 -0400
+++ b/tool-data/kraken_databases.loc.sample Wed Dec 04 06:52:03 2019 -0500
b
@@ -0,0 +1,18 @@
+# Expect three columns, tab separated, as follows:
+# - value (Galaxy records this in the Galaxy DB)
+# - name (Galaxy shows this in the UI)
+# - path (folder name containing the Kraken DB)
+#
+# e.g.
+# plants2018<tab>Plant genomes (2018)<tab>/path/to/krakenDB/plants_2018
+#
+# For backward compatibility the Kraken wrapper also accepts:
+# - value (Galaxy records this in the Galaxy DB)
+# - name (Final part of folder name, Galaxy shows this in the UI)
+# - path (Parent folder name, where $path/$name contains the Kraken DB)
+#
+# e.g.
+# plants2018<tab>plants_2018<tab>/path/to/krakenDB
+#
+# Please avoid this legacy usage, as not all tools using
+# the kraken_databases.loc file will understand it.