2
|
1 <tool id="kraken_filter" name="kraken_filter">
|
|
2 <description>kraken result filter</description>
|
|
3 <requirements>
|
|
4 <requirement type="package" version="2.7">python</requirement>
|
|
5 </requirements>
|
|
6 <command interpreter="python">kraken_filter.py
|
|
7 --dbtype="${databaseChoice.database}"
|
|
8 #if $databaseChoice.database == "builtinDB":
|
|
9 --db="${databaseChoice.builtinDatabases.fields.path}"
|
|
10 #else:
|
|
11 --db="NOT_SUPPORTED_YET"
|
|
12 #end if
|
|
13
|
|
14 --in1="${dataFormat.input1}"
|
|
15 --out1="${kraken_filtered_r1}"
|
|
16
|
|
17 #if $dataFormat.inputFormat == "pairedFastQ" or $dataFormat.inputFormat == "pairedFastA":
|
|
18 --in2="${dataFormat.input2}"
|
|
19 --out2="${kraken_filtered_r2}"
|
|
20 #end if
|
|
21
|
|
22 #if $dataFormat.inputFormat == "singleFastQ" or $dataFormat.inputFormat == "pairedFastQ":
|
|
23 --input-format="fq"
|
|
24 #else:
|
|
25 --input-format="fa"
|
|
26 #end if
|
|
27
|
|
28 #if $whichFilter.whichFilterp == "filterClassified":
|
|
29 --taxid="${whichFilter.taxonID}"
|
|
30 #else:
|
|
31 --taxid="0"
|
|
32 #end if
|
|
33
|
|
34 --kraken-results="${kraken_classification}"
|
|
35
|
|
36 --logfile="${kraken_filter_log}"
|
|
37 </command>
|
|
38 <inputs>
|
|
39 <conditional name="databaseChoice">
|
|
40 <param name="database" type="select" label="Do you want to use your own kraken database or use the built-in ktest database?">
|
|
41 <option value="builtinDB">Use built-in db (ktest)</option>
|
|
42 <option value="myownDB">Use a db from my history</option>
|
|
43 </param>
|
|
44 <when value="builtinDB">
|
|
45 <param name="builtinDatabases" type="select" label="Select a built-in kraken database">
|
|
46 <options from_data_table="krakenDBs">
|
|
47 <filter type="sort_by" column="2" />
|
|
48 <validator type="no_options" message="No databases are available" />
|
|
49 </options>
|
|
50 </param>
|
|
51 </when>
|
|
52 <when value="myownDB">
|
|
53 <param name="myownDB" type="data" format="fasta" metadata_name="dbkey" label="Select database" />
|
|
54 </when>
|
|
55 </conditional>
|
|
56
|
|
57 <conditional name="whichFilter">
|
|
58 <param name="whichFilterp" type="select" label="Filter classified or unclassified reads?">
|
|
59 <option value="filterClassified">Filter classified reads</option>
|
|
60 <option value="filterUnclassified">Filter unclassified reads</option>
|
|
61 </param>
|
|
62 <when value="filterClassified">
|
|
63 <param name="taxonID" type="integer" label="Taxonomy ID of root taxon (default:1 - 'all')" value="1" default="1" />
|
|
64 </when>
|
|
65 </conditional>
|
|
66
|
|
67 <param name = "kraken_classification" type="data" format="tabular" label="Kraken classification output" />
|
|
68 <!--
|
|
69 <conditional name="libraryType">
|
|
70 <param name="libtype" type="select" label="Is this library single- or paired-end?">
|
|
71 <option value="single">Single-end</option>
|
|
72 <option value="paired">Paired-end</option>
|
|
73 </param>
|
|
74 <when value="single">
|
|
75 <param name="input1" type="data" format="fasta,fastq,fasta.gz,fasta.bz2,fa.gz,fq.gz,fa,fq" label="Fasta/Fastq file" />
|
|
76 </when>
|
|
77 <when value="paired">
|
|
78 <param name="input1" type="data" format="fasta,fastq,fasta.gz,fasta.bz2,fa.gz,fq.gz,fa,fq" label="Left Fasta/Fastq file" />
|
|
79 <param name="input2" type="data" format="fasta,fastq,fasta.gz,fasta.bz2,fa.gz,fq.gz,fa,fq" label="Right Fasta/Fastq file" />
|
|
80 </when>
|
|
81 </conditional>
|
|
82 -->
|
|
83 <!-- new -->
|
|
84
|
|
85 <conditional name="dataFormat">
|
|
86 <param name="inputFormat" type="select" label="Please select input file type and library type.">
|
|
87 <option value="singleFastQ">Single-end FASTQ</option>
|
|
88 <option value="pairedFastQ">Paired-end FASTQ</option>
|
|
89 <option value="singleFastA">Single-end FASTA</option>
|
|
90 <option value="pairedFastA">Paired-end FASTA</option>
|
|
91 </param>
|
|
92 <when value="singleFastQ">
|
|
93 <param name="input1" type="data" format="fastq,fq.gz,fq" label="FASTQ file" />
|
|
94 </when>
|
|
95 <when value="pairedFastQ">
|
|
96 <param name="input1" type="data" format="fastq,fq.gz,fq" label="Forward/Left FASTQ file" />
|
|
97 <param name="input2" type="data" format="fastq,fq.gz,fq" label="Reverse/Right FASTQ file" />
|
|
98 </when>
|
|
99 <when value="singleFastA">
|
|
100 <param name="input1" type="data" format="fasta,fasta.gz,fasta.bz2,fa.gz" label="FASTA file" />
|
|
101 </when>
|
|
102 <when value="pairedFastA">
|
|
103 <param name="input1" type="data" format="fasta,fasta.gz,fasta.bz2,fa.gz" label="Forward/Left FASTA file" />
|
|
104 <param name="input2" type="data" format="fasta,fasta.gz,fasta.bz2,fa.gz" label="Reverse/Right FASTA file" />
|
|
105 </when>
|
|
106 </conditional>
|
|
107
|
|
108 <!-- new -->
|
|
109
|
|
110 </inputs>
|
|
111 <outputs>
|
|
112 <data format="input1" name="kraken_filtered_r1" label="${tool.name} filtered fwd-reads of ${on_string}" />
|
|
113 <data format="input2" name="kraken_filtered_r2" label="${tool.name} filtered rev-reads of ${on_string}">
|
|
114 <filter>inputFormat == "pairedFastQ" or inputFormat == "pairedFastA</filter>
|
|
115
|
|
116 </data>
|
|
117 <data format="txt" name="kraken_filter_log" label="${tool.name} logfile (${on_string})" />
|
|
118 </outputs>
|
|
119
|
|
120 <help>
|
|
121 This tool is a downstream filter for kraken-classified sequences.
|
|
122 </help>
|
|
123 </tool>
|