comparison tophat2_aurora.xml @ 0:589de4bdaca4 default tip

for Apache Aurora jobrunner
author Makoto Nasuno <nasuno@ascade.co.jp>
date Fri, 26 Feb 2016 14:23:22 +0900
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:589de4bdaca4
1 <tool id="tophat2_parallel" name="Tophat parallel for aurora" version="0.7">
2 <!-- Wrapper compatible with Tophat version 2.0.0+ -->
3 <description>Gapped-read mapper for RNA-seq data</description>
4 <!-- <version_command>tophat2 --version</version_command> -->
5 <requirements>
6 <container type="docker">nasuno/tophat2:2.0.9</container>
7 </requirements>
8
9 <command>
10 ##
11 ## Set path to index, building the reference if necessary.
12 ##
13
14 #set index_path = ''
15 #if $refGenomeSource.genomeSource == "history":
16 bowtie2-build "$refGenomeSource.ownFile" genome ; ln -s "$refGenomeSource.ownFile" genome.fa ;
17 #set index_path = 'genome'
18 #else:
19 #set index_path = $refGenomeSource.index.fields.path
20 #end if
21
22 ##
23 ## Run tophat.
24 ##
25
26 tophat2
27
28 ## Change this to accommodate the number of threads you have available.
29 --num-threads \${GALAXY_SLOTS:-4}
30
31 --output-dir ./tophat_out
32
33 ## Set params.
34 #if $params.settingsType == "full":
35 --read-mismatches $params.read_mismatches
36 #if str($params.bowtie_n) == "Yes":
37 --bowtie-n
38 #end if
39
40 --read-edit-dist $params.read_edit_dist
41 --read-realign-edit-dist $params.read_realign_edit_dist
42 -a $params.anchor_length
43 -m $params.splice_mismatches
44 -i $params.min_intron_length
45 -I $params.max_intron_length
46 -g $params.max_multihits
47 --min-segment-intron $params.min_segment_intron
48 --max-segment-intron $params.max_segment_intron
49 --segment-mismatches $params.seg_mismatches
50 --segment-length $params.seg_length
51 --library-type $params.library_type
52
53 ## Indel search.
54 #if $params.indel_search.allow_indel_search == "Yes":
55 ## --allow-indels
56 --max-insertion-length $params.indel_search.max_insertion_length
57 --max-deletion-length $params.indel_search.max_deletion_length
58 #else:
59 --no-novel-indels
60 #end if
61
62 ## Supplying junctions parameters.
63 #if $params.own_junctions.use_junctions == "Yes":
64 #if $params.own_junctions.gene_model_ann.use_annotations == "Yes":
65 -G $params.own_junctions.gene_model_ann.gene_annotation_model
66 #end if
67 #if $params.own_junctions.raw_juncs.use_juncs == "Yes":
68 -j $params.own_junctions.raw_juncs.raw_juncs
69 #end if
70 #if str($params.own_junctions.no_novel_juncs) == "Yes":
71 --no-novel-juncs
72 #end if
73 #end if
74
75 #if $params.coverage_search.use_search == "Yes":
76 --coverage-search
77 --min-coverage-intron $params.coverage_search.min_coverage_intron
78 --max-coverage-intron $params.coverage_search.max_coverage_intron
79 #else:
80 --no-coverage-search
81 #end if
82
83 #if str($params.microexon_search) == "Yes":
84 --microexon-search
85 #end if
86
87 #if $params.fusion_search.do_search == "Yes":
88 --fusion-search
89 --fusion-anchor-length $params.fusion_search.anchor_len
90 --fusion-min-dist $params.fusion_search.min_dist
91 --fusion-read-mismatches $params.fusion_search.read_mismatches
92 --fusion-multireads $params.fusion_search.multireads
93 --fusion-multipairs $params.fusion_search.multipairs
94 --fusion-ignore-chromosomes "$params.fusion_search.ignore_chromosomes"
95 #end if
96
97 #if $params.bowtie2_settings.b2_settings == "Yes":
98 #if $params.bowtie2_settings.preset.b2_preset == "Yes":
99 --b2-$params.bowtie2_settings.preset.b2_preset_select
100 #end if
101 #end if
102
103 #end if
104
105 ## Read group information.
106 #if $readGroup.specReadGroup == "yes"
107 --rg-id "$readGroup.rgid"
108 --rg-library "$readGroup.rglb"
109 --rg-platform "$readGroup.rgpl"
110 --rg-sample "$readGroup.rgsm"
111 #end if
112
113 ## Set index path, inputs and parameters specific to paired data.
114 #if $singlePaired.sPaired != "single"
115 -r $singlePaired.mate_inner_distance
116 --mate-std-dev=$singlePaired.mate_std_dev
117
118 #if str($singlePaired.report_discordant_pairs) == "No":
119 --no-discordant
120 #end if
121
122 #if $singlePaired.sPaired == "paired"
123 ${index_path} "$singlePaired.input1" "$singlePaired.input2"
124 #else
125 ${index_path} "$singlePaired.input.forward" "$singlePaired.input.reverse"
126 #end if
127 #else
128 ${index_path} "$singlePaired.input1"
129 #end if
130 </command>
131
132 <inputs>
133 <param name="job_annotation" type="text" value="tophat.parallel" label="Job Annotation" />
134 <conditional name="singlePaired">
135 <param name="sPaired" type="select" label="Is this library mate-paired?">
136 <option value="single">Single-end</option>
137 <option value="paired">Paired-end (as individual datasets)</option>
138 <option value="paired_collection">Paired-end (as collection)</option>
139 </param>
140 <when value="single">
141 <param format="fastqsanger" name="input1" type="data" label="RNA-Seq FASTQ file" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33"/>
142 </when>
143 <when value="paired">
144 <param format="fastqsanger" name="input1" type="data" label="RNA-Seq FASTQ file, forward reads" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33" />
145 <param format="fastqsanger" name="input2" type="data" label="RNA-Seq FASTQ file, reverse reads" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33" />
146 <expand macro="paired_parameters" />
147 </when>
148 <when value="paired_collection">
149 <param format="fastqsanger" name="input" type="data_collection" collection_type="paired" label="RNA-Seq FASTQ paired reads" help="Nucleotide-space: Must have Sanger-scaled quality values with ASCII offset 33" />
150 <expand macro="paired_parameters" />
151 </when>
152 </conditional>
153 <expand macro="refGenomeSourceConditional">
154 <options from_data_table="tophat2_indexes">
155 <filter type="sort_by" column="2"/>
156 <validator type="no_options" message="No genomes are available for the selected input dataset"/>
157 </options>
158 </expand>
159 <conditional name="params">
160 <param name="settingsType" type="select" label="TopHat settings to use" help="You can use the default settings or set custom values for any of Tophat's parameters.">
161 <option value="preSet">Use Defaults</option>
162 <option value="full">Full parameter list</option>
163 </param>
164 <when value="preSet" />
165 <!-- Full/advanced params. -->
166 <when value="full">
167 <param name="read_realign_edit_dist" type="integer" value="1000" label="Max realign edit distance" help="Some of the reads spanning multiple exons may be mapped incorrectly as a contiguous alignment to the genome even though the correct alignment should be a spliced one - this can happen in the presence of processed pseudogenes that are rarely (if at all) transcribed or expressed. This option can direct TopHat to re-align reads for which the edit distance of an alignment obtained in a previous mapping step is above or equal to this option value. If you set this option to 0, TopHat will map every read in all the mapping steps (transcriptome if you provided gene annotations, genome, and finally splice variants detected by TopHat), reporting the best possible alignment found in any of these mapping steps. This may greatly increase the mapping accuracy at the expense of an increase in running time. The default value for this option is set such that TopHat will not try to realign reads already mapped in earlier steps." />
168
169 <param name="read_edit_dist" type="integer" value="2" label="Max edit distance" help="Final read alignments having more than these many edit distance are discarded." />
170
171 <param name="library_type" type="select" label="Library Type" help="TopHat will treat the reads as strand specific. Every read alignment will have an XS attribute tag. Consider supplying library type options below to select the correct RNA-seq protocol.">
172 <option value="fr-unstranded">FR Unstranded</option>
173 <option value="fr-firststrand">FR First Strand</option>
174 <option value="fr-secondstrand">FR Second Strand</option>
175 </param>
176 <param name="read_mismatches" type="integer" value="2" label="Final read mismatches" help="Final read alignments having more than these many mismatches are discarded." />
177 <param name="bowtie_n" type="select" label="Use bowtie -n mode">
178 <option selected="true" value="No">No</option>
179 <option value="Yes">Yes</option>
180 </param>
181 <param name="anchor_length" type="integer" value="8" label="Anchor length (at least 3)" help="Report junctions spanned by reads with at least this many bases on each side of the junction." />
182 <param name="splice_mismatches" type="integer" value="0" label="Maximum number of mismatches that can appear in the anchor region of spliced alignment" />
183 <param name="min_intron_length" type="integer" value="70" label="The minimum intron length" help="TopHat will ignore donor/acceptor pairs closer than this many bases apart." />
184 <param name="max_intron_length" type="integer" value="500000" label="The maximum intron length" help="When searching for junctions ab initio, TopHat will ignore donor/acceptor pairs farther than this many bases apart, except when such a pair is supported by a split segment alignment of a long read." />
185 <expand macro="indel_searchConditional" />
186 alignments (number of reads divided by average depth of coverage)" help="0.0 to 1.0 (0 to turn off)" />
187 <param name="max_multihits" type="integer" value="20" label="Maximum number of alignments to be allowed" />
188 <param name="min_segment_intron" type="integer" value="50" label="Minimum intron length that may be found during split-segment (default) search" />
189 <param name="max_segment_intron" type="integer" value="500000" label="Maximum intron length that may be found during split-segment (default) search" />
190 <param name="seg_mismatches" type="integer" min="0" max="3" value="2" label="Number of mismatches allowed in each segment alignment for reads mapped independently" />
191 <param name="seg_length" type="integer" value="25" label="Minimum length of read segments" />
192
193 <!-- Options for supplying own junctions. -->
194 <expand macro="own_junctionsConditional" />
195 <!-- Coverage search. -->
196 <conditional name="coverage_search">
197 <param name="use_search" type="select" label="Use Coverage Search" help="Enables the coverage based search for junctions. Use when coverage search is disabled by default (such as for reads 75bp or longer), for maximum sensitivity.">
198 <option selected="true" value="No">No</option>
199 <option value="Yes">Yes</option>
200 </param>
201 <when value="Yes">
202 <param name="min_coverage_intron" type="integer" value="50" label="Minimum intron length that may be found during coverage search" />
203 <param name="max_coverage_intron" type="integer" value="20000" label="Maximum intron length that may be found during coverage search" />
204 </when>
205 <when value="No" />
206 </conditional>
207
208 <!-- Microexon search params -->
209 <param name="microexon_search" type="select" label="Use Microexon Search" help="With this option, the pipeline will attempt to find alignments incident to microexons. Works only for reads 50bp or longer.">
210 <option value="No">No</option>
211 <option value="Yes">Yes</option>
212 </param>
213
214 <!-- Fusion mapping. -->
215 <conditional name="fusion_search">
216 <param name="do_search" type="select" label="Do Fusion Search">
217 <option selected="true" value="No">No</option>
218 <option value="Yes">Yes</option>
219 </param>
220 <when value="No" />
221 <when value="Yes">
222 <param name="anchor_len" type="integer" value="20" label="Anchor Length" help="A 'supporting' read must map to both sides of a fusion by at least this many bases."/>
223 <param name="min_dist" type="integer" value="10000000" label="Minimum Distance" help="For intra-chromosomal fusions, TopHat-Fusion tries to find fusions separated by at least this distance."/>
224 <param name="read_mismatches" type="integer" value="2" label="Read Mismatches" help="Reads support fusions if they map across fusion with at most this many mismatches."/>
225 <param name="multireads" type="integer" value="2" label="Multireads" help="Reads that map to more than this many places will be ignored. It may be possible that a fusion is supported by reads (or pairs) that map to multiple places."/>
226 <param name="multipairs" type="integer" value="2" label="Multipairs" help="Pairs that map to more than this many places will be ignored."/>
227 <param name="ignore_chromosomes" type="text" value='' label="Ignore some chromosomes such as chrM when detecting fusion break points"/>
228 </when>
229 </conditional>
230
231 <!-- Bowtie2 settings. -->
232 <conditional name="bowtie2_settings">
233 <param name="b2_settings" type="select" label="Set Bowtie2 settings">
234 <option selected="true" value="No">No</option>
235 <option value="Yes">Yes</option>
236 </param>
237 <when value="No" />
238 <when value="Yes">
239 <conditional name="preset">
240 <param name="b2_preset" type="select" label="Use Preset options">
241 <option selected="true" value="Yes">Yes</option>
242 <option value="No">No</option>
243 </param>
244 <when value="Yes">
245 <param name="b2_preset_select" type="select" label="Preset option">
246 <option value="very-fast">Very fast</option>
247 <option value="fast">Fast</option>
248 <option selected="true" value="sensitive">Sensitive</option>
249 <option value="very-sensitive">Very sensitive</option>
250 </param>
251 </when>
252 <!-- TODO: -->
253 <when value="No" />
254 </conditional>
255 </when>
256 </conditional>
257 </when> <!-- full -->
258 </conditional> <!-- params -->
259 <conditional name="readGroup">
260 <param name="specReadGroup" type="select" label="Specify read group?">
261 <option value="yes">Yes</option>
262 <option value="no" selected="True">No</option>
263 </param>
264 <when value="yes">
265 <param name="rgid" type="text" size="25" label="Read group identifier (ID). Each @RG line must have a unique ID. The value of ID is used in the RG tags of alignment records. Must be unique among all read groups in header section." help="Required if RG specified. Read group IDs may be modified when merging SAM files in order to handle collisions." />
266 <param name="rglb" type="text" size="25" label="Library name (LB)" help="Required if RG specified" />
267 <param name="rgpl" type="text" size="25" label="Platform/technology used to produce the reads (PL)" help="Required if RG specified. Valid values : CAPILLARY, LS454, ILLUMINA, SOLID, HELICOS, IONTORRENT and PACBIO" />
268 <param name="rgsm" type="text" size="25" label="Sample (SM)" help="Required if RG specified. Use pool name where a pool is being sequenced" />
269 </when>
270 <when value="no" />
271 </conditional> <!-- readGroup -->
272 </inputs>
273
274 <stdio>
275 <regex match="Exception|Error" source="both" level="fatal" description="Tool execution failed"/>
276 <regex match=".*" source="both" level="log" description="tool progress"/>
277 </stdio>
278
279 <outputs>
280 <!--
281 <data format="txt" name="align_summary" label="${tool.name} on ${on_string}: align_summary" from_work_dir="tophat_out/align_summary.txt"/>
282 <data format="tabular" name="fusions" label="${tool.name} on ${on_string}: fusions" from_work_dir="tophat_out/fusions.out">
283 <filter>(params['settingsType'] == 'full' and params['fusion_search']['do_search'] == 'Yes')</filter>
284 </data>
285 <data format="bed" name="insertions" label="${tool.name} on ${on_string}: insertions" from_work_dir="tophat_out/insertions.bed">
286 <expand macro="dbKeyActions" />
287 </data>
288 <data format="bed" name="deletions" label="${tool.name} on ${on_string}: deletions" from_work_dir="tophat_out/deletions.bed">
289 <expand macro="dbKeyActions" />
290 </data>
291 <data format="bed" name="junctions" label="${tool.name} on ${on_string}: splice junctions" from_work_dir="tophat_out/junctions.bed">
292 <expand macro="dbKeyActions" />
293 </data>
294 -->
295 <data format="bam" name="accepted_hits" label="${tool.name} on ${on_string}: accepted_hits" from_work_dir="tophat_out/accepted_hits.bam">
296 <expand macro="dbKeyActions" />
297 </data>
298 </outputs>
299
300 <macros>
301 <import>tophat_macros.xml</import>
302 <xml name="paired_parameters">
303 <param name="mate_inner_distance" type="integer" value="300" label="Mean Inner Distance between Mate Pairs" />
304 <param name="mate_std_dev" type="integer" value="20" label="Std. Dev for Distance between Mate Pairs" help="The standard deviation for the distribution on inner distances between mate pairs."/>
305 <!-- Discordant pairs. -->
306 <param name="report_discordant_pairs" type="select" label="Report discordant pair alignments?">
307 <option value="No">No</option>
308 <option selected="True" value="Yes">Yes</option>
309 </param>
310 </xml>
311 <macro name="dbKeyActions">
312 <actions>
313 <conditional name="refGenomeSource.genomeSource">
314 <when value="indexed">
315 <action type="metadata" name="dbkey">
316 <option type="from_data_table" name="tophat2_indexes" column="1" offset="0">
317 <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
318 <filter type="param_value" ref="refGenomeSource.index" column="0"/>
319 </option>
320 </action>
321 </when>
322 <when value="history">
323 <action type="metadata" name="dbkey">
324 <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
325 </action>
326 </when>
327 </conditional>
328 </actions>
329 </macro>
330 </macros>
331
332 <help>
333 **Tophat Overview**
334
335 TopHat_ is a fast splice junction mapper for RNA-Seq reads. It aligns RNA-Seq reads to mammalian-sized genomes using the ultra high-throughput short read aligner Bowtie(2), and then analyzes the mapping results to identify splice junctions between exons. Please cite: Kim D, Pertea G, Trapnell C, Pimentel H, Kelley R, and Salzberg SL. TopHat2: accurate alignment
336 of transcriptomes in the presence of insertions, deletions and gene fusions. Genome Biol 14:R36, 2013.
337
338 .. _Tophat: http://ccb.jhu.edu/software/tophat/
339
340 ------
341
342 **Know what you are doing**
343
344 .. class:: warningmark
345
346 There is no such thing (yet) as an automated gearshift in splice junction identification. It is all like stick-shift driving in San Francisco. In other words, running this tool with default parameters will probably not give you meaningful results. A way to deal with this is to **understand** the parameters by carefully reading the `documentation`__ and experimenting. Fortunately, Galaxy makes experimenting easy.
347
348 .. __: http://ccb.jhu.edu/software/tophat/manual.shtml
349
350 ------
351
352 **Input formats**
353
354 Tophat accepts files in Sanger FASTQ format. Use the FASTQ Groomer to prepare your files.
355
356 ------
357
358 **Outputs**
359
360 Tophat produces two output files:
361
362 - junctions -- A UCSC BED_ track of junctions reported by TopHat. Each junction consists of two connected BED blocks, where each block is as long as the maximal overhang of any read spanning the junction. The score is the number of alignments spanning the junction.
363 - accepted_hits -- A list of read alignments in BAM_ format.
364
365 .. _BED: http://genome.ucsc.edu/FAQ/FAQformat.html#format1
366 .. _BAM: http://samtools.sourceforge.net/
367
368 Two other possible outputs, depending on the options you choose, are insertions and deletions, both of which are in BED format.
369
370 -------
371
372 **Tophat settings**
373
374 All of the options have a default value. You can change any of them. Some of the options in Tophat have been implemented here.
375
376 ------
377
378 **Tophat parameter list**
379
380 This is a list of implemented Tophat options::
381
382 -r This is the expected (mean) inner distance between mate pairs. For, example, for paired end runs with fragments
383 selected at 300bp, where each end is 50bp, you should set -r to be 200. There is no default, and this parameter
384 is required for paired end runs.
385 --mate-std-dev INT The standard deviation for the distribution on inner distances between mate pairs. The default is 20bp.
386 -a/--min-anchor-length INT The "anchor length". TopHat will report junctions spanned by reads with at least this many bases on each side of the junction. Note that individual spliced
387 alignments may span a junction with fewer than this many bases on one side. However, every junction involved in spliced alignments is supported by at least one
388 read with this many bases on each side. This must be at least 3 and the default is 8.
389 -m/--splice-mismatches INT The maximum number of mismatches that may appear in the "anchor" region of a spliced alignment. The default is 0.
390 -i/--min-intron-length INT The minimum intron length. TopHat will ignore donor/acceptor pairs closer than this many bases apart. The default is 70.
391 -I/--max-intron-length INT The maximum intron length. When searching for junctions ab initio, TopHat will ignore donor/acceptor pairs farther than this many bases apart, except when such a pair is supported by a split segment alignment of a long read. The default is 500000.
392 -g/--max-multihits INT Instructs TopHat to allow up to this many alignments to the reference for a given read, and suppresses all alignments for reads with more than this many
393 alignments. The default is 40.
394 -G/--GTF [GTF 2.2 file] Supply TopHat with a list of gene model annotations. TopHat will use the exon records in this file to build a set of known splice junctions for each gene, and will attempt to align reads to these junctions even if they would not normally be covered by the initial mapping.
395 -j/--raw-juncs [juncs file] Supply TopHat with a list of raw junctions. Junctions are specified one per line, in a tab-delimited format. Records look like: [chrom] [left] [right] [+/-], left and right are zero-based coordinates, and specify the last character of the left sequenced to be spliced to the first character of the right sequence, inclusive.
396 -no-novel-juncs Only look for junctions indicated in the supplied GFF file. (ignored without -G)
397 --no-coverage-search Disables the coverage based search for junctions.
398 --coverage-search Enables the coverage based search for junctions. Use when coverage search is disabled by default (such as for reads 75bp or longer), for maximum sensitivity.
399 --microexon-search With this option, the pipeline will attempt to find alignments incident to microexons. Works only for reads 50bp or longer.
400 --segment-mismatches Read segments are mapped independently, allowing up to this many mismatches in each segment alignment. The default is 2.
401 --segment-length Each read is cut up into segments, each at least this long. These segments are mapped independently. The default is 25.
402 --min-coverage-intron The minimum intron length that may be found during coverage search. The default is 50.
403 --max-coverage-intron The maximum intron length that may be found during coverage search. The default is 20000.
404 --min-segment-intron The minimum intron length that may be found during split-segment search. The default is 50.
405 --max-segment-intron The maximum intron length that may be found during split-segment search. The default is 500000.
406 </help>
407 <citations>
408 <citation type="doi">10.1186/gb-2013-14-4-r36</citation>
409 </citations>
410 </tool>