changeset 3:396aa10b1273 draft default tip

planemo upload for repository https://github.com/dfornika/galaxytools/blob/master/tools/kraken2 commit 70494d589aa1990618ebc7a895e91477d41c3203-dirty
author dfornika
date Mon, 04 Mar 2019 21:09:51 -0500
parents 82ccc25387ea
children
files kraken2.xml kraken2_databases.loc.sample macros.xml tool_data_table_conf.xml.sample
diffstat 4 files changed, 27 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/kraken2.xml	Mon Mar 04 14:03:53 2019 -0500
+++ b/kraken2.xml	Mon Mar 04 21:09:51 2019 -0500
@@ -11,32 +11,14 @@
         <![CDATA[
         kraken2
             --threads \${GALAXY_SLOTS:-1}
-            @INPUT_DATABASE@
+	    --db '${kraken2_database.fields.path}'
             #if $single_paired.single_paired_selector == 'yes'
-                #if $forward_input.is_of_type( 'fastq' ):
-                    --fastq-input
-                #else:
-                    --fasta-input
-                #end if
                 '${single_paired.forward_input}' '${single_paired.reverse_input}'
-                ${single_paired.check_names}
             #elif $single_paired.single_paired_selector == "collection":
-                #if $single_paired.input_pair.forward.is_of_type( 'fastq' ):
-                    --fastq-input
-                #else:
-                    --fasta-input
-                #end if
                 '${single_paired.input_pair.forward}' '${single_paired.input_pair.reverse}'
-                ${single_paired.check_names}
             #else:
-                #if $single_paired.input_sequences.is_of_type('fastq')
-                    --fastq-input
-                #else:
-                    --fasta-input
-                #end if
                 '${single_paired.input_sequences}'
             #end if
-            --db '$database'
             > '$output'
 	]]>
     </command>
@@ -49,17 +31,20 @@
             </param>
             <when value="collection">
                 <param format="fasta,fastq" name="input_pair" type="data_collection" collection_type="paired" label="Collection of paired reads" help="FASTA or FASTQ datasets" />
-                <param name="check_names" argument="--check-names" type="boolean" checked="False" truevalue="--paired --check-names" falsevalue="--paired" label="Verify read names match"/>
             </when>
             <when value="yes">
                 <param format="fasta,fastq" name="forward_input" type="data" label="Forward strand" help="FASTA or FASTQ dataset"/>
                 <param format="fasta,fastq" name="reverse_input" type="data" label="Reverse strand" help="FASTA or FASTQ dataset"/>
-                <param name="check_names" type="boolean" checked="False" truevalue="--paired --check-names" falsevalue="--paired" label="Verify read names match" help="--check-names" />
             </when>
             <when value="no">
                 <param format="fasta,fastq" label="Input sequences" name="input_sequences" type="data" help="FASTA or FASTQ datasets"/>
             </when>
         </conditional>
+	<param name="kraken2_database" type="select">
+	    <options from_data_table="kraken2_databases">
+	        <validator type="no_options" message="No Kraken2 databases are available" />
+            </options>
+        </param>
     </inputs>
     <outputs>
         <data name="output" format="" />
@@ -71,7 +56,7 @@
             <param name="split_reads" value="false"/>
             <param name="quick" value="no"/>
             <param name="only-classified-output" value="false"/>
-            <param name="kraken_database" value="new_style_test_entry"/>
+            <param name="kraken2_database" value="new_style_test_entry"/>
             <output name="output" file="kraken_test1_output.tab" ftype="tabular"/>
         </test>
     </tests>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/kraken2_databases.loc.sample	Mon Mar 04 21:09:51 2019 -0500
@@ -0,0 +1,7 @@
+# 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
--- a/macros.xml	Mon Mar 04 14:03:53 2019 -0500
+++ b/macros.xml	Mon Mar 04 21:09:51 2019 -0500
@@ -10,4 +10,9 @@
             </options>
         </param>
     </xml>
+    <xml name="citations">
+        <citations>
+            <citation type="doi">10.1186/gb-2014-15-3-r46</citation>
+        </citations>
+    </xml>
 </macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_data_table_conf.xml.sample	Mon Mar 04 21:09:51 2019 -0500
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<tables>
+    <!-- Locations of Kraken2 database in the required format -->
+    <table name="kraken2_databases" comment_char="#">
+        <columns>value, name, path</columns>
+        <file path="tool-data/kraken2_databases.loc" />
+    </table>
+</tables>