annotate kraken_filter.xml @ 14:fd27c97c8366 draft default tip

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