annotate create.xml @ 21:c619ad82600e draft default tip

Uploaded 20190304
author fabio
date Mon, 04 Mar 2019 09:25:16 -0500
parents 7f712cc0d3d5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
1 <?xml version="1.0"?>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
2 <tool name="BloomTree Manager - Create" id="btman_create" version="1.0.0">
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
3 <description>a Sequence Bloom Tree</description>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
4 <macros>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
5 <import>macros.xml</import>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
6 </macros>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
7 <expand macro="requirements" />
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
8 <command detect_errors="exit_code">
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
9 <![CDATA[
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
10 python '$__tool_directory__/create.py'
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
11
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
12 #set formats = ''
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
13 #set filepaths = ''
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
14 #set filenames = ''
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
15 #set compressed = ''
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
16 #set minab = ''
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
17 #set qthres = ''
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
18 #for $i, $exp in enumerate( $experiments ):
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
19 #set formats += str( $exp.conditional_format.format ) + '|'
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
20 #if $exp.conditional_format.format == 'accessions':
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
21 #set filepaths += str( $exp.conditional_format.accession_numbers ) + '|'
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
22 #set filenames += str( $exp.conditional_format.accession_numbers.name ) + '|'
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
23 #set compressed += '0|'
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
24 #else:
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
25 #if $exp.conditional_format.format == 'fasta':
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
26 #set compressed += str( $exp.conditional_format.conditional_fasta_compressed.fasta_compressed ) + '|'
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
27 #if $exp.conditional_format.conditional_fasta_compressed.fasta_compressed == 0:
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
28 #set filepaths += ','.join( [ str( $f ) for $f in $exp.conditional_format.conditional_fasta_compressed.fastafiles ] ) + '|'
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
29 #set filenames += ','.join( [ str( $f.name ) for $f in $exp.conditional_format.conditional_fasta_compressed.fastafiles ] ) + '|'
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
30 #else:
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
31 #set filepaths += ','.join( [ str( $f ) for $f in $exp.conditional_format.conditional_fasta_compressed.fastagzfiles ] ) + '|'
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
32 #set filenames += ','.join( [ str( $f.name ) for $f in $exp.conditional_format.conditional_fasta_compressed.fastagzfiles ] ) + '|'
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
33 #end if
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
34 #elif $exp.conditional_format.format == 'fastq':
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
35 #set compressed += str( $exp.conditional_format.conditional_fastq_compressed.fastq_compressed ) + '|'
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
36 #if $exp.conditional_format.conditional_fastq_compressed.fastq_compressed == 0:
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
37 #set filepaths += ','.join( [ str( $f ) for $f in $exp.conditional_format.conditional_fastq_compressed.fastqfiles ] ) + '|'
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
38 #set filenames += ','.join( [ str( $f.name ) for $f in $exp.conditional_format.conditional_fastq_compressed.fastqfiles ] ) + '|'
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
39 #else:
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
40 #set filepaths += ','.join( [ str( $f ) for $f in $exp.conditional_format.conditional_fastq_compressed.fastqgzfiles ] ) + '|'
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
41 #set filenames += ','.join( [ str( $f.name ) for $f in $exp.conditional_format.conditional_fastq_compressed.fastqgzfiles ] ) + '|'
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
42 #end if
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
43 #end if
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
44 #end if
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
45 #set minab += str( $exp.min_abundance ) + '|'
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
46 #if $exp.conditional_quality.quality_control == '1':
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
47 #set qthres += str( $exp.conditional_quality.quality_threshold ) + '|'
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
48 #else:
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
49 #set qthres += '-1.0|'
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
50 #end if
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
51 #end for
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
52 #set klen = $kmer_len
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
53 #set bfsize = -1
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
54 #if $bloomsize_condition.bloomsize_control == '0':
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
55 #set bfsize = $bloomsize_condition.bloom_filter_size
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
56 #end if
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
57
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
58 --formats '${formats}'
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
59 --filepaths '${filepaths}'
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
60 --filenames '${filenames}'
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
61 --compressed '${compressed}'
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
62 --minabundances '${minab}'
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
63 --qualitythresholds '${qthres}'
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
64
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
65 --klen ${klen}
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
66 --bfsize ${bfsize}
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
67
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
68 --outfile '${resulttxt}'
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
69 --outdir 'sbt'
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
70 --tooldir '$__tool_directory__'
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
71 ]]>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
72 </command>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
73 <inputs>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
74 <repeat name="experiments" title="Select a list of experiments" help="Select a set of experiments on which the Sequence Bloom Tree will be built." min="1">
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
75 <conditional name="conditional_format">
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
76 <param name="format" type="select" label="Select the experiment format" help="FASTA and FASTQ are the supported formats">
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
77 <option value="fasta">FASTA Experiments</option>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
78 <option value="fastq">FASTQ Experiments</option>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
79 <option value="accessions">SRA Accession Numbers</option>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
80 </param>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
81 <when value="fasta">
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
82 <conditional name="conditional_fasta_compressed">
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
83 <param name="fasta_compressed" type="boolean" checked="true" truevalue="1" falsevalue="0" label="Are your experiments compressed?" />
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
84 <when value="0">
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
85 <param format="fasta" name="fastafiles" multiple="true" type="data" label="Select one or more FASTA experiments" />
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
86 </when>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
87 <when value="1">
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
88 <param format="fastagz" name="fastagzfiles" multiple="true" type="data" label="Select one or more FASTA .gz experiments" />
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
89 </when>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
90 </conditional>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
91 </when>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
92 <when value="fastq">
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
93 <conditional name="conditional_fastq_compressed">
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
94 <param name="fastq_compressed" type="boolean" checked="true" truevalue="1" falsevalue="0" label="Are youe experiments compressed?" />
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
95 <when value="0">
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
96 <param format="fastq" name="fastqfiles" multiple="true" type="data" label="Select one or more FASTQ experiments" />
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
97 </when>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
98 <when value="1">
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
99 <param format="fastqgz" name="fastqgzfiles" multiple="true" type="data" label="Select one or more FASTQ .gz experiments" />
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
100 </when>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
101 </conditional>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
102 </when>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
103 <when value="accessions">
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
104 <param name="accession_numbers" type="data" format="tabular" label="Select a list of SRA Accession Numbers" help="Select a tabular file with a list of accession numbers in the first column." />
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
105 </when>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
106 </conditional>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
107
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
108 <param name="min_abundance" type="integer" value="2" min="0" label="Insert a Bloom filter minimum abundance" help="This value is the minimum abundance cutoff for the creation of the Bloom filter." />
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
109
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
110 <conditional name="conditional_quality">
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
111 <param name="quality_control" type="boolean" checked="false" truevalue="1" falsevalue="0" label="Apply a quality control procedure" />
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
112 <when value="1">
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
113 <param name="quality_threshold" size="1" type="float" value="0.8" min="0.0" max="1.0" label="Quality threshold" help="If the number of sequences flagged as poor quality on the total number of sequences in a file is less than this threshold, the whole experiment will be excluded." />
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
114 </when>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
115 </conditional>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
116 </repeat>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
117
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
118 <param name="kmer_len" type="integer" value="21" min="0" label="K-mer length" />
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
119
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
120 <conditional name="bloomsize_condition">
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
121 <param name="bloomsize_control" type="boolean" checked="true" truevalue="1" falsevalue="0" label="Automatically estimate the Bloom filter size" />
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
122 <when value="0">
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
123 <param name="bloom_filter_size" size="1" type="integer" value="1" min="1" label="Bloom Filter size" help="Disable this field to let the tool estimate an appropriate Bloom filter size." />
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
124 </when>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
125 </conditional>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
126 </inputs>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
127 <outputs>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
128 <collection name="list_output" type="list" label="${tool.name} SBT Collection">
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
129 <discover_datasets pattern="(?P&lt;identifier_0&gt;.*(?=\.)).(?P&lt;ext&gt;[^\.]*$)" ext="auto" directory="sbt" />
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
130 </collection>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
131 <data format="txt" name="resulttxt" label="${tool.name} SBT: Result" from_work_dir="sbtres.txt" />
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
132 </outputs>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
133
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
134 <help><![CDATA[
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
135 This tool allows to create Sequence Bloom Trees starting from a set of FASTA or FASTQ files.
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
136 It also allows to control the quality of the input dataset and exclude the files that do not reach a specified quality level.
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
137
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
138 -----
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
139
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
140 **Input file**
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
141
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
142 The input of this tool is a set of FASTA or FASTQ experiments, additionally to a set of SRA accession numbers.
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
143 For each of the selected experiments, the minimum abundance for the corresponding Bloom filter is required.
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
144 Additionally, a quality control procedure could be applied to guarantee that the quality of every experiment always exceed a
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
145 specified treshold. Otherwise, experiments with low quality level will be discarded.
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
146
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
147 The k-mer length must also be specified, additionally to the Bloom filter size. This last field is optional and it will be
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
148 automatically estimated if not provided.
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
149
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
150 -----
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
151
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
152 **Output**
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
153
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
154 This tool returns a collection containing the Sequence Bloom Tree nodes and a file representing the organization of the tree.
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
155
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
156 Take a look at the Query tool documentation for a detailed description about how
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
157 to query a Sequence Bloom Tree.
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
158
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
159 -----
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
160
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
161 .. class:: infomark
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
162
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
163 **Notes**
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
164
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
165 This Galaxy tool has been developed by Fabio Cumbo.
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
166
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
167 Please visit this GithHub_repository_ for more information about the BloomTree Manager
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
168
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
169 .. _GithHub_repository: https://github.com/fabio-cumbo/bloomtree-manager
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
170 ]]></help>
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
171
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
172 <expand macro="citations" />
7f712cc0d3d5 Uploaded 20190304.2
fabio
parents:
diff changeset
173 </tool>