comparison tools/mira4/mira4_de_novo.xml @ 0:6a88b42ce6b9 draft

Uploaded v0.0.4, previously only on the TestToolShed
author peterjc
date Fri, 21 Nov 2014 06:42:56 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:6a88b42ce6b9
1 <tool id="mira_4_0_de_novo" name="MIRA v4.0 de novo assember" version="0.0.4">
2 <description>Takes Sanger, Roche 454, Solexa/Illumina, Ion Torrent and PacBio reads</description>
3 <requirements>
4 <requirement type="binary">mira</requirement>
5 <requirement type="binary">miraconvert</requirement>
6 <requirement type="package" version="4.0">MIRA</requirement>
7 <requirement type="binary">samtools</requirement>
8 <requirement type="package" version="0.1.19">samtools</requirement>
9 </requirements>
10 <version_command interpreter="python">mira4.py --version</version_command>
11 <command interpreter="python">mira4.py
12 --manifest "$manifest"
13 #if str($maf_wanted)=="true":
14 --maf "$out_maf"
15 #end if
16 #if str($bam_wanted)=="true":
17 --bam "$out_bam"
18 #end if
19 --fasta "$out_fasta"
20 --log "$out_log"
21 </command>
22 <stdio>
23 <!-- Assume anything other than zero is an error -->
24 <exit_code range="1:" />
25 <exit_code range=":-1" />
26 </stdio>
27 <inputs>
28 <param name="job_type" type="select" label="Assembly type">
29 <option value="genome">Genome</option>
30 <option value="est">EST (transcriptome)</option>
31 </param>
32 <param name="job_quality" type="select" label="Assembly quality grade">
33 <option value="accurate">Accurate</option>
34 <option value="draft">Draft</option>
35 </param>
36 <repeat name="read_group" title="Read Group" min="1">
37 <param name="technology" type="select" label="Read technology">
38 <option value="solexa">Solexa/Illumina</option>
39 <option value="sanger">Sanger cappillary sequencing</option>
40 <option value="454">Roche 454</option>
41 <option value="iontor">Ion Torrent</option>
42 <option value="pcbiolq">PacBio low quality (raw)</option>
43 <option value="pcbiohq">PacBio high quality (corrected)</option>
44 <option value="text">Synthetic reads (database entries, consensus sequences, artifical reads, etc)</option>
45 <!-- TODO reference/backbone as an entry here? -->
46 </param>
47 <conditional name="segments">
48 <param name="type" type="select" label="Are these paired reads?">
49 <option value="paired">Paired reads</option>
50 <option value="none">Single reads or not relevant (e.g. primer walking with Sanger capillary sequencing)</option>
51 </param>
52 <when value="paired">
53 <param name="placement" type="select" label="Pairing type (segment placing)">
54 <option value="FR">---&gt; &lt;--- (e.g. Sanger capillary or Solexa/Illumina paired-end library)</option>
55 <option value="RF">&lt;--- ---&gt; (e.g. Solexa/Illumina mate-pair library)</option>
56 <option value="SB">2---&gt; 1---&gt; (e.g. Roche 454 paired-end libraries or IonTorrent long-mate; see note)</option>
57 </param>
58 <!-- min/max validation is done via the <code> tag -->
59 <param name="min_size" type="integer" optional="true" min="0" value=""
60 label="Minimum size of 'good' DNA templates in the library preparation"
61 help="Optional, but if used you must also supply a maximum value." />
62 <param name="max_size" type="integer" optional="true" min="0" value=""
63 label="Maximum size of 'good' DNA templates in the library preparation"
64 help="Optional, but if used you must also supply a minimum value." />
65 <param name="naming" type="select" label="Pair naming convention">
66 <option value="solexa">Solexa/Illumina (using '/1' and '/2' suffixes, or later Illumina colon system)</option>
67 <option value="FR">Forward/Reverse scheme (using '.f*' and '.r*' suffixes)</option>
68 <option value="tigr">TIGR scheme (using 'TF*' and 'TR*' suffixes)</option>
69 <option value="sanger">Sanger scheme (see notes)</option>
70 <option value="stlouis">St. Louis scheme (see notes)</option>
71 </param>
72 </when>
73 <when value="none" /><!-- no further questions -->
74 </conditional>
75 <param name="filenames" type="data" format="fastq,mira" multiple="true" required="true" label="Read file(s)"
76 help="Multiple files allowed, for example paired reads can be given as two files (MIRA looks at read names to identify pairs)." />
77 </repeat>
78 <param name="maf_wanted" type="boolean" label="Output assembly in MIRA's own format?" checked="False" />
79 <param name="bam_wanted" type="boolean" label="Convert assembly into BAM format?" checked="True" />
80 </inputs>
81 <code file="mira4_validator.py" />
82 <outputs>
83 <data name="out_fasta" format="fasta" label="MIRA de novo contigs (FASTA)" />
84 <data name="out_bam" format="bam" label="MIRA de novo assembly (BAM)">
85 <filter>bam_wanted is True</filter>
86 </data>
87 <data name="out_maf" format="mira" label="MIRA de novo assembly">
88 <filter>maf_wanted is True</filter>
89 </data>
90 <!-- TODO?
91 <data name="out_contigstats" format="tabular" label="MIRA contig stats" />
92 -->
93 <data name="out_log" format="txt" label="MIRA de novo log" />
94 </outputs>
95 <configfiles>
96 <configfile name="manifest">
97 project = MIRA
98 job = denovo,${job_type},${job_quality}
99 parameters = -NW:cmrnl=no -DI:trt=/tmp -OUT:orc=no
100 ## -GE:not is short for -GENERAL:number_of_threads and using one (1)
101 ## can be useful for repeatability of assemblies and bug hunting.
102 ## This is overriden by the command line -t switch which is easier
103 ## to set from within Galaxy.
104 ##
105 ## -NW:cmrnl is short for -NAG_AND_WARN:check_maxreadnamelength
106 ## and without this MIRA aborts with read names over 40 characters
107 ## due to limitations of some downstream tools.
108 ##
109 ## -DI:trt is short for -DIRECTORY:tmp_redirected_to and should
110 ## point to a local hard drive (not something like NFS on network).
111 ## We replace /tmp with an environment variable via mira4.py
112 ##
113 ## -OUT:orc=no is short for -OUTPUT:output_result_caf=no
114 ## which turns off an output file we don't want anyway.
115
116 #for $rg in $read_group
117
118 ##This bar goes into the manifest as a comment line
119 #------------------------------------------------------------------------------
120
121 readgroup
122 technology = ${rg.technology}
123 ##Record the segment placement (if any)
124 #if str($rg.segments.type) == "paired"
125 segment_placement = ${rg.segments.placement}
126 segment_naming = ${rg.segments.naming}
127 #if str($rg.segments.min_size) != "" or str($rg.segments.max_size) != ""
128 ##If our min/max validation failed I trust MIRA to give an error message...
129 template_size = $rg.segments.min_size $rg.segments.max_size
130 #end if
131 #end if
132 ##if str($rg.segments.type) == "none"
133 ##MIRA4 manual says use segment_placement = unknown or ? for unpaired data
134 ##but this stopped working in MIRA 4.0 RC5 and 4.0 (final). See:
135 ##http://www.freelists.org/post/mira_talk/Unpaired-reads-and-segment-placement--or-unknown
136 ##segment_placement = ?
137 ##end if
138 ##MIRA will accept multiple filenames on one data line, or multiple data lines
139 #for $f in $rg.filenames
140 ##Must now map Galaxy datatypes to MIRA file types...
141 #if $f.ext.startswith("fastq")
142 ##MIRA doesn't like fastqsanger etc, just plain old fastq:
143 data = fastq::$f
144 #elif $f.ext == "mira"
145 ##We're calling *.maf the "mira" format in Galaxy (name space collision)
146 data = maf::$f
147 #else
148 ##MIRA is happy with fasta as name,
149 data = ${f.ext}::$f
150 #end if
151 #end for
152 #end for
153 </configfile>
154 </configfiles>
155 <tests>
156 <!-- Tiger mitochondria, selected paired end Illumina reads from SRR639755
157 Note we're using just one repeat group, and only the filenames parameter
158 within it, so this should work with current test framework limitations:
159 TODO: Revise example and/or -NW:cac=warn and -NW:acv=80 settings
160 MIRA 4.0 complains as coverage is about x93 which is over 80 limit.
161 Also MIRA 4.0 gives three contigs as output.
162 <test>
163 <param name="job_type" value="genome" />
164 <param name="job_quality" value="accurate" />
165 <param name="filenames" value="SRR639755_mito_pairs.fastq.gz" ftype="fastqsanger" />
166 <output name="out_fasta" file="SRR639755_mito_pairs.mira4_de_novo.fasta" ftype="fasta" />
167 </test>
168 -->
169 <!-- Simple assembly based on MIRA's minidemo/demo4 example
170 Note we're using just one repeat group,
171 but several parameters with the repeat
172 -->
173 <test>
174 <param name="job_type" value="genome" />
175 <param name="job_quality" value="accurate" />
176 <param name="technology" value="sanger" />
177 <param name="type" value="none" />
178 <param name="filenames" value="U13small_m.fastq" ftype="fastqsanger" />
179 <param name="maf_wanted" value="true"/>
180 <param name="bam_wanted" value="true"/>
181 <output name="out_fasta" file="U13small_m.mira4_de_novo.fasta" ftype="fasta" />
182 <output name="out_bam" file="empty_file.dat" compare="contains" />
183 <!-- TODO: Suggest startswith as a compare method? -->
184 <output name="out_maf" file="header.mira" compare="contains" />
185 <output name="out_log" file="empty_file.dat" compare="contains" />
186 </test>
187 <!-- Simple assembly based on MIRA's minidemo/solexa1 example
188 Note we're using just one repeat group,
189 but two parameters within the repeat (filename, no pairing)
190 -->
191 <test>
192 <param name="job_type" value="genome" />
193 <param name="job_quality" value="accurate" />
194 <param name="type" value="none" />
195 <param name="filenames" value="ecoli.fastq" ftype="fastqsanger" />
196 <param name="maf_wanted" value="false"/>
197 <param name="bam_wanted" value="false"/>
198 <output name="out_fasta" file="ecoli.mira4_de_novo.fasta" ftype="fasta" />
199 <output name="out_log" file="empty_file.dat" compare="contains" />
200 </test>
201 </tests>
202 <help>
203
204 **What it does**
205
206 Runs MIRA v4.0 in de novo mode, collects the output, generates a sorted BAM
207 file, and then throws away all the temporary files.
208
209 MIRA is an open source assembly tool capable of handling sequence data from
210 a range of platforms (Sanger capillary, Solexa/Illumina, Roche 454, Ion Torrent
211 and also PacBio).
212
213 It is particularly suited to small genomes such as bacteria.
214
215
216 **Notes on paired reads**
217
218 .. class:: warningmark
219
220 MIRA uses read naming conventions to identify paired read partners
221 (and does not care about their order in the input files). In most cases,
222 the Solexa/Illumina setting is fine. For Sanger capillary sequencing,
223 you may need to rename your reads to match one of the standard conventions
224 supported by MIRA. For Roche 454 or Ion Torrent the appropriate settings
225 depend on how the FASTQ file was produced:
226
227 * If using Roche's ``sffinfo`` or older versions of ``sff_extract``
228 to convert SFF files to FASTQ, your reads will probably have the
229 ``---&gt; &lt;---`` orientation and use the ``.f`` and ``.r``
230 suffixes (FR naming).
231
232 * If using a recent version of ``sff_extract``, then the ``/1`` and ``/2``
233 suffixes are used (Solexa/Illumina style naming) and the original
234 ``2---&gt; 1---&gt;`` orientation is preserved.
235
236 The reason for this is the raw data for Roche 454 and Ion Torrent paired-end
237 libraries sequences a circularised fragment such that the raw data begins
238 with the end of the fragment, a linker, then the start of the fragment.
239 This means both the start and end are sequenced from the same strand, and
240 have the orientation ``2---&gt; 1---&gt;``. However, in order to use the data
241 with traditional tools expecting Sanger capillary style ``---&gt; &lt;---``
242 orientation it was common to reverse complement one of the pair to mimic this.
243
244
245 **Citation**
246
247 If you use this Galaxy tool in work leading to a scientific publication please
248 cite the following papers:
249
250 Peter J.A. Cock, Björn A. Grüning, Konrad Paszkiewicz and Leighton Pritchard (2013).
251 Galaxy tools and workflows for sequence analysis with applications
252 in molecular plant pathology. PeerJ 1:e167
253 http://dx.doi.org/10.7717/peerj.167
254
255 Bastien Chevreux, Thomas Wetter and Sándor Suhai (1999).
256 Genome Sequence Assembly Using Trace Signals and Additional Sequence Information.
257 Computer Science and Biology: Proceedings of the German Conference on Bioinformatics (GCB) 99, pp. 45-56.
258 http://www.bioinfo.de/isb/gcb99/talks/chevreux/main.html
259
260 This wrapper is available to install into other Galaxy Instances via the Galaxy
261 Tool Shed at http://toolshed.g2.bx.psu.edu/view/peterjc/mira4_assembler
262 </help>
263 </tool>