diff kodoja_search.xml @ 3:d4111d1de76f draft default tip

v0.0.8, expose kodoja_VRL.tsv output
author peterjc
date Fri, 14 Sep 2018 09:55:56 -0400
parents ee917702dbd8
children
line wrap: on
line diff
--- a/kodoja_search.xml	Mon Sep 10 09:16:13 2018 -0400
+++ b/kodoja_search.xml	Fri Sep 14 09:55:56 2018 -0400
@@ -1,13 +1,16 @@
-<tool id="kodoja_search" name="Kodoja database search" version="0.0.7">
+<tool id="kodoja_search" name="Kodoja database search" version="0.0.8">
     <description>identify viruses from plant RNA sequencing data</description>
     <requirements>
-        <requirement type="package" version="0.0.7">kodoja</requirement>
+        <requirement type="package" version="0.0.8">kodoja</requirement>
     </requirements>
     <version_command>kodoja_search.py --version</version_command>
     <command detect_errors="exit_code"><![CDATA[
+## This if statement is for backward compatibility as early versions of the Kraken
+## wrapper assumed the UI facing field name was also part of the directory path
+if [ -d '${kraken_db.fields.path}/${kraken_db.fields.name}' ]; then export KRAKEN_DEFAULT_DB='${kraken_db.fields.path}/${kraken_db.fields.name}'; else export KRAKEN_DEFAULT_DB='${kraken_db.fields.path}'; fi &&
 kodoja_search.py
 -t="\${GALAXY_SLOTS:-4}"
---kraken_db '${kraken_db.fields.path}'
+--kraken_db "\$KRAKEN_DEFAULT_DB"
 --kaiju_db '${kaiju_db.fields.path}'
 
 #if $single_paired.single_paired_selector == 'yes'
@@ -40,6 +43,10 @@
 -o .
 &&
 mv ./virus_table.txt '$combined_table'
+#if $capture_reads_table:
+&&
+mv ./kodoja_VRL.txt '$reads_table'
+#end if
 ]]></command>
     <inputs>
         <param label="Select a Kraken database" name="kraken_db" type="select">
@@ -68,9 +75,13 @@
                 <param format="fasta,fastq" label="Input sequences" name="input_sequences" type="data" help="FASTA or FASTQ datasets"/>
             </when>
         </conditional>
+        <param name="capture_reads_table" type="boolean" value="false" label="Capture read assignment table" help="This table can be used to filter out reads matched to (individual) viruses"/>
     </inputs>
     <outputs>
         <data name="combined_table" format="tabular" label="Kodoja species report for ${on_string}" />
+        <data name="reads_table" format="tabular" label="Kodoja read assignment for ${on_string}">
+            <filter>capture_reads_table</filter>
+        </data>
     </outputs>
     <tests>
         <test>
@@ -92,6 +103,16 @@
             <param name="kraken_db" value="kraken3viruses" />
             <param name="kaiju_db" value="kaiju3viruses" />
             <param name="single_paired_selector" value="yes" />
+            <param name="forward_input" value="testData_1.fastq" ftype="fastq" />
+            <param name="reverse_input" value="testData_2.fastq" ftype="fastq" />
+            <param name="capture_reads_table" value="true" />
+            <output name="combined_table" file="virus_table_PE_fastq.tabular" ftype="tabular" />
+            <output name="reads_table" file="read_table_PE_fastq.tabular" ftype="tabular" />
+        </test>
+        <test>
+            <param name="kraken_db" value="kraken3viruses" />
+            <param name="kaiju_db" value="kaiju3viruses" />
+            <param name="single_paired_selector" value="yes" />
             <param name="forward_input" value="testData_1.fasta" ftype="fasta" />
             <param name="reverse_input" value="testData_2.fasta" ftype="fasta" />
             <output name="combined_table" file="virus_table_PE_fasta.tabular" ftype="tabular" />
@@ -126,8 +147,19 @@
 Tobacco etch virus                         12227                21                            19 Potyvirus                0                           0
 ================================== ============= ================= ============================= ========== =============== ===========================
 
-The command line tool offers additional options not currently exposed
-in Galaxy, including::
+The second most important output, which you can optionally capture
+for use within Galaxy, is a per-read table summarising matches found
+with Kraken and/or Kaiju. The Kodoja Retrieve tool is not currently
+available within Galaxy, but you can instead use this file directly
+within Galaxy to filter out just the virus reads, or even reads
+matched to a specific taxid. See for example ``seq_filter_by_id``
+which is available via the Galaxy Tool Shed:
+
+http://toolshed.g2.bx.psu.edu/view/peterjc/seq_filter_by_id
+https://github.com/peterjc/pico_galaxy/tree/master/tools/seq_filter_by_id
+
+The Kodoja Search command line tool offers additional options not
+currently exposed in Galaxy, including::
 
                             Number of threads
       -s, --host_subset     Subset host sequences before Kaiju
@@ -145,7 +177,6 @@
       -i KAIJU_MISMATCH, --kaiju_mismatch KAIJU_MISMATCH
                             Kaju allowed mismatches
 
-
 For more information, please see the Kodoja manual
 https://github.com/abaizan/kodoja/wiki/Kodoja-Manual
     ]]></help>