comparison tophat2/tophat2_wrapper.xml @ 0:620cb7a7ef60 draft

Uploaded
author scottx611x
date Tue, 26 Apr 2016 13:40:24 -0400
parents
children 11a6a9ac5432
comparison
equal deleted inserted replaced
-1:000000000000 0:620cb7a7ef60
1 <tool id="tophat2" name="TopHat" version="0.9">
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 <requirement type="package" version="2.2.5">bowtie2</requirement>
7 <requirement type="package" version="2.0.14">tophat</requirement>
8 </requirements>
9
10 <command>
11 ##
12 ## Set path to index, building the reference if necessary.
13 ##
14
15 #set index_path = ''
16 #if $refGenomeSource.genomeSource == "history":
17 bowtie2-build "$refGenomeSource.ownFile" genome ; ln -s "$refGenomeSource.ownFile" genome.fa ;
18 #set index_path = 'genome'
19 #else:
20 #set index_path = $refGenomeSource.index.fields.path
21 #end if
22
23 ##
24 ## Run tophat.
25 ##
26
27 tophat2
28
29 ## Change this to accommodate the number of threads you have available.
30 --num-threads \${GALAXY_SLOTS:-4}
31
32 ## Set params.
33 #if $params.settingsType == "full":
34 --read-mismatches $params.read_mismatches
35 #if str($params.bowtie_n) == "Yes":
36 --bowtie-n
37 #end if
38
39 --read-edit-dist $params.read_edit_dist
40 --read-realign-edit-dist $params.read_realign_edit_dist
41 -a $params.anchor_length
42 -m $params.splice_mismatches
43 -i $params.min_intron_length
44 -I $params.max_intron_length
45 -g $params.max_multihits
46 --min-segment-intron $params.min_segment_intron
47 --max-segment-intron $params.max_segment_intron
48 --segment-mismatches $params.seg_mismatches
49 --segment-length $params.seg_length
50 --library-type $params.library_type
51
52 ## Indel search.
53 #if $params.indel_search.allow_indel_search == "Yes":
54 ## --allow-indels
55 --max-insertion-length $params.indel_search.max_insertion_length
56 --max-deletion-length $params.indel_search.max_deletion_length
57 #else:
58 --no-novel-indels
59 #end if
60
61 ## Supplying junctions parameters.
62 #if $params.own_junctions.use_junctions == "Yes":
63 #if $params.own_junctions.gene_model_ann.use_annotations == "indexed"
64 -G $params.own_junctions.gene_model_ann.gene_annotation_model.fields.path
65 #elif $params.own_junctions.gene_model_ann.use_annotations == "history"
66 -G $params.own_junctions.gene_model_ann.gene_annotation_model
67 #end if
68 #if $params.own_junctions.raw_juncs.use_juncs == "Yes":
69 -j $params.own_junctions.raw_juncs.raw_juncs
70 #end if
71 #if str($params.own_junctions.no_novel_juncs) == "Yes":
72 --no-novel-juncs
73 #end if
74 #end if
75
76 #if $params.coverage_search.use_search == "Yes":
77 --coverage-search
78 --min-coverage-intron $params.coverage_search.min_coverage_intron
79 --max-coverage-intron $params.coverage_search.max_coverage_intron
80 #else:
81 --no-coverage-search
82 #end if
83
84 #if str($params.microexon_search) == "Yes":
85 --microexon-search
86 #end if
87
88 #if $params.fusion_search.do_search == "Yes":
89 --fusion-search
90 --fusion-anchor-length $params.fusion_search.anchor_len
91 --fusion-min-dist $params.fusion_search.min_dist
92 --fusion-read-mismatches $params.fusion_search.read_mismatches
93 --fusion-multireads $params.fusion_search.multireads
94 --fusion-multipairs $params.fusion_search.multipairs
95 --fusion-ignore-chromosomes "$params.fusion_search.ignore_chromosomes"
96 #end if
97
98 #if $params.bowtie2_settings.b2_settings == "Yes":
99 #if $params.bowtie2_settings.preset.b2_preset == "Yes":
100 --b2-$params.bowtie2_settings.preset.b2_preset_select
101 #end if
102 #end if
103
104 #end if
105
106 ## Read group information.
107 #if $readGroup.specReadGroup == "yes"
108 --rg-id "$readGroup.rgid"
109 --rg-library "$readGroup.rglb"
110 --rg-platform "$readGroup.rgpl"
111 --rg-sample "$readGroup.rgsm"
112 #end if
113
114 ## Set index path, inputs and parameters specific to paired data.
115 #if $singlePaired.sPaired != "single"
116 -r $singlePaired.mate_inner_distance
117 --mate-std-dev=$singlePaired.mate_std_dev
118
119 #if str($singlePaired.report_discordant_pairs) == "No":
120 --no-discordant
121 #end if
122
123 #if $singlePaired.sPaired == "paired"
124 ${index_path} "$singlePaired.input1" "$singlePaired.input2"
125 #else
126 ${index_path} "$singlePaired.input.forward" "$singlePaired.input.reverse"
127 #end if
128 #else
129 ${index_path} "$singlePaired.input1"
130 #end if
131 </command>
132
133 <inputs>
134 <conditional name="singlePaired">
135 <param name="sPaired" type="select" label="Is this single-end or paired-end data?">
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="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="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="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="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="--read-realign-edit-dist; 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="--read-edit-dist; Final read alignments having more than these many edit distance are discarded." />
170
171 <param name="library_type" type="select" label="Library Type" help="--library-type; 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="--read-mismatches; Final read alignments having more than these many mismatches are discarded." />
177 <param name="bowtie_n" type="select" label="Use bowtie -n mode" help="--bowtie-n; TopHat uses &quot;-v&quot; in Bowtie for initial read mapping (the default), but with this option, &quot;-n&quot; is used instead. Read segments are always mapped using &quot;-v&quot; option.">
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="-a/--min-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 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 read with this many bases on each side. This must be at least 3 and the default is 8." />
182 <param name="splice_mismatches" type="integer" value="0" label="Maximum number of mismatches that can appear in the anchor region of spliced alignment" help="-m/--splice-mismatches; The default is 0."/>
183 <param name="min_intron_length" type="integer" value="70" label="The minimum intron length" help="-i/--min-intron-length; TopHat will ignore donor/acceptor pairs closer than this many bases apart. The default is 70." />
184 <param name="max_intron_length" type="integer" value="500000" label="The maximum intron length" help="-I/--max-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." />
185
186 <expand macro="indel_searchConditional" />
187
188 <param name="max_multihits" type="integer" value="20" label="Maximum number of alignments to be allowed" help="-g/--max-multihits; Instructs TopHat to allow up to this many alignments to the reference for a given read, and choose the alignments based on their alignment scores if there are more than this number. The default is 20 for read mapping. Unless you use --report-secondary-alignments, TopHat will report the alignments with the best alignment score. If there are more alignments with the same score than this number, TopHat will randomly report only this many alignments. In case of using --report-secondary-alignments, TopHat will try to report alignments up to this option value, and TopHat may randomly output some of the alignments with the same score to meet this number."/>
189 <param name="min_segment_intron" type="integer" value="50" label="Minimum intron length that may be found during split-segment (default) search" help="--min-segment-intron; The minimum intron length that may be found during split-segment search. The default is 50."/>
190 <param name="max_segment_intron" type="integer" value="500000" label="Maximum intron length that may be found during split-segment (default) search" help="--max-segment-intron; The maximum intron length that may be found during split-segment search. The default is 500000."/>
191 <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" help="--segment-mismatches; Read segments are mapped independently, allowing up to this many mismatches in each segment alignment. The default is 2."/>
192 <param name="seg_length" type="integer" value="25" label="Minimum length of read segments" help="--segment-length; Each read is cut up into segments, each at least this long. These segments are mapped independently. The default is 25."/>
193 <param name="output_unmapped" type="boolean" truevalue="true" falsevalue="false" checked="false" label="Output unmapped reads" help="If checked, a BAM with the unmapped reads will be added to the history" />
194 <!-- Options for supplying own junctions. -->
195 <expand macro="own_junctionsConditional" />
196 <!-- Coverage search. -->
197 <conditional name="coverage_search">
198 <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.">
199 <option selected="true" value="No">No</option>
200 <option value="Yes">Yes</option>
201 </param>
202 <when value="Yes">
203 <param name="min_coverage_intron" type="integer" value="50" label="Minimum intron length that may be found during coverage search" help="--min-coverage-intron; The minimum intron length that may be found during coverage search. The default is 50."/>
204 <param name="max_coverage_intron" type="integer" value="20000" label="Maximum intron length that may be found during coverage search" help="--max-coverage-intron; The maximum intron length that may be found during coverage search. The default is 20000."/>
205 </when>
206 <when value="No" />
207 </conditional>
208
209 <!-- Microexon search params -->
210 <param name="microexon_search" type="select" label="Use Microexon Search" help="--microexon-search; With this option, the pipeline will attempt to find alignments incident to microexons. Works only for reads 50bp or longer.">
211 <option value="No">No</option>
212 <option value="Yes">Yes</option>
213 </param>
214
215 <!-- Fusion mapping. -->
216 <conditional name="fusion_search">
217 <param name="do_search" type="select" label="Do Fusion Search" help="Reads can be aligned to potential fusion transcripts if the --fusion-search option is specified. The fusion alignments are reported in SAM format using custom fields XF and XP (see the output format) and some additional information about fusions will be reported (see fusions.out). Once mapping is done, you can run tophat-fusion-post to filter out fusion transcripts (see the TopHat-Fusion website for more details).">
218 <option selected="true" value="No">No</option>
219 <option value="Yes">Yes</option>
220 </param>
221 <when value="No" />
222 <when value="Yes">
223 <param name="anchor_len" type="integer" value="20" label="Anchor Length" help="--fusion-anchor-length; A 'supporting' read must map to both sides of a fusion by at least this many bases. The default is 20."/>
224 <param name="min_dist" type="integer" value="10000000" label="Minimum Distance" help="--fusion-min-dist; For intra-chromosomal fusions, TopHat-Fusion tries to find fusions separated by at least this distance. The default is 10000000."/>
225 <param name="read_mismatches" type="integer" value="2" label="Read Mismatches" help="--fusion-read-mismatches; Reads support fusions if they map across fusion with at most this many mismatches. The default is 2."/>
226 <param name="multireads" type="integer" value="2" label="Multireads" help="--fusion-multireads; 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. The default is 2."/>
227 <param name="multipairs" type="integer" value="2" label="Multipairs" help="--fusion-multipairs; Pairs that map to more than this many places will be ignored. The default is 2."/>
228 <param name="ignore_chromosomes" type="text" value='' label="--fusion-ignore-chromosomes; Ignore some chromosomes such as chrM when detecting fusion break points"/>
229 </when>
230 </conditional>
231
232 <!-- Bowtie2 settings. -->
233 <conditional name="bowtie2_settings">
234 <param name="b2_settings" type="select" label="Set Bowtie2 settings">
235 <option selected="true" value="No">No</option>
236 <option value="Yes">Yes</option>
237 </param>
238 <when value="No" />
239 <when value="Yes">
240 <conditional name="preset">
241 <param name="b2_preset" type="select" label="Use Preset options">
242 <option selected="true" value="Yes">Yes</option>
243 <option value="No">No</option>
244 </param>
245 <when value="Yes">
246 <param name="b2_preset_select" type="select" label="Preset option">
247 <option value="very-fast">Very fast</option>
248 <option value="fast">Fast</option>
249 <option selected="true" value="sensitive">Sensitive</option>
250 <option value="very-sensitive">Very sensitive</option>
251 </param>
252 </when>
253 <!-- TODO: -->
254 <when value="No" />
255 </conditional>
256 </when>
257 </conditional>
258 </when> <!-- full -->
259 </conditional> <!-- params -->
260 <conditional name="readGroup">
261 <param name="specReadGroup" type="select" label="Specify read group?">
262 <option value="yes">Yes</option>
263 <option value="no" selected="True">No</option>
264 </param>
265 <when value="yes">
266 <param name="rgid" type="text" 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." />
267 <param name="rglb" type="text" label="Library name (LB)" help="Required if RG specified" />
268 <param name="rgpl" type="text" label="Platform/technology used to produce the reads (PL)" help="Required if RG specified. Valid values : CAPILLARY, LS454, ILLUMINA, SOLID, HELICOS, IONTORRENT and PACBIO" />
269 <param name="rgsm" type="text" label="Sample (SM)" help="Required if RG specified. Use pool name where a pool is being sequenced" />
270 </when>
271 <when value="no" />
272 </conditional> <!-- readGroup -->
273 </inputs>
274
275 <stdio>
276 <regex match="Exception|Error" source="both" level="fatal" description="Tool execution failed"/>
277 <regex match=".*" source="both" level="log" description="tool progress"/>
278 </stdio>
279
280 <outputs>
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 <data format="bam" name="accepted_hits" label="${tool.name} on ${on_string}: accepted_hits" from_work_dir="tophat_out/accepted_hits.bam">
295 <expand macro="dbKeyActions" />
296 </data>
297 <data format="bam" name="unmapped" label="${tool.name} on ${on_string}: unmapped" from_work_dir="tophat_out/unmapped.bam">
298 <filter>(params['settingsType'] == 'full' and params['output_unmapped'])</filter>
299 <expand macro="dbKeyActions" />
300 </data>
301
302 </outputs>
303
304 <macros>
305 <import>tophat_macros.xml</import>
306 <xml name="paired_parameters">
307 <param name="mate_inner_distance" type="integer" value="300" label="Mean Inner Distance between Mate Pairs" help="-r/--mate-inner-dist; This is the expected (mean) inner distance between mate pairs. For, example, for paired end runs with fragments selected at 300bp, where each end is 50bp, you should set -r to be 200. The default is 50bp."/>
308 <param name="mate_std_dev" type="integer" value="20" label="Std. Dev for Distance between Mate Pairs" help="--mate-std-dev; The standard deviation for the distribution on inner distances between mate pairs. The default is 20bp."/>
309 <!-- Discordant pairs. -->
310 <param name="report_discordant_pairs" type="select" label="Report discordant pair alignments?" help="--no-discordant">
311 <option value="No">No</option>
312 <option selected="True" value="Yes">Yes</option>
313 </param>
314 </xml>
315 <macro name="dbKeyActions">
316 <actions>
317 <conditional name="refGenomeSource.genomeSource">
318 <when value="indexed">
319 <action type="metadata" name="dbkey">
320 <option type="from_data_table" name="tophat2_indexes" column="1" offset="0">
321 <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
322 <filter type="param_value" ref="refGenomeSource.index" column="0"/>
323 </option>
324 </action>
325 </when>
326 <when value="history">
327 <action type="metadata" name="dbkey">
328 <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
329 </action>
330 </when>
331 </conditional>
332 </actions>
333 </macro>
334 </macros>
335
336 <tests>
337 <!-- Test base-space single-end reads with pre-built index and preset parameters -->
338 <test>
339 <!-- TopHat commands:
340 tophat2 -o tmp_dir -p 1 tophat_in1 test-data/tophat_in2.fastqsanger
341 Rename the files in tmp_dir appropriately
342 -->
343 <param name="sPaired" value="single" />
344 <param name="input1" ftype="fastqsanger" value="tophat_in2.fastqsanger" />
345 <param name="genomeSource" value="indexed" />
346 <param name="index" value="tophat_test" />
347 <param name="settingsType" value="preSet" />
348 <param name="specReadGroup" value="no" />
349 <output name="junctions" file="tophat2_out1j.bed" />
350 <output name="accepted_hits" file="tophat_out1h.bam" compare="sim_size" />
351 </test>
352 <!-- Test using base-space test data: paired-end reads, index from history. -->
353 <test>
354 <!-- TopHat commands:
355 bowtie2-build -f test-data/tophat_in1.fasta tophat_in1
356 tophat2 -o tmp_dir -p 1 -r 20 tophat_in1 test-data/tophat_in2.fastqsanger test-data/tophat_in3.fastqsanger
357 Rename the files in tmp_dir appropriately
358 -->
359 <param name="sPaired" value="paired" />
360 <param name="input1" ftype="fastqsanger" value="tophat_in2.fastqsanger" />
361 <param name="input2" ftype="fastqsanger" value="tophat_in3.fastqsanger" />
362 <param name="genomeSource" value="history" />
363 <param name="ownFile" ftype="fasta" value="tophat_in1.fasta" />
364 <param name="mate_inner_distance" value="20" />
365 <param name="settingsType" value="preSet" />
366 <param name="specReadGroup" value="no" />
367 <output name="junctions" file="tophat2_out2j.bed" />
368 <output name="accepted_hits" file="tophat_out2h.bam" compare="sim_size" />
369 </test>
370 <test>
371 <!-- Same test as above but with a collection. -->
372 <param name="sPaired" value="paired_collection" />
373 <param name="input">
374 <collection type="paired">
375 <element name="forward" value="tophat_in2.fastqsanger" ftype="fastqsanger" />
376 <element name="reverse" value="tophat_in3.fastqsanger" ftype="fastqsanger" />
377 </collection>
378 </param>
379 <param name="genomeSource" value="history" />
380 <param name="ownFile" ftype="fasta" value="tophat_in1.fasta" />
381 <param name="mate_inner_distance" value="20" />
382 <param name="settingsType" value="preSet" />
383 <param name="specReadGroup" value="no" />
384 <output name="junctions" file="tophat2_out2j.bed" />
385 <output name="accepted_hits" file="tophat_out2h.bam" compare="sim_size" />
386 </test>
387 <!-- Test base-space single-end reads with user-supplied reference fasta and full parameters -->
388 <test>
389 <!-- TopHat commands:
390 bowtie2-build -f test-data/tophat_in1.fasta tophat_in1
391 tophat2 -o tmp_dir -p 1 -a 8 -m 0 -i 70 -I 500000 -g 40 +coverage-search +min-coverage-intron 50 +max-coverage-intro 20000 +segment-mismatches 2 +segment-length 25 +microexon-search tophat_in1 test-data/tophat_in2.fastqsanger
392 Replace the + with double-dash
393 Rename the files in tmp_dir appropriately
394 -->
395 <conditional name="singlePaired">
396 <param name="sPaired" value="single"/>
397 <param name="input1" ftype="fastqsanger" value="tophat_in2.fastqsanger"/>
398 </conditional>
399 <param name="genomeSource" value="history"/>
400 <param name="ownFile" value="tophat_in1.fasta"/>
401 <conditional name="params">
402 <param name="settingsType" value="full"/>
403 <param name="library_type" value="FR Unstranded"/>
404 <param name="read_mismatches" value="2"/>
405 <param name="bowtie_n" value="No"/>
406 <param name="anchor_length" value="8"/>
407 <param name="splice_mismatches" value="0"/>
408 <param name="min_intron_length" value="70"/>
409 <param name="max_intron_length" value="500000"/>
410 <param name="max_multihits" value="40"/>
411 <param name="min_segment_intron" value="50" />
412 <param name="max_segment_intron" value="500000" />
413 <param name="seg_mismatches" value="2"/>
414 <param name="seg_length" value="25"/>
415 <conditional name="indel_search">
416 <param name="allow_indel_search" value="Yes"/>
417 <param name="max_insertion_length" value="3"/>
418 <param name="max_deletion_length" value="3"/>
419 </conditional>
420 <conditional name="own_junctions">
421 <param name="use_junctions" value="Yes" />
422 <conditional name="gene_model_ann">
423 <param name="use_annotations" value="No" />
424 </conditional>
425 <conditional name="raw_juncs">
426 <param name="use_juncs" value="No" />
427 </conditional>
428 <conditional name="no_novel_juncs">
429 <param name="no_novel_juncs" value="No" />
430 </conditional>
431 </conditional>
432 <conditional name="coverage_search">
433 <param name="use_search" value="Yes" />
434 <param name="min_coverage_intron" value="50" />
435 <param name="max_coverage_intron" value="20000" />
436 </conditional>
437 <param name="microexon_search" value="Yes" />
438 <conditional name="bowtie2_settings">
439 <param name="b2_settings" value="No" />
440 </conditional>
441 <!-- Fusion search params -->
442 <conditional name="fusion_search">
443 <param name="do_search" value="Yes" />
444 <param name="anchor_len" value="21" />
445 <param name="min_dist" value="10000021" />
446 <param name="read_mismatches" value="3" />
447 <param name="multireads" value="4" />
448 <param name="multipairs" value="5" />
449 <param name="ignore_chromosomes" value="chrM"/>
450 </conditional>
451 </conditional>
452 <conditional name="readGroup">
453 <param name="specReadGroup" value="no" />
454 </conditional>
455 <output name="insertions" file="tophat_out3i.bed" />
456 <output name="deletions" file="tophat_out3d.bed" />
457 <output name="junctions" file="tophat2_out3j.bed" />
458 <output name="accepted_hits" file="tophat_out3h.bam" compare="sim_size" />
459 </test>
460 <!-- Test base-space paired-end reads with user-supplied reference fasta and full parameters -->
461 <test>
462 <!-- TopHat commands:
463 tophat2 -o tmp_dir -r 20 -p 1 -a 8 -m 0 -i 70 -I 500000 -g 40 +coverage-search +min-coverage-intron 50 +max-coverage-intro 20000 +segment-mismatches 2 +segment-length 25 +microexon-search +report_discordant_pairs tophat_in1 test-data/tophat_in2.fastqsanger test-data/tophat_in3.fastqsanger
464 Replace the + with double-dash
465 Rename the files in tmp_dir appropriately
466 -->
467 <conditional name="singlePaired">
468 <param name="sPaired" value="paired"/>
469 <param name="input1" ftype="fastqsanger" value="tophat_in2.fastqsanger"/>
470 <param name="input2" ftype="fastqsanger" value="tophat_in3.fastqsanger"/>
471 <param name="mate_inner_distance" value="20"/>
472 <param name="report_discordant_pairs" value="Yes" />
473 </conditional>
474 <param name="genomeSource" value="indexed"/>
475 <param name="index" value="tophat_test"/>
476 <conditional name="params">
477 <param name="settingsType" value="full"/>
478 <param name="library_type" value="FR Unstranded"/>
479 <param name="read_mismatches" value="5"/>
480 <!-- Error: the read mismatches (5) and the read gap length (2) should be less than or equal to the read edit dist (2) -->
481 <param name="read_edit_dist" value="5" />
482 <param name="bowtie_n" value="Yes"/>
483 <param name="mate_std_dev" value="20"/>
484 <param name="anchor_length" value="8"/>
485 <param name="splice_mismatches" value="0"/>
486 <param name="min_intron_length" value="70"/>
487 <param name="max_intron_length" value="500000"/>
488 <param name="max_multihits" value="40"/>
489 <param name="min_segment_intron" value="50" />
490 <param name="max_segment_intron" value="500000" />
491 <param name="seg_mismatches" value="2"/>
492 <param name="seg_length" value="25"/>
493 <conditional name="indel_search">
494 <param name="allow_indel_search" value="No"/>
495 </conditional>
496 <conditional name="own_junctions">
497 <param name="use_junctions" value="Yes" />
498 <conditional name="gene_model_ann">
499 <param name="use_annotations" value="No" />
500 </conditional>
501 <conditional name="raw_juncs">
502 <param name="use_juncs" value="No" />
503 </conditional>
504 <conditional name="no_novel_juncs">
505 <param name="no_novel_juncs" value="No" />
506 </conditional>
507 </conditional>
508 <conditional name="coverage_search">
509 <param name="use_search" value="No" />
510 </conditional>
511 <param name="microexon_search" value="Yes" />
512 <conditional name="bowtie2_settings">
513 <param name="b2_settings" value="No" />
514 </conditional>
515 <!-- Fusion search params -->
516 <conditional name="fusion_search">
517 <param name="do_search" value="Yes" />
518 <param name="anchor_len" value="21" />
519 <param name="min_dist" value="10000021" />
520 <param name="read_mismatches" value="3" />
521 <param name="multireads" value="4" />
522 <param name="multipairs" value="5" />
523 <param name="ignore_chromosomes" value="chrM"/>
524 </conditional>
525 </conditional>
526 <conditional name="readGroup">
527 <param name="specReadGroup" value="no" />
528 </conditional>
529 <output name="junctions" file="tophat2_out4j.bed" />
530 <output name="accepted_hits" file="tophat_out4h.bam" compare="sim_size" />
531 </test>
532 </tests>
533 <help>
534 **TopHat Overview**
535
536 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.
537
538 .. _TopHat: http://ccb.jhu.edu/software/tophat/
539
540 ------
541
542 **Know what you are doing**
543
544 .. class:: warningmark
545
546 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.
547
548 .. __: http://ccb.jhu.edu/software/tophat/manual.shtml
549
550 ------
551
552 **Input formats**
553
554 TopHat accepts files in Sanger FASTQ format. Use the FASTQ Groomer to prepare your files.
555
556 ------
557
558 **Outputs**
559
560 TopHat produces two output files:
561
562 - 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.
563 - accepted_hits -- A list of read alignments in BAM_ format.
564
565 .. _BED: http://genome.ucsc.edu/FAQ/FAQformat.html#format1
566 .. _BAM: http://samtools.sourceforge.net/
567
568 Two other possible outputs, depending on the options you choose, are insertions and deletions, both of which are in BED format.
569
570 -------
571
572 **TopHat settings**
573
574 All of the options have a default value. You can change any of them. Some of the options in TopHat have been implemented here.
575
576 ------
577
578 **TopHat parameter list**
579
580 This is a list of implemented TopHat options::
581
582 -r This is the expected (mean) inner distance between mate pairs. For, example, for paired end runs with fragments
583 selected at 300bp, where each end is 50bp, you should set -r to be 200. There is no default, and this parameter
584 is required for paired end runs.
585 --mate-std-dev INT The standard deviation for the distribution on inner distances between mate pairs. The default is 20bp.
586 -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
587 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
588 read with this many bases on each side. This must be at least 3 and the default is 8.
589 -m/--splice-mismatches INT The maximum number of mismatches that may appear in the "anchor" region of a spliced alignment. The default is 0.
590 -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.
591 -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.
592 -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
593 alignments. The default is 40.
594 -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.
595 -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.
596 -no-novel-juncs Only look for junctions indicated in the supplied GFF file. (ignored without -G)
597 --no-coverage-search Disables the coverage based search for junctions.
598 --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.
599 --microexon-search With this option, the pipeline will attempt to find alignments incident to microexons. Works only for reads 50bp or longer.
600 --segment-mismatches Read segments are mapped independently, allowing up to this many mismatches in each segment alignment. The default is 2.
601 --segment-length Each read is cut up into segments, each at least this long. These segments are mapped independently. The default is 25.
602 --min-coverage-intron The minimum intron length that may be found during coverage search. The default is 50.
603 --max-coverage-intron The maximum intron length that may be found during coverage search. The default is 20000.
604 --min-segment-intron The minimum intron length that may be found during split-segment search. The default is 50.
605 --max-segment-intron The maximum intron length that may be found during split-segment search. The default is 500000.
606 </help>
607 <citations>
608 <citation type="doi">10.1186/gb-2013-14-4-r36</citation>
609 </citations>
610 </tool>