comparison tools/mira4/mira4_mapping.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_mapping" name="MIRA v4.0 mapping" version="0.0.4">
2 <description>Maps 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 <!-- TODO? Allow technology type for references? -->
37 <!-- TODO? Allow strain settings for reference(s) and reads? -->
38 <!-- TODO? Use a repeat to allow for multi-strain references? -->
39 <!-- TODO? Add strain to the mapping read groups? -->
40 <param name="references" type="data" format="fasta,fastq,mira" multiple="true" required="true" label="Backbone reference file(s)"
41 help="Multiple files allowed, for example one FASTA file per chromosome or plasmid." />
42 <param name="strain_setup" type="select" label="Strain configuration (reference vs reads)">
43 <option value="default">Different strains - mapping reads onto a related reference ('StrainX' vs 'ReferenceStrain')</option>
44 <option value="same">Same strain - mapping reads from same reference (all 'StrainX')</option>
45 </param>
46 <repeat name="read_group" title="Read Group" min="1">
47 <param name="technology" type="select" label="Read technology">
48 <option value="solexa">Solexa/Illumina</option>
49 <option value="sanger">Sanger cappillary sequencing</option>
50 <option value="454">Roche 454</option>
51 <option value="iontor">Ion Torrent</option>
52 <option value="pcbiolq">PacBio low quality (raw)</option>
53 <option value="pcbiohq">PacBio high quality (corrected)</option>
54 <option value="text">Synthetic reads (database entries, consensus sequences, artifical reads, etc)</option>
55 </param>
56 <conditional name="segments">
57 <param name="type" type="select" label="Are these paired reads?">
58 <option value="paired">Paired reads</option>
59 <option value="none">Single reads or not relevant (e.g. primer walking with Sanger capillary sequencing)</option>
60 </param>
61 <when value="paired">
62 <param name="placement" type="select" label="Pairing type (segment placing)">
63 <option value="FR">---&gt; &lt;--- (e.g. Sanger capillary or Solexa/Illumina paired-end library)</option>
64 <option value="RF">&lt;--- ---&gt; (e.g. Solexa/Illumina mate-pair library)</option>
65 <option value="SB">2---&gt; 1---&gt; (e.g. Roche 454 paired-end libraries or IonTorrent long-mate; see note)</option>
66 </param>
67 <param name="naming" type="select" label="Pair naming convention">
68 <option value="solexa">Solexa/Illumina (using '/1' and '/2' suffixes, or later Illumina colon system)</option>
69 <option value="FR">Forward/Reverse scheme (using '.f*' and '.r*' suffixes)</option>
70 <option value="tigr">TIGR scheme (using 'TF*' and 'TR*' suffixes)</option>
71 <option value="sanger">Sanger scheme (see notes)</option>
72 <option value="stlouis">St. Louis scheme (see notes)</option>
73 </param>
74 </when>
75 <when value="none" /><!-- no further questions -->
76 </conditional>
77 <param name="filenames" type="data" format="fastq,mira" multiple="true" required="true" label="Read file(s)"
78 help="Multiple files allowed, for example paired reads can be given as two files (MIRA looks at read names to identify pairs)." />
79 </repeat>
80 <param name="maf_wanted" type="boolean" label="Output mapping in MIRA's own format?" checked="False" />
81 <param name="bam_wanted" type="boolean" label="Convert mapping into BAM format?" checked="True" />
82 </inputs>
83 <outputs>
84 <data name="out_fasta" format="fasta" label="MIRA #if str($strain_setup)=='same' then 'same strain' else 'reference' # mapping contigs (FASTA)" />
85 <data name="out_bam" format="bam" label="MIRA #if str($strain_setup)=='same' then 'same strain' else 'reference' # mapping assembly (BAM)">
86 <filter>bam_wanted is True</filter>
87 </data>
88 <data name="out_maf" format="mira" label="MIRA #if str($strain_setup)=='same' then 'same strain' else 'reference' # mapping assembly">
89 <filter>maf_wanted is True</filter>
90 </data>
91 <data name="out_log" format="txt" label="MIRA #if str($strain_setup)=='same' then 'same strain' else 'reference' # mapping log" />
92 </outputs>
93 <configfiles>
94 <configfile name="manifest">
95 project = MIRA
96 job = mapping,${job_type},${job_quality}
97 parameters = -NW:cmrnl=no -DI:trt=/tmp -OUT:orc=no
98 ## -GE:not is short for -GENERAL:number_of_threads and using one (1)
99 ## can be useful for repeatability of assemblies and bug hunting.
100 ## This is overriden by the command line -t switch which is easier
101 ## to set from within Galaxy.
102 ##
103 ## -NW:cmrnl is short for -NAG_AND_WARN:check_maxreadnamelength
104 ## and without this MIRA aborts with read names over 40 characters
105 ## due to limitations of some downstream tools.
106 ##
107 ## -DI:trt is short for -DIRECTORY:tmp_redirected_to and should
108 ## point to a local hard drive (not something like NFS on network).
109 ## We replace /tmp with an environment variable via mira4.py
110 ##
111 ## -OUT:orc=no is short for -OUTPUT:output_result_caf=no
112 ## which turns off an output file we don't want anyway.
113
114 ##This bar goes into the manifest as a comment line
115 #------------------------------------------------------------------------------
116
117 readgroup
118 is_reference
119 #if str($strain_setup)=="same"
120 strain = StrainX
121 #end if
122 #for $f in $references
123 ##Must now map Galaxy datatypes to MIRA file types...
124 #if $f.ext.startswith("fastq")
125 ##MIRA doesn't like fastqsanger etc, just plain old fastq:
126 data = fastq::$f
127 #elif $f.ext == "mira"
128 ##We're calling *.maf the "mira" format in Galaxy (name space collision)
129 data = maf::$f
130 #elif $f.ext == "fasta"
131 ##We're calling MIRA with the file type as "fna" as otherwise it wants quals
132 data = fna::$f
133 #else
134 ##Currently don't expect anything else...
135 data = ${f.ext}::$f
136 #end if
137 #end for
138 #for $rg in $read_group
139
140 ##This bar goes into the manifest as a comment line
141 #------------------------------------------------------------------------------
142
143 readgroup
144 technology = ${rg.technology}
145 #if str($strain_setup)=="same"
146 ##This is perhaps redundant as MIRA defaults to StrainX for the reads:
147 strain = StrainX
148 #end if
149 ##Record the segment placement (if any)
150 #if str($rg.segments.type) == "paired"
151 segment_placement = ${rg.segments.placement}
152 segment_naming = ${rg.segments.naming}
153 #end if
154 ##if str($rg.segments.type) == "none"
155 ##MIRA4 manual says use segment_placement = unknown or ? for unpaired data
156 ##but this stopped working in MIRA 4.0 RC5 and 4.0 (final). See:
157 ##http://www.freelists.org/post/mira_talk/Unpaired-reads-and-segment-placement--or-unknown
158 ##segment_placement = ?
159 ##end if
160 ##MIRA will accept multiple filenames on one data line, or multiple data lines
161 #for $f in $rg.filenames
162 ##Must now map Galaxy datatypes to MIRA file types...
163 #if $f.ext.startswith("fastq")
164 ##MIRA doesn't like fastqsanger etc, just plain old fastq:
165 data = fastq::$f
166 #elif $f.ext == "mira"
167 ##We're calling *.maf the "mira" format in Galaxy (name space collision)
168 data = maf::$f
169 #else
170 ##Currently don't expect anything else...
171 data = ${f.ext}::$f
172 #end if
173 #end for
174 #end for
175 </configfile>
176 </configfiles>
177 <tests>
178 <test>
179 <param name="job_type" value="genome" />
180 <param name="job_quality" value="accurate" />
181 <param name="references" value="tvc_contigs.fasta" ftype="fasta" />
182 <param name="strain_setup" value="default" />
183 <param name="type" value="none" />
184 <param name="filenames" value="tvc_mini.fastq" ftype="fastqsanger" />
185 <param name="maf_wanted" value="true"/>
186 <param name="bam_wanted" value="true"/>
187 <output name="out_fasta" file="tvc_map_ref_strain.fasta" ftype="fasta" />
188 <output name="out_bam" file="empty_file.dat" compare="contains" />
189 <!-- TODO: Suggest startswith as a compare method? -->
190 <output name="out_maf" file="header.mira" compare="contains" />
191 <output name="out_log" file="empty_file.dat" compare="contains" />
192 </test>
193 <test>
194 <param name="job_type" value="genome" />
195 <param name="job_quality" value="accurate" />
196 <param name="references" value="tvc_contigs.fasta" ftype="fasta" />
197 <param name="strain_setup" value="same" />
198 <param name="type" value="none" />
199 <param name="filenames" value="tvc_mini.fastq" ftype="fastqsanger" />
200 <param name="maf_wanted" value="false"/>
201 <param name="bam_wanted" value="false"/>
202 <output name="out_fasta" file="tvc_map_same_strain.fasta" ftype="fasta" />
203 <output name="out_log" file="empty_file.dat" compare="contains" />
204 </test>
205 </tests>
206 <help>
207
208 **What it does**
209
210 Runs MIRA v4.0 in mapping mode, collects the output, generates a sorted BAM
211 file, and throws away all the temporary files.
212
213 MIRA is an open source assembly tool capable of handling sequence data from
214 a range of platforms (Sanger capillary, Solexa/Illumina, Roche 454, Ion Torrent
215 and also PacBio).
216
217 It is particularly suited to small genomes such as bacteria.
218
219
220 **Notes on paired reads**
221
222 .. class:: warningmark
223
224 MIRA uses read naming conventions to identify paired read partners
225 (and does not care about their order in the input files). In most cases,
226 the Solexa/Illumina setting is fine. For Sanger capillary sequencing,
227 you may need to rename your reads to match one of the standard conventions
228 supported by MIRA. For Roche 454 or Ion Torrent the appropriate settings
229 depend on how the FASTQ file was produced:
230
231 * If using Roche's ``sffinfo`` or older versions of ``sff_extract``
232 to convert SFF files to FASTQ, your reads will probably have the
233 ``---&gt; &lt;---`` orientation and use the ``.f`` and ``.r``
234 suffixes (FR naming).
235
236 * If using a recent version of ``sff_extract``, then the ``/1`` and ``/2``
237 suffixes are used (Solexa/Illumina style naming) and the original
238 ``2---&gt; 1---&gt;`` orientation is preserved.
239
240 The reason for this is the raw data for Roche 454 and Ion Torrent paired-end
241 libraries sequences a circularised fragment such that the raw data begins
242 with the end of the fragment, a linker, then the start of the fragment.
243 This means both the start and end are sequenced from the same strand, and
244 have the orientation ``2---&gt; 1---&gt;``. However, in order to use the data
245 with traditional tools expecting Sanger capillary style ``---&gt; &lt;---``
246 orientation it was common to reverse complement one of the pair to mimic this.
247
248
249 **Citation**
250
251 If you use this Galaxy tool in work leading to a scientific publication please
252 cite the following papers:
253
254 Peter J.A. Cock, Björn A. Grüning, Konrad Paszkiewicz and Leighton Pritchard (2013).
255 Galaxy tools and workflows for sequence analysis with applications
256 in molecular plant pathology. PeerJ 1:e167
257 http://dx.doi.org/10.7717/peerj.167
258
259 Bastien Chevreux, Thomas Wetter and Sándor Suhai (1999).
260 Genome Sequence Assembly Using Trace Signals and Additional Sequence Information.
261 Computer Science and Biology: Proceedings of the German Conference on Bioinformatics (GCB) 99, pp. 45-56.
262 http://www.bioinfo.de/isb/gcb99/talks/chevreux/main.html
263
264 This wrapper is available to install into other Galaxy Instances via the Galaxy
265 Tool Shed at http://toolshed.g2.bx.psu.edu/view/peterjc/mira4_assembler
266 </help>
267 </tool>