comparison velvetoptimiser.xml @ 0:d81360ea69d8 draft

Initial upload
author simon-gladman
date Tue, 28 Jun 2016 17:30:32 -0400
parents
children 7db5615f4621
comparison
equal deleted inserted replaced
-1:000000000000 0:d81360ea69d8
1 <tool id="velvetoptimiser" name="VelvetOptimiser" version="1.1.0">
2 <requirements>
3 <requirement type="package" version="1.2.10">velvet</requirement>
4 <requirement type="package" version="2.2.5">velvetoptimiser</requirement>
5 </requirements>
6 <stdio>
7 <exit_code range="1:" />
8 </stdio>
9
10 <command><![CDATA[
11 export OMP_NUM_THREADS=2 &&
12 VelvetOptimiser.pl
13 -t \${GALAXY_SLOTS:-2}
14 -s $start_kmer
15 -e $end_kmer
16 -d out
17 -f "
18 #for $i in $files:
19 -${i.filetype}
20
21 #if str($i.paired_type.paired_type_selector) == "paired":
22
23 #if $i.__index__ > 1:
24 -shortPaired$i.__index__
25 #else
26 -shortPaired
27 #end if
28
29 -separate $i.paired_type.input1 $i.paired_type.input2
30 #end if
31
32 #if str($i.paired_type.paired_type_selector) == "single"
33
34 #if $i.__index__ > 1
35 -short$i.__index__
36 #else
37 -short
38 #end if
39
40 $i.paired_type.input1
41 #end if
42
43 #if str($i.paired_type.paired_type_selector) == "paired_collection"
44 #if $i.__index__ > 1
45 -shortPaired$i.__index__
46 #else
47 -shortPaired
48 #end if
49 -separate $i.paired_type.input1.forward $i.paired_type.input1.reverse
50 #end if
51 #if str($i.paired_type.paired_type_selector) == "paired_iv"
52 #if $i.__index__ > 1
53 -shortPaired$i.__index__
54 #else
55 -shortPaired
56 #end if
57 $i.paired_type.input1
58 #end if
59 #end for
60 "
61
62 #if str($advanced.advanced_select) == "advanced"
63 $advanced.verbose
64 -k $advanced.optFuncKmer
65 -c $advanced.optFuncCov
66 #if str($advanced.velvetg_opts) != ""
67 -o "$advanced.velvetg_opts"
68 #end if
69 -m $advanced.minCovCutoff
70 -z $advanced.maxCovCutoff
71 #end if
72 ##&> $stderr
73
74 ]]></command>
75 <inputs>
76 <param name="start_kmer" type="integer" value="31" label="Start k-mer size" help="Odd integer, Lower limit of k-mer size range to search for optimum value" />
77 <param name="end_kmer" type="integer" value="191" label="End k-mer size" help="Odd integer, Upper limit of k-mer size range to search for optimum value" />
78 <param name="kmer_step" type="integer" value="2" label="K-mer search step size" help="Even integer, the k-mer value step size when searching the range" />
79
80 <repeat name="files" title="Input files" min="1">
81 <param name="filetype" label="Input file type" type="select" help="Input file type">
82 <option value="fastq">Fastq</option>
83 <option value="fasta">Fasta</option>
84 <option value="bam">Bam</option>
85 </param>
86 <conditional name="paired_type">
87 <param name="paired_type_selector" type="select" label="Single or paired end reads" help="Select between paired and single end data">
88 <option value="paired">Paired</option>
89 <option value="single">Single</option>
90 <option value="paired_collection">Paired Collection</option>
91 <option value="paired_iv">Paired Interleaved</option>
92 </param>
93 <when value="paired">
94 <param name="input1" type="data" format="fastqsanger,fasta,bam" label="Select first set of reads" help="Specify dataset with forward reads"/>
95 <param name="input2" type="data" format="fastqsanger,fasta,bam" label="Select second set of reads" help="Specify dataset with reverse reads"/>
96 </when>
97 <when value="single">
98 <param name="input1" type="data" format="fastqsanger,fasta,bam" label="Select the reads" help="Specify dataset with the reads"/>
99 </when>
100 <when value="paired_collection">
101 <param name="input1" format="fastqsanger,fasta" type="data_collection" collection_type="paired" label="Select a paired collection" help="See help section for an explanation of dataset collections"/>
102 </when>
103 <when value="paired_iv">
104 <param name="input1" type="data" format="fastqsanger,fasta,bam" label="Select set of interleaved reads" help="Specify dataset with interleaved paired reads"/>
105 </when>
106 </conditional>
107 </repeat>
108
109 <conditional name="advanced">
110 <param name="advanced_select" type="select" label="Set advanced parameters?" help="Set more advanced Velvet Optimiser parameters - see help for details">
111 <option value="basic">Basic</option>
112 <option value="advanced">Advanced</option>
113 </param>
114 <when value="basic"></when>
115 <when value="advanced">
116 <param name="verbose" type="boolean" checked="false" truevalue="-v" falsevalue="" label="Verbose" help="Include verbose velvet output in log file" />
117 <param name="optFuncKmer" type="text" value="n50" label="K-mer optimisation function" help="See help below for possibilities!"/>
118 <param name="optFuncCov" type="text" value="Lbp" label="Coverage cutoff optimisation function" help="See help below for possibilities!"/>
119 <param name="velvetg_opts" type="text" value="" label="Other velvetg options" help="Add any other required velvetg options from the advanced set"/>
120 <param name="minCovCutoff" type="integer" value="0" label="Minimum coverage cutoff" help="The minimum coverage cutoff to consider in the optimisation"/>
121 <param name="maxCovCutoff" type="float" value="0.8" label="Maximum coverage cutoff" help="The maximum coverage cutoff to consider expressed as a fraction of the calculated expected coverage."/>
122 </when>
123 </conditional>
124 </inputs>
125
126 <outputs>
127 <data format="fasta" name="contigs" label="${tool.name} on ${on_string}: Contigs" from_work_dir="out/contigs.fa"/>
128 <data format="tabular" name="stats" label="${tool.name} on ${on_string}: Contig Stats" from_work_dir="out/stats.txt"/>
129 <data format="tabular" name="logfile" label="${tool.name} on ${on_string}: Log file" hidden="True">
130 <discover_datasets pattern=".+Logfile.+" dir="out" visible="True" />
131 </data>
132 <!-- <data format="tabular" name="stderr" label="${tool.name} on ${on_string}: STDERR" hidden="True" /> -->
133 </outputs>
134
135 <tests>
136 <test>
137 <param name="start_kmer" value="21" />
138 <param name="end_kmer" value="31" />
139 <param name="files_0|filetype" value="fasta" />
140 <param name="files_0|paired_type|paired_type_selector" value="single" />
141 <param name="files_0|paired_type|input1" value="test_reads.fa" ftype="fasta" />
142 <output name="contigs" ftype="fasta" file="test-contigs.fa" />
143 </test>
144 </tests>
145
146 <help><![CDATA[
147 **Velvet Optimiser Overview**
148
149 Velvet_ is a de novo genomic assembler specially designed for short read sequencing technologies, such as Solexa or 454, developed by Daniel Zerbino and Ewan Birney at the European Bioinformatics Institute (EMBL-EBI), near Cambridge, in the United Kingdom.
150
151 Velvet currently takes in short read sequences, removes errors then produces high quality unique contigs. It then uses paired-end read and long read information, when available, to retrieve the repeated areas between contigs.
152
153 Read the Velvet `documentation`__ for details on using the Vevlet Assembler.
154
155 .. _Velvet: http://www.ebi.ac.uk/~zerbino/velvet/
156
157 .. __: http://www.ebi.ac.uk/~zerbino/velvet/Manual.pdf
158
159 **VelvetOptimiser**
160
161 VelvetOptimiser_ was written by Simon Gladman of CSIRO/Melbourne University.
162
163 VelvetOptimiser performs a number of velveth and velvetg steps to try and optimise an assembly based on the metrics provided below.
164
165 .. _VelvetOptimiser: http://bioinformatics.net.au/software.shtml
166
167 **Velvet Optimiser**
168
169 Galaxy tool wrapper for newer versions (2.5.5) of Velvet Optimiser. Written by Simon Gladman of VBC/VLSCI.
170
171 Written for use on the Genomics Virtual Laboratory.
172
173 **Outputs**
174
175
176 **Contigs**
177
178 The *contigs.fa* file.
179 This fasta file contains the sequences of the contigs longer than 2k, where k is the word-length used in velveth. If you have specified a min contig lgth threshold, then the contigs shorter than that value are omitted.
180 Note that the length and coverage information provided in the header of each contig should therefore be understood in k-mers and in k-mer coverage (cf. 5.1) respectively.
181 The N's in the sequence correspond to gaps between scaffolded contigs. The number of N's corresponds to the estimated length of the gap. For reasons of compatibility with the archives, any gap shorter than 10bp is represented by a sequence of 10 N's.
182
183 **Stats**
184
185 The *stats.txt* file.
186 This file is a simple tabbed-delimited description of the nodes. The column names are pretty much self-explanatory. Note however that node lengths are given in k-mers. To obtain the length in nucleotides of each node you simply need to add k - 1, where k is the word-length used in velveth.
187 The in and out columns correspond to the number of arcs on the 5' and 3' ends of the contig respectively.
188 The coverages in columns short1 cov, short1 Ocov, short2 cov, and short2 Ocov are provided in k-mer coverage (5.1).
189 Also, the difference between # cov and # Ocov is the way these values are computed. In the first count, slightly divergent sequences are added to the coverage tally. However, in the second, stricter count, only the sequences which map perfectly onto the consensus sequence are taken into account.
190
191 **LastGraph**
192
193 The *LastGraph* file.
194 This file describes in its entirety the graph produced by Velvet. This file is hidden by default.
195
196 **Logfile**
197
198 The Velvet Optimiser's logfile. This file is hidden by default
199
200 **STDERR**
201
202 The Standard Error output of the Optimiser for error messages etc. This file is hidden by default.
203
204 **Advanced options**
205
206 Verbose : Include verbose velvet output in log file. Good for debugging when things don't work.
207
208 Other Velvetg Options : Extra velvetg options to pass through. eg. -long_mult_cutoff -max_coverage etc (default '') See below for details.
209
210 Minimum coverage cutoff : The minimum cov_cutoff to be used. (default '0').
211
212 Maximum coverage cutoff : The maximum coverage cutoff to consider as a multiplier of the expected coverage. (default '0.8').
213
214 K-mer optimisation function : The optimisation function used for k-mer choice. (default 'n50').
215
216 Coverage cutoff optimisation function : The optimisation function used for cov_cutoff optimisation. (default 'Lbp').
217
218 Velvet optimiser assembly optimisation function can be built from the following variables.
219
220 LNbp = The total number of Ns in large contigs
221
222 Lbp = The total number of base pairs in large contigs
223
224 Lcon = The number of large contigs
225
226 max = The length of the longest contig
227
228 n50 = The n50
229
230 ncon = The total number of contigs
231
232 tbp = The total number of basepairs in contigs
233
234 Examples are:
235
236 'Lbp' = Just the total basepairs in contigs longer than 1kb
237
238 'n50*Lcon' = The n50 times the number of long contigs.
239
240 'n50*Lcon/tbp+log(Lbp)' = The n50 times the number of long contigs divided by the total bases in all contigs plus the log of the number of bases in long contigs (as an example only.)
241
242 **Hash Length**
243
244 The hash length, also known as k-mer length, corresponds to the length, in base pairs, of the words being hashed.
245
246 The hash length is the length of the k-mers being entered in the hash table. Firstly, you must observe three technical constraints::
247
248 # it must be an odd number, to avoid palindromes. If you put in an even number, Velvet will just decrement it and proceed.
249 # it must be below or equal to MAXKMERHASH length (cf. 2.3.3, by default 31bp), because it is stored on 64 bits
250 # it must be strictly inferior to read length, otherwise you simply will not observe any overlaps between reads, for obvious reasons.
251
252 Now you still have quite a lot of possibilities. As is often the case, it's a trade- off between specificity and sensitivity. Longer kmers bring you more specificity (i.e. less spurious overlaps) but lowers coverage (cf. below). . . so there's a sweet spot to be found with time and experience.
253 We like to think in terms of "k-mer coverage", i.e. how many times has a k-mer been seen among the reads. The relation between k-mer coverage Ck and standard (nucleotide-wise) coverage C is Ck = C # (L - k + 1)/L where k is your hash length, and L you read length.
254 Experience shows that this kmer coverage should be above 10 to start getting decent results. If Ck is above 20, you might be "wasting" coverage. Experience also shows that empirical tests with different values for k are not that costly to run! VelvetOptimiser automates these tests for you.
255
256
257 **Velvetg options**
258
259 -scaffolding yes|no : scaffolding of contigs used paired end information (default: on)
260
261 -max_branch_length integer : maximum length in base pair of bubble (default: 100)
262
263 max_divergence floating-point : maximum divergence rate between two branches in a bubble (default: 0.2)
264
265 -max_gap_count integer : maximum number of gaps allowed in the alignment of the two branches of a bubble (default: 3)
266
267 -min_pair_count integer : minimum number of paired end connections to justify the scaffolding of two long contigs (default: 5)
268
269 -max_coverage floating point : removal of high coverage nodes AFTER tour bus (default: no removal)
270
271 -coverage_mask integer : minimum coverage required for confident regions of contigs (default: 1)
272
273 -long_mult_cutoff integer : minimum number of long reads required to merge contigs (default: 2)
274
275 -paired_exp_fraction double : remove all the paired end connections which less than the specified fraction of the expected count (default: 0.1)
276
277 -conserveLong yes|no : preserve sequences with long reads in them (default no)
278
279
280 **Input Files**
281
282 Velvet works mainly with fasta and fastq formats. For paired-end reads, the assumption is that each read is next to its mate
283 read. In other words, if the reads are indexed from 0, then reads 0 and 1 are paired, 2 and 3, 4 and 5, etc.
284
285 Supported file formats are::
286
287 fasta
288 fastq
289 bam
290
291 Read categories are::
292
293 short (default)
294 shortPaired
295 long (for Sanger, 454 or even reference sequences)
296 longPaired
297 reference (for pre-mapped sam or bam files - see Velvet manual for details on how to use this option)
298
299
300 ]]></help>
301 <citations>
302 <citation type="bibtex">@UNPUBLISHED{GLADMAN2012,
303 author = "Gladman Simon",
304 title = "VelvetOptimiser",
305 year = "2012",
306 note = "https://github.com/slugger70/VelvetOptimiser"}
307 </citation>
308 <citation type="doi">10.1101/gr.074492.107</citation>
309 <citation type="doi">10.1371/journal.pone.0008407</citation>
310 </citations>
311 </tool>