/tools/ngs_rna/tophat_color_wrapper.xml

https://bitbucket.org/cistrome/cistrome-harvard/ · XML · 611 lines · 536 code · 41 blank · 34 comment · 0 complexity · c7af5aea8dea08ea1c52104cb4d329d0 MD5 · raw file

  1. <tool id="tophat_color" name="Tophat for SOLiD" version="1.0.0">
  2. <description>Find splice junctions using RNA-seq data</description>
  3. <requirements>
  4. <requirement type="package">tophat</requirement>
  5. </requirements>
  6. <command interpreter="python">
  7. tophat_wrapper.py
  8. ## Change this to accommodate the number of threads you have available.
  9. --num-threads="4"
  10. ## base- or color-space
  11. --color-space
  12. ## Provide outputs.
  13. --junctions-output=$junctions
  14. --hits-output=$accepted_hits
  15. ## Handle reference file.
  16. #if $refGenomeSource.genomeSource == "history":
  17. --own-file=$refGenomeSource.ownFile
  18. #else:
  19. --indexes-path="${refGenomeSource.index.fields.path}"
  20. #end if
  21. ## Are reads single-end or paired?
  22. --single-paired=$singlePaired.sPaired
  23. ## First input file always required.
  24. --input1=$input1
  25. ## Set params based on whether reads are single-end or paired.
  26. #if $singlePaired.sPaired == "single":
  27. --settings=$singlePaired.sParams.sSettingsType
  28. #if $singlePaired.sParams.sSettingsType == "full":
  29. -a $singlePaired.sParams.anchor_length
  30. -m $singlePaired.sParams.splice_mismatches
  31. -i $singlePaired.sParams.min_intron_length
  32. -I $singlePaired.sParams.max_intron_length
  33. -F $singlePaired.sParams.junction_filter
  34. -g $singlePaired.sParams.max_multihits
  35. --min-segment-intron $singlePaired.sParams.min_segment_intron
  36. --max-segment-intron $singlePaired.sParams.max_segment_intron
  37. --initial-read-mismatches=$singlePaired.sParams.initial_read_mismatches
  38. --seg-mismatches=$singlePaired.sParams.seg_mismatches
  39. --seg-length=$singlePaired.sParams.seg_length
  40. --library-type=$singlePaired.sParams.library_type
  41. ## Indel search.
  42. #if $singlePaired.sParams.indel_search.allow_indel_search == "Yes":
  43. ## --allow-indels
  44. --max-insertion-length $singlePaired.sParams.indel_search.max_insertion_length
  45. --max-deletion-length $singlePaired.sParams.indel_search.max_deletion_length
  46. #else:
  47. --no-novel-indels
  48. #end if
  49. ## Supplying junctions parameters.
  50. #if $singlePaired.sParams.own_junctions.use_junctions == "Yes":
  51. #if $singlePaired.sParams.own_junctions.gene_model_ann.use_annotations == "Yes":
  52. -G $singlePaired.sParams.own_junctions.gene_model_ann.gene_annotation_model
  53. #end if
  54. #if $singlePaired.sParams.own_junctions.raw_juncs.use_juncs == "Yes":
  55. -j $singlePaired.sParams.own_junctions.raw_juncs.raw_juncs
  56. #end if
  57. ## TODO: No idea why a string cast is necessary, but it is:
  58. #if str($singlePaired.sParams.own_junctions.no_novel_juncs) == "Yes":
  59. --no-novel-juncs
  60. #end if
  61. #end if
  62. #if $singlePaired.sParams.closure_search.use_search == "Yes":
  63. --closure-search
  64. --min-closure-exon $singlePaired.sParams.closure_search.min_closure_exon
  65. --min-closure-intron $singlePaired.sParams.closure_search.min_closure_intron
  66. --max-closure-intron $singlePaired.sParams.closure_search.max_closure_intron
  67. #else:
  68. --no-closure-search
  69. #end if
  70. #if $singlePaired.sParams.coverage_search.use_search == "Yes":
  71. --coverage-search
  72. --min-coverage-intron $singlePaired.sParams.coverage_search.min_coverage_intron
  73. --max-coverage-intron $singlePaired.sParams.coverage_search.max_coverage_intron
  74. #else:
  75. --no-coverage-search
  76. #end if
  77. ## TODO: No idea why the type conversion is necessary, but it seems to be.
  78. #if str($singlePaired.sParams.microexon_search) == "Yes":
  79. --microexon-search
  80. #end if
  81. #end if
  82. #else:
  83. --input2=$singlePaired.input2
  84. -r $singlePaired.mate_inner_distance
  85. --settings=$singlePaired.pParams.pSettingsType
  86. #if $singlePaired.pParams.pSettingsType == "full":
  87. --mate-std-dev=$singlePaired.pParams.mate_std_dev
  88. -a $singlePaired.pParams.anchor_length
  89. -m $singlePaired.pParams.splice_mismatches
  90. -i $singlePaired.pParams.min_intron_length
  91. -I $singlePaired.pParams.max_intron_length
  92. -F $singlePaired.pParams.junction_filter
  93. -g $singlePaired.pParams.max_multihits
  94. --min-segment-intron $singlePaired.pParams.min_segment_intron
  95. --max-segment-intron $singlePaired.pParams.max_segment_intron
  96. --initial-read-mismatches=$singlePaired.pParams.initial_read_mismatches
  97. --seg-mismatches=$singlePaired.pParams.seg_mismatches
  98. --seg-length=$singlePaired.pParams.seg_length
  99. --library-type=$singlePaired.pParams.library_type
  100. ## Indel search.
  101. #if $singlePaired.pParams.indel_search.allow_indel_search == "Yes":
  102. ## --allow-indels
  103. --max-insertion-length $singlePaired.pParams.indel_search.max_insertion_length
  104. --max-deletion-length $singlePaired.pParams.indel_search.max_deletion_length
  105. #else:
  106. --no-novel-indels
  107. #end if
  108. ## Supplying junctions parameters.
  109. #if $singlePaired.pParams.own_junctions.use_junctions == "Yes":
  110. #if $singlePaired.pParams.own_junctions.gene_model_ann.use_annotations == "Yes":
  111. -G $singlePaired.pParams.own_junctions.gene_model_ann.gene_annotation_model
  112. #end if
  113. #if $singlePaired.pParams.own_junctions.raw_juncs.use_juncs == "Yes":
  114. -j $singlePaired.pParams.own_junctions.raw_juncs.raw_juncs
  115. #end if
  116. ## TODO: No idea why type cast is necessary, but it is:
  117. #if str($singlePaired.pParams.own_junctions.no_novel_juncs) == "Yes":
  118. --no-novel-juncs
  119. #end if
  120. #end if
  121. #if $singlePaired.pParams.closure_search.use_search == "Yes":
  122. --closure-search
  123. --min-closure-exon $singlePaired.pParams.closure_search.min_closure_exon
  124. --min-closure-intron $singlePaired.pParams.closure_search.min_closure_intron
  125. --max-closure-intron $singlePaired.pParams.closure_search.max_closure_intron
  126. #else:
  127. --no-closure-search
  128. #end if
  129. #if $singlePaired.pParams.coverage_search.use_search == "Yes":
  130. --coverage-search
  131. --min-coverage-intron $singlePaired.pParams.coverage_search.min_coverage_intron
  132. --max-coverage-intron $singlePaired.pParams.coverage_search.max_coverage_intron
  133. #else:
  134. --no-coverage-search
  135. #end if
  136. ## TODO: No idea why the type conversion is necessary, but it seems to be.
  137. #if str ($singlePaired.pParams.microexon_search) == "Yes":
  138. --microexon-search
  139. #end if
  140. #end if
  141. #end if
  142. </command>
  143. <inputs>
  144. <param format="fastqcssanger" name="input1" type="data" label="RNA-Seq FASTQ file" help="Color-space: Must have Sanger-scaled quality values with ASCII offset 33" />
  145. <expand macro="refGenomeSourceConditional">
  146. <options from_data_table="tophat_indexes_color">
  147. <filter type="sort_by" column="2"/>
  148. <validator type="no_options" message="No indexes are available for the selected input dataset"/>
  149. </options>
  150. </expand>
  151. <conditional name="singlePaired">
  152. <param name="sPaired" type="select" label="Is this library mate-paired?">
  153. <option value="single">Single-end</option>
  154. <option value="paired">Paired-end</option>
  155. </param>
  156. <when value="single">
  157. <conditional name="sParams">
  158. <param name="sSettingsType" type="select" label="TopHat settings to use" help="You can use the default settings or set custom values for any of Tophat's parameters.">
  159. <option value="preSet">Default settings</option>
  160. <option value="full">Full parameter list</option>
  161. </param>
  162. <when value="preSet" />
  163. <!-- Full/advanced params. -->
  164. <when value="full">
  165. <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.">
  166. <option value="fr-unstranded">FR Unstranded</option>
  167. <option value="fr-firststrand">FR First Strand</option>
  168. <option value="fr-secondstrand">FR Second Strand</option>
  169. </param>
  170. <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." />
  171. <param name="splice_mismatches" type="integer" value="0" label="Maximum number of mismatches that can appear in the anchor region of spliced alignment" />
  172. <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." />
  173. <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." />
  174. <expand macro="indel_searchConditional" />
  175. <param name="junction_filter" type="float" value="0.15" label="Minimum isoform fraction: filter out junctions supported by too few alignments (number of reads divided by average depth of coverage)" help="0.0 to 1.0 (0 to turn off)" />
  176. <param name="max_multihits" type="integer" value="40" label="Maximum number of alignments to be allowed" />
  177. <param name="min_segment_intron" type="integer" value="50" label="Minimum intron length that may be found during split-segment (default) search" />
  178. <param name="max_segment_intron" type="integer" value="500000" label="Maximum intron length that may be found during split-segment (default) search" />
  179. <param name="initial_read_mismatches" type="integer" min="0" max="3" value="2" label="Number of mismatches allowed in the initial read mapping" />
  180. <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" />
  181. <param name="seg_length" type="integer" value="25" label="Minimum length of read segments" />
  182. <!-- Options for supplying own junctions. -->
  183. <conditional name="own_junctions">
  184. <param name="use_junctions" type="select" label="Use Own Junctions">
  185. <option value="No">No</option>
  186. <option value="Yes">Yes</option>
  187. </param>
  188. <when value="Yes">
  189. <conditional name="gene_model_ann">
  190. <param name="use_annotations" type="select" label="Use Gene Annotation Model">
  191. <option value="No">No</option>
  192. <option value="Yes">Yes</option>
  193. </param>
  194. <when value="No" />
  195. <when value="Yes">
  196. <param format="gtf" name="gene_annotation_model" type="data" label="Gene Model Annotations" help="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."/>
  197. </when>
  198. </conditional>
  199. <expand macro="raw_juncsConditional" />
  200. <expand macro="no_novel_juncsParam" />
  201. </when>
  202. <when value="No" />
  203. </conditional> <!-- /own_junctions -->
  204. <!-- Closure search. -->
  205. <conditional name="closure_search">
  206. <param name="use_search" type="select" label="Use Closure Search">
  207. <option value="No">No</option>
  208. <option value="Yes">Yes</option>
  209. </param>
  210. <when value="Yes">
  211. <param name="min_closure_exon" type="integer" value="50" label="During closure search for paired end reads, exonic hops in the potential splice graph must be at least this long. The default is 50." />
  212. <param name="min_closure_intron" type="integer" value="50" label="Minimum intron length that may be found during closure search" />
  213. <param name="max_closure_intron" type="integer" value="5000" label="Maximum intron length that may be found during closure search" />
  214. </when>
  215. <when value="No" />
  216. </conditional>
  217. <!-- Coverage search. -->
  218. <conditional name="coverage_search">
  219. <param name="use_search" type="select" label="Use Coverage Search">
  220. <option selected="true" value="Yes">Yes</option>
  221. <option value="No">No</option>
  222. </param>
  223. <when value="Yes">
  224. <param name="min_coverage_intron" type="integer" value="50" label="Minimum intron length that may be found during coverage search" />
  225. <param name="max_coverage_intron" type="integer" value="20000" label="Maximum intron length that may be found during coverage search" />
  226. </when>
  227. <when value="No" />
  228. </conditional>
  229. <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.">
  230. <option value="No">No</option>
  231. <option value="Yes">Yes</option>
  232. </param>
  233. </when> <!-- full -->
  234. </conditional> <!-- sParams -->
  235. </when> <!-- single -->
  236. <when value="paired">
  237. <param format="fastqcssanger" name="input2" type="data" label="RNA-Seq FASTQ file" help="Color-space: Must have Sanger-scaled quality values with ASCII offset 33" />
  238. <param name="mate_inner_distance" type="integer" value="20" label="Mean Inner Distance between Mate Pairs" />
  239. <conditional name="pParams">
  240. <param name="pSettingsType" type="select" label="TopHat settings to use" help="Use the Full parameter list to change default settings.">
  241. <option value="preSet">Default settings</option>
  242. <option value="full">Full parameter list</option>
  243. </param>
  244. <when value="preSet" />
  245. <!-- Full/advanced params. -->
  246. <when value="full">
  247. <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.">
  248. <option value="fr-unstranded">FR Unstranded</option>
  249. <option value="fr-firststrand">FR First Strand</option>
  250. <option value="fr-secondstrand">FR Second Strand</option>
  251. </param>
  252. <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."/>
  253. <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." />
  254. <param name="splice_mismatches" type="integer" value="0" label="Maximum number of mismatches that can appear in the anchor region of spliced alignment" />
  255. <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." />
  256. <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." />
  257. <expand macro="indel_searchConditional" />
  258. <param name="junction_filter" type="float" value="0.15" label="Minimum isoform fraction: filter out junctions supported by too few alignments (number of reads divided by average depth of coverage)" help="0.0 to 1.0 (0 to turn off)" />
  259. <param name="max_multihits" type="integer" value="40" label="Maximum number of alignments to be allowed" />
  260. <param name="min_segment_intron" type="integer" value="50" label="Minimum intron length that may be found during split-segment (default) search" />
  261. <param name="max_segment_intron" type="integer" value="500000" label="Maximum intron length that may be found during split-segment (default) search" />
  262. <param name="initial_read_mismatches" type="integer" min="0" max="3" value="2" label="Number of mismatches allowed in the initial read mapping" />
  263. <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" />
  264. <param name="seg_length" type="integer" value="25" label="Minimum length of read segments" />
  265. <!-- Options for supplying own junctions. -->
  266. <conditional name="own_junctions">
  267. <param name="use_junctions" type="select" label="Use Own Junctions">
  268. <option value="No">No</option>
  269. <option value="Yes">Yes</option>
  270. </param>
  271. <when value="Yes">
  272. <conditional name="gene_model_ann">
  273. <param name="use_annotations" type="select" label="Use Gene Annotation Model">
  274. <option value="No">No</option>
  275. <option value="Yes">Yes</option>
  276. </param>
  277. <when value="No" />
  278. <when value="Yes">
  279. <param format="gtf" name="gene_annotation_model" type="data" label="Gene Model Annotations" help="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."/>
  280. </when>
  281. </conditional>
  282. <conditional name="raw_juncs">
  283. <param name="use_juncs" type="select" label="Use Raw Junctions">
  284. <option value="No">No</option>
  285. <option value="Yes">Yes</option>
  286. </param>
  287. <when value="No" />
  288. <when value="Yes">
  289. <param format="interval" name="raw_juncs" type="data" label="Raw Junctions" help="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."/>
  290. </when>
  291. </conditional>
  292. <param name="no_novel_juncs" type="select" label="Only look for supplied junctions">
  293. <option value="No">No</option>
  294. <option value="Yes">Yes</option>
  295. </param>
  296. </when>
  297. <when value="No" />
  298. </conditional> <!-- /own_junctions -->
  299. <!-- Closure search. -->
  300. <conditional name="closure_search">
  301. <param name="use_search" type="select" label="Use Closure Search">
  302. <option value="No">No</option>
  303. <option value="Yes">Yes</option>
  304. </param>
  305. <when value="Yes">
  306. <param name="min_closure_exon" type="integer" value="50" label="During closure search for paired end reads, exonic hops in the potential splice graph must be at least this long. The default is 50." />
  307. <param name="min_closure_intron" type="integer" value="50" label="Minimum intron length that may be found during closure search" />
  308. <param name="max_closure_intron" type="integer" value="5000" label="Maximum intron length that may be found during closure search" />
  309. </when>
  310. <when value="No" />
  311. </conditional>
  312. <!-- Coverage search. -->
  313. <conditional name="coverage_search">
  314. <param name="use_search" type="select" label="Use Coverage Search">
  315. <option selected="true" value="Yes">Yes</option>
  316. <option value="No">No</option>
  317. </param>
  318. <when value="Yes">
  319. <param name="min_coverage_intron" type="integer" value="50" label="Minimum intron length that may be found during coverage search" />
  320. <param name="max_coverage_intron" type="integer" value="20000" label="Maximum intron length that may be found during coverage search" />
  321. </when>
  322. <when value="No" />
  323. </conditional>
  324. <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.">
  325. <option value="No">No</option>
  326. <option value="Yes">Yes</option>
  327. </param>
  328. </when> <!-- full -->
  329. </conditional> <!-- pParams -->
  330. </when> <!-- paired -->
  331. </conditional>
  332. </inputs>
  333. <outputs>
  334. <data format="bed" name="insertions" label="${tool.name} on ${on_string}: insertions" from_work_dir="tophat_out/insertions.bed">
  335. <filter>
  336. (
  337. ( ( 'sParams' in singlePaired ) and ( 'indel_search' in singlePaired['sParams'] ) and
  338. ( singlePaired['sParams']['indel_search']['allow_indel_search'] == 'Yes' ) ) or
  339. ( ( 'pParams' in singlePaired ) and ( 'indel_search' in singlePaired['pParams'] ) and
  340. ( singlePaired['pParams']['indel_search']['allow_indel_search'] == 'Yes' ) )
  341. )
  342. </filter>
  343. <expand macro="dbKeyActions" />
  344. </data>
  345. <data format="bed" name="deletions" label="${tool.name} on ${on_string}: deletions" from_work_dir="tophat_out/deletions.bed">
  346. <expand macro="dbKeyActions" />
  347. </data>
  348. <data format="bed" name="junctions" label="${tool.name} on ${on_string}: splice junctions">
  349. <expand macro="dbKeyActions" />
  350. </data>
  351. <data format="bam" name="accepted_hits" label="${tool.name} on ${on_string}: accepted_hits">
  352. <expand macro="dbKeyActions" />
  353. </data>
  354. </outputs>
  355. <macros>
  356. <import>tophat_macros.xml</import>
  357. <macro name="bedFilter">
  358. <filter>
  359. (
  360. ( ( 'sParams' in singlePaired ) and ( 'indel_search' in singlePaired['sParams'] ) and
  361. ( singlePaired['sParams']['indel_search']['allow_indel_search'] == 'Yes' ) ) or
  362. ( ( 'pParams' in singlePaired ) and ( 'indel_search' in singlePaired['pParams'] ) and
  363. ( singlePaired['pParams']['indel_search']['allow_indel_search'] == 'Yes' ) )
  364. )
  365. </filter>
  366. </macro>
  367. <macro name="dbKeyActions">
  368. <actions>
  369. <conditional name="refGenomeSource.genomeSource">
  370. <when value="indexed">
  371. <action type="metadata" name="dbkey">
  372. <option type="from_data_table" name="tophat_indexes_color" column="1" offset="0">
  373. <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
  374. <filter type="param_value" ref="refGenomeSource.index" column="0"/>
  375. </option>
  376. </action>
  377. </when>
  378. <when value="history">
  379. <action type="metadata" name="dbkey">
  380. <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
  381. </action>
  382. </when>
  383. </conditional>
  384. </actions>
  385. </macro>
  386. </macros>
  387. <tests>
  388. <!-- Test color-space single-end reads with user-supplied reference fasta and preset parameters -->
  389. <test>
  390. <!-- TopHat commands:
  391. cp test-data/tophat_in5.fasta tophat_in5.fa
  392. bowtie-build -C -f tophat_in5.fasta tophat_in5
  393. tophat -p 1 -C tophat_in5 test-data/tophat_in4.fastqcssanger
  394. Rename the files in tmp_dir appropriately
  395. -->
  396. <param name="input1" ftype="fastqcssanger" value="tophat_in4.fastqcssanger" />
  397. <param name="genomeSource" value="history" />
  398. <param name="ownFile" ftype="fasta" value="tophat_in5.fasta"/>
  399. <param name="sPaired" value="single" />
  400. <param name="sSettingsType" value="preSet" />
  401. <output name="junctions" file="tophat_out5j.bed" />
  402. <output name="accepted_hits" file="tophat_out5h.bam" compare="sim_size" />
  403. </test>
  404. <!-- Test color-space single-end reads with pre-built index and full parameters -->
  405. <test>
  406. <!-- Tophat commands:
  407. tophat -p 1 -C -a 8 -m 0 -i 70 -I 500000 -F 0.15 -g 40 +allow-indels +coverage-search +min-coverage-intron 50 +max-coverage-intron 20000 +segment-mismatches 2 +segment-length 25 +closure-search +min-closure-exon 50 +min-closure-intron 50 +max-closure-intron 5000 +microexon-search partialMm9chrX_random_cs test-data/tophat_in4.fastqcssanger
  408. Replace the + with double-dash
  409. Rename the files in tmp_dir appropriately
  410. -->
  411. <param name="input1" ftype="fastqcssanger" value="tophat_in4.fastqcssanger"/>
  412. <param name="genomeSource" value="indexed"/>
  413. <param name="index" value="partialMm9chrX_random_cs" />
  414. <param name="sPaired" value="single"/>
  415. <param name="sSettingsType" value="full"/>
  416. <param name="library_type" value="FR Unstranded"/>
  417. <param name="anchor_length" value="8"/>
  418. <param name="splice_mismatches" value="0"/>
  419. <param name="min_intron_length" value="70"/>
  420. <param name="max_intron_length" value="500000"/>
  421. <param name="junction_filter" value="0.15"/>
  422. <param name="max_multihits" value="40"/>
  423. <param name="min_segment_intron" value="50" />
  424. <param name="max_segment_intron" value="500000" />
  425. <param name="seg_mismatches" value="2"/>
  426. <param name="seg_length" value="25"/>
  427. <param name="allow_indel_search" value="Yes"/>
  428. <param name="max_insertion_length" value="3"/>
  429. <param name="max_deletion_length" value="3"/>
  430. <param name="use_junctions" value="Yes" />
  431. <param name="use_annotations" value="No" />
  432. <param name="use_juncs" value="No" />
  433. <param name="no_novel_juncs" value="No" />
  434. <param name="use_search" value="Yes" />
  435. <param name="min_closure_exon" value="50" />
  436. <param name="min_closure_intron" value="50" />
  437. <param name="max_closure_intron" value="5000" />
  438. <param name="use_search" value="Yes" />
  439. <param name="min_coverage_intron" value="50" />
  440. <param name="max_coverage_intron" value="20000" />
  441. <param name="microexon_search" value="Yes" />
  442. <output name="insertions" file="tophat_out6i.bed" />
  443. <output name="deletions" file="tophat_out6d.bed" />
  444. <output name="junctions" file="tophat_out6j.bed" />
  445. <output name="accepted_hits" file="tophat_out6h.bam" compare="sim_size" />
  446. </test>
  447. <!-- Test color-space paired-end reads with pre-built index and preset parameters -->
  448. <test>
  449. <!-- TopHat commands:
  450. tophat -C -o tmp_dir -r 50 -p 1 partialMm9chrX_random_cs test-data/tophat_in6.fastqcssanger test-data/tophat_in7.fastqcssanger
  451. Rename the files in tmp_dir appropriately
  452. -->
  453. <param name="input1" ftype="fastqcssanger" value="tophat_in6.fastqcssanger" />
  454. <param name="genomeSource" value="indexed" />
  455. <param name="index" value="partialMm9chrX_random_cs" />
  456. <param name="sPaired" value="paired" />
  457. <param name="input2" ftype="fastqcssanger" value="tophat_in7.fastqcssanger"/>
  458. <param name="mate_inner_distance" value="50"/>
  459. <param name="pSettingsType" value="preSet" />
  460. <output name="junctions" file="tophat_out7j.bed" />
  461. <output name="accepted_hits" file="tophat_out7h.bam" compare="sim_size" />
  462. </test>
  463. <!-- Test color-space paired-end reads with user-supplied reference fasta and full parameters -->
  464. <test>
  465. <!-- TopHat commands:
  466. cp test-data/tophat_in5.fasta tophat_in5.fa
  467. bowtie-build -C -f tophat_in5.fa tophat_in5
  468. tophat -C -o tmp_dir -r 20 -p 1 -a 8 -m 0 -i 70 -I 500000 -F 0.15 -g 40 +library-type fr-unstranded +allow-indels +closure-search +min-closure-exon 50 +min-closure-intron 50 +max-closure-intron 5000 +coverage-search +min-coverage-intron 50 +max-coverage-intron 15000 +mate-std-dev 20 +segment-mismatch 2 +segment-length 20 +min-segment-intron 50 +max-segment-intron 500000 tophat_in5 test-data/tophat_in6.fastqcssanger test-data/tophat_in7.fastqcssanger
  469. Replace the + with double-dash
  470. Rename the files in tmp_dir appropriately
  471. -->
  472. <param name="input1" ftype="fastqcssanger" value="tophat_in6.fastqcssanger"/>
  473. <param name="genomeSource" value="history"/>
  474. <param name="ownFile" ftype="fasta" value="tophat_in5.fasta"/>
  475. <param name="sPaired" value="paired"/>
  476. <param name="input2" ftype="fastqcssanger" value="tophat_in7.fastqcssanger"/>
  477. <param name="mate_inner_distance" value="20"/>
  478. <param name="pSettingsType" value="full"/>
  479. <param name="library_type" value="FR Unstranded"/>
  480. <param name="mate_std_dev" value="20"/>
  481. <param name="anchor_length" value="8"/>
  482. <param name="splice_mismatches" value="0"/>
  483. <param name="min_intron_length" value="70"/>
  484. <param name="max_intron_length" value="500000"/>
  485. <param name="junction_filter" value="0.15"/>
  486. <param name="max_multihits" value="40"/>
  487. <param name="min_segment_intron" value="70" />
  488. <param name="max_segment_intron" value="400000" />
  489. <param name="seg_mismatches" value="2"/>
  490. <param name="seg_length" value="20"/>
  491. <param name="allow_indel_search" value="Yes"/>
  492. <param name="max_insertion_length" value="3"/>
  493. <param name="max_deletion_length" value="3"/>
  494. <param name="use_junctions" value="No" />
  495. <param name="use_search" value="Yes" />
  496. <param name="min_closure_exon" value="50" />
  497. <param name="min_closure_intron" value="50" />
  498. <param name="max_closure_intron" value="5000" />
  499. <param name="use_search" value="Yes" />
  500. <param name="min_coverage_intron" value="50" />
  501. <param name="max_coverage_intron" value="20000" />
  502. <param name="microexon_search" value="No" />
  503. <output name="insertions" file="tophat_out8i.bed" />
  504. <output name="deletions" file="tophat_out8d.bed" />
  505. <output name="junctions" file="tophat_out8j.bed" />
  506. <output name="accepted_hits" file="tophat_out8h.bam" compare="sim_size" />
  507. </test>
  508. </tests>
  509. <help>
  510. **Tophat Overview**
  511. 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, and then analyzes the mapping results to identify splice junctions between exons. Please cite: Trapnell, C., Pachter, L. and Salzberg, S.L. TopHat: discovering splice junctions with RNA-Seq. Bioinformatics 25, 1105-1111 (2009).
  512. .. _Tophat: http://tophat.cbcb.umd.edu/
  513. ------
  514. **Know what you are doing**
  515. .. class:: warningmark
  516. 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.
  517. .. __: http://tophat.cbcb.umd.edu/manual.html
  518. ------
  519. **Input formats**
  520. Tophat accepts files in Sanger FASTQ format. Use the FASTQ Groomer to prepare your files.
  521. ------
  522. **Outputs**
  523. Tophat produces two main output files:
  524. - 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.
  525. - accepted_hits -- A list of read alignments in BAM_ format.
  526. .. _BED: http://genome.ucsc.edu/FAQ/FAQformat.html#format1
  527. .. _BAM: http://samtools.sourceforge.net/
  528. Two other possible outputs, depending on the options you choose, are insertions and deletions, both of which are in BED format.
  529. -------
  530. **Tophat settings**
  531. All of the options have a default value. You can change any of them. Some of the options in Tophat have been implemented here.
  532. ------
  533. **Tophat parameter list**
  534. This is a list of implemented Tophat options::
  535. This is a list of implemented Tophat options::
  536. -r This is the expected (mean) inner distance between mate pairs. For, example, for paired end runs with fragments
  537. selected at 300bp, where each end is 50bp, you should set -r to be 200. There is no default, and this parameter
  538. is required for paired end runs.
  539. --mate-std-dev INT The standard deviation for the distribution on inner distances between mate pairs. The default is 20bp.
  540. -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
  541. 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
  542. read with this many bases on each side. This must be at least 3 and the default is 8.
  543. -m/--splice-mismatches INT The maximum number of mismatches that may appear in the "anchor" region of a spliced alignment. The default is 0.
  544. -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.
  545. -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.
  546. -F/--min-isoform-fraction 0.0-1.0 TopHat filters out junctions supported by too few alignments. Suppose a junction spanning two exons, is supported by S reads. Let the average depth of coverage of
  547. exon A be D, and assume that it is higher than B. If S / D is less than the minimum isoform fraction, the junction is not reported. A value of zero disables the
  548. filter. The default is 0.15.
  549. -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
  550. alignments. The default is 40.
  551. -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.
  552. -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.
  553. -no-novel-juncs Only look for junctions indicated in the supplied GFF file. (ignored without -G)
  554. --no-closure-search Disables the mate pair closure-based search for junctions. Currently, has no effect - closure search is off by default.
  555. --closure-search Enables the mate pair closure-based search for junctions. Closure-based search should only be used when the expected inner distance between mates is small (about or less than 50bp)
  556. --no-coverage-search Disables the coverage based search for junctions.
  557. --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.
  558. --microexon-search With this option, the pipeline will attempt to find alignments incident to microexons. Works only for reads 50bp or longer.
  559. --butterfly-search TopHat will use a slower but potentially more sensitive algorithm to find junctions in addition to its standard search. Consider using this if you expect that your experiment produced a lot of reads from pre-mRNA, that fall within the introns of your transcripts.
  560. --segment-mismatches Read segments are mapped independently, allowing up to this many mismatches in each segment alignment. The default is 2.
  561. --segment-length Each read is cut up into segments, each at least this long. These segments are mapped independently. The default is 25.
  562. --min-closure-exon During closure search for paired end reads, exonic hops in the potential splice graph must be at least this long. The default is 50.
  563. --min-closure-intron The minimum intron length that may be found during closure search. The default is 50.
  564. --max-closure-intron The maximum intron length that may be found during closure search. The default is 5000.
  565. --min-coverage-intron The minimum intron length that may be found during coverage search. The default is 50.
  566. --max-coverage-intron The maximum intron length that may be found during coverage search. The default is 20000.
  567. --min-segment-intron The minimum intron length that may be found during split-segment search. The default is 50.
  568. --max-segment-intron The maximum intron length that may be found during split-segment search. The default is 500000.
  569. </help>
  570. </tool>