/tools/sr_mapping/bowtie_color_wrapper.xml

https://bitbucket.org/cistrome/cistrome-harvard/ · XML · 714 lines · 646 code · 34 blank · 34 comment · 0 complexity · a6683c6b4d0b4568e6d7d8c8db89d47d MD5 · raw file

  1. <tool id="bowtie_color_wrapper" name="Map with Bowtie for SOLiD" version="1.1.2">
  2. <requirements><requirement type='package'>bowtie</requirement></requirements>
  3. <description></description>
  4. <command interpreter="python">
  5. bowtie_wrapper.py
  6. ## Hackish setting of number of threads
  7. --threads="4"
  8. ## Outputs
  9. --output=$output
  10. #if str( $singlePaired.sPaired ) == "single"
  11. #if $output_unmapped_reads_l
  12. --output_unmapped_reads=$output_unmapped_reads_l
  13. #end if
  14. #if $output_suppressed_reads_l
  15. --output_suppressed_reads=$output_suppressed_reads_l
  16. #end if
  17. #else
  18. #if $output_unmapped_reads_l and $output_unmapped_reads_r
  19. --output_unmapped_reads_l=$output_unmapped_reads_l
  20. --output_unmapped_reads_r=$output_unmapped_reads_r
  21. #end if
  22. #if $output_suppressed_reads_l and $output_suppressed_reads_l
  23. --output_suppressed_reads_l=$output_suppressed_reads_l
  24. --output_suppressed_reads_r=$output_suppressed_reads_r
  25. #end if
  26. #end if
  27. ## Inputs
  28. --dataType="solid"
  29. --suppressHeader=$suppressHeader
  30. --genomeSource=$refGenomeSource.genomeSource
  31. #if $refGenomeSource.genomeSource == "history":
  32. ##index already exists
  33. #if $refGenomeSource.ownFile.extension.startswith( 'bowtie_' ):
  34. ##user previously built
  35. --ref="${refGenomeSource.ownFile.extra_files_path}/${refGenomeSource.ownFile.metadata.base_name}"
  36. --do_not_build_index
  37. #else:
  38. ##build index on the fly
  39. --ref=$refGenomeSource.ownFile
  40. --indexSettings=$refGenomeSource.indexParams.indexSettings
  41. #if $refGenomeSource.indexParams.indexSettings == "indexFull":
  42. --iautoB=$refGenomeSource.indexParams.autoBehavior.autoB
  43. #if $refGenomeSource.indexParams.autoBehavior.autoB == "set":
  44. --ipacked=$refGenomeSource.indexParams.autoBehavior.packed
  45. --ibmax=$refGenomeSource.indexParams.autoBehavior.bmax
  46. --ibmaxdivn=$refGenomeSource.indexParams.autoBehavior.bmaxdivn
  47. --idcv=$refGenomeSource.indexParams.autoBehavior.dcv
  48. #end if
  49. --inodc=$refGenomeSource.indexParams.nodc
  50. --inoref=$refGenomeSource.indexParams.noref
  51. --ioffrate=$refGenomeSource.indexParams.offrate
  52. --iftab=$refGenomeSource.indexParams.ftab
  53. --intoa=$refGenomeSource.indexParams.ntoa
  54. --iendian=$refGenomeSource.indexParams.endian
  55. --iseed=$refGenomeSource.indexParams.seed
  56. --icutoff=$refGenomeSource.indexParams.cutoff
  57. #end if
  58. #end if
  59. #else
  60. ##use pre-built index
  61. --ref="${ filter( lambda x: str( x[0] ) == str( $refGenomeSource.index ), $__app__.tool_data_tables[ 'bowtie_indexes_color' ].get_fields() )[0][-1] }"
  62. #end if
  63. --paired=$singlePaired.sPaired
  64. #if $singlePaired.sPaired == "single":
  65. --input1=$singlePaired.sInput1
  66. --params=$singlePaired.sParams.sSettingsType
  67. #if $singlePaired.sParams.sSettingsType == "full":
  68. --skip=$singlePaired.sParams.sSkip
  69. --alignLimit=$singlePaired.sParams.sAlignLimit
  70. --trimH=$singlePaired.sParams.sTrimH
  71. --trimL=$singlePaired.sParams.sTrimL
  72. --mismatchSeed=$singlePaired.sParams.sMismatchSeed
  73. --mismatchQual=$singlePaired.sParams.sMismatchQual
  74. --seedLen=$singlePaired.sParams.sSeedLen
  75. --rounding=$singlePaired.sParams.sRounding
  76. --maqSoapAlign=$singlePaired.sParams.sMaqSoapAlign
  77. --tryHard=$singlePaired.sParams.sTryHard
  78. --valAlign=$singlePaired.sParams.sValAlign
  79. --allValAligns=$singlePaired.sParams.sAllValAligns
  80. --suppressAlign=$singlePaired.sParams.sSuppressAlign
  81. --best=$singlePaired.sParams.sBestOption.sBest
  82. #if $singlePaired.sParams.sBestOption.sBest == "doBest":
  83. --maxBacktracks=$singlePaired.sParams.sBestOption.sdMaxBacktracks
  84. --strata=$singlePaired.sParams.sBestOption.sdStrata
  85. #else:
  86. --maxBacktracks=$singlePaired.sParams.sBestOption.snMaxBacktracks
  87. #end if
  88. --offrate=$singlePaired.sParams.sOffrate
  89. --seed=$singlePaired.sParams.sSeed
  90. --snpphred=$singlePaired.sParams.sSnpphred
  91. --snpfrac=$singlePaired.sParams.sSnpfrac
  92. --keepends=$singlePaired.sParams.sKeepends
  93. #end if
  94. #else:
  95. --input1=$singlePaired.pInput1
  96. --input2=$singlePaired.pInput2
  97. --maxInsert=$singlePaired.pMaxInsert
  98. --mateOrient=$singlePaired.pMateOrient
  99. --params=$singlePaired.pParams.pSettingsType
  100. #if $singlePaired.pParams.pSettingsType == "full":
  101. --skip=$singlePaired.pParams.pSkip
  102. --alignLimit=$singlePaired.pParams.pAlignLimit
  103. --trimH=$singlePaired.pParams.pTrimH
  104. --trimL=$singlePaired.pParams.pTrimL
  105. --mismatchSeed=$singlePaired.pParams.pMismatchSeed
  106. --mismatchQual=$singlePaired.pParams.pMismatchQual
  107. --seedLen=$singlePaired.pParams.pSeedLen
  108. --rounding=$singlePaired.pParams.pRounding
  109. --maqSoapAlign=$singlePaired.pParams.pMaqSoapAlign
  110. --minInsert=$singlePaired.pParams.pMinInsert
  111. --maxAlignAttempt=$singlePaired.pParams.pMaxAlignAttempt
  112. --forwardAlign=$singlePaired.pParams.pForwardAlign
  113. --reverseAlign=$singlePaired.pParams.pReverseAlign
  114. --tryHard=$singlePaired.pParams.pTryHard
  115. --valAlign=$singlePaired.pParams.pValAlign
  116. --allValAligns=$singlePaired.pParams.pAllValAligns
  117. --suppressAlign=$singlePaired.pParams.pSuppressAlign
  118. --best=$singlePaired.pParams.pBestOption.pBest
  119. #if $singlePaired.pParams.pBestOption.pBest == "doBest":
  120. --maxBacktracks=$singlePaired.pParams.pBestOption.pdMaxBacktracks
  121. --strata=$singlePaired.pParams.pBestOption.pdStrata
  122. #else:
  123. --maxBacktracks=$singlePaired.pParams.pBestOption.pnMaxBacktracks
  124. #end if
  125. --offrate=$singlePaired.pParams.pOffrate
  126. --seed=$singlePaired.pParams.pSeed
  127. --snpphred=$singlePaired.pParams.pSnpphred
  128. --snpfrac=$singlePaired.pParams.pSnpfrac
  129. --keepends=$singlePaired.pParams.pKeepends
  130. #end if
  131. #end if
  132. </command>
  133. <inputs>
  134. <conditional name="refGenomeSource">
  135. <param name="genomeSource" type="select" label="Will you select a reference genome from your history or use a built-in index?" help="Built-ins were indexed using default options">
  136. <option value="indexed">Use a built-in index</option>
  137. <option value="history">Use one from the history</option>
  138. </param>
  139. <when value="indexed">
  140. <param name="index" type="select" label="Select the reference genome" help="if your genome of interest is not listed - contact Galaxy team">
  141. <options from_data_table="bowtie_indexes_color">
  142. <filter type="sort_by" column="2" />
  143. <validator type="no_options" message="No indexes are available" />
  144. </options>
  145. </param>
  146. </when>
  147. <when value="history">
  148. <param name="ownFile" type="data" format="bowtie_color_index,fasta" metadata_name="dbkey" label="Select the reference genome" />
  149. <conditional name="indexParams">
  150. <param name="indexSettings" type="select" label="Choose whether to use Default options for building indices or to Set your own" help="These settings are ignored when using a prebuilt index">
  151. <option value="indexPreSet">Default</option>
  152. <option value="indexFull">Set your own</option>
  153. </param>
  154. <when value="indexPreSet" />
  155. <when value="indexFull">
  156. <conditional name="autoBehavior">
  157. <param name="autoB" type="select" label="Choose to use automatic or specified behavior for some parameters (-a)" help="Allows you to set --packed, --bmax, --bmaxdivn, and --dcv">
  158. <option value="auto">Automatic behavior</option>
  159. <option value="set">Set values (sets --noauto and allows others to be set)</option>
  160. </param>
  161. <when value="auto" />
  162. <when value="set">
  163. <param name="packed" type="select" label="Whether or not to use a packed representation for DNA strings (--packed)">
  164. <option value="unpacked">Use regular representation</option>
  165. <option value="packed">Use packed representation</option>
  166. </param>
  167. <param name="bmax" type="integer" value="-1" label="Maximum number of suffixes allowed in a block (--bmax)" help="-1 for not specified. Must be at least 1" />
  168. <param name="bmaxdivn" type="integer" value="4" label="Maximum number of suffixes allowed in a block as a fraction of the length of the reference (--bmaxdivn)" />
  169. <param name="dcv" type="integer" value="1024" label="The period for the difference-cover sample (--dcv)" />
  170. </when>
  171. </conditional>
  172. <param name="nodc" type="select" label="Whether or not to disable the use of the difference-cover sample (--nodc)" help="Suffix sorting becomes quadratic-time in the worst case (with a very repetitive reference)">
  173. <option value="dc">Use difference-cover sample</option>
  174. <option value="nodc">Disable difference-cover sample</option>
  175. </param>
  176. <param name="noref" type="select" label="Whether or not to build the part of the reference index used only in paired-end alignment (-r)">
  177. <option value="ref">Build all index files</option>
  178. <option value="noref">Do not build paired-end alignment index files</option>
  179. </param>
  180. <param name="offrate" type="integer" value="5" label="How many rows get marked during annotation of some or all of the Burrows-Wheeler rows (-o)" />
  181. <param name="ftab" type="integer" value="10" label="The size of the lookup table used to calculate an initial Burrows-Wheeler range with respect to the first n characters of the query (-t)" help="ftab is 4^(n+1) bytes" />
  182. <param name="ntoa" type="select" label="Whether or not to convert Ns in the reference sequence to As (--ntoa)">
  183. <option value="no">Do not convert Ns</option>
  184. <option value="yes">Convert Ns to As</option>
  185. </param>
  186. <param name="endian" type="select" label="Endianness to use when serializing integers to the index file (--big/--little)" help="Little is most appropriate for Intel- and AMD-based architecture">
  187. <option value="little">Little</option>
  188. <option value="big">Big</option>
  189. </param>
  190. <param name="seed" type="integer" value="-1" label="Seed for the pseudorandom number generator (--seed)" help="Use -1 to use default" />
  191. <param name="cutoff" type="integer" value="-1" label="Number of first bases of the reference sequence to index (--cutoff)" help="Use -1 to use default" />
  192. </when> <!-- indexFull -->
  193. </conditional> <!-- indexParams -->
  194. </when> <!-- history -->
  195. </conditional> <!-- refGenomeSource -->
  196. <conditional name="singlePaired">
  197. <param name="sPaired" type="select" label="Is this library mate-paired?">
  198. <option value="single">Single-end</option>
  199. <option value="paired">Paired-end</option>
  200. </param>
  201. <when value="single">
  202. <param name="sInput1" type="data" format="fastqcssanger" label="FASTQ file" help="Must have Sanger-scaled quality values with ASCII offset 33"/>
  203. <conditional name="sParams">
  204. <param name="sSettingsType" type="select" label="Bowtie settings to use" help="For most mapping needs use Commonly used settings. If you want full control use Full parameter list">
  205. <option value="preSet">Commonly used</option>
  206. <option value="full">Full parameter list</option>
  207. </param>
  208. <when value="preSet" />
  209. <when value="full">
  210. <param name="sSkip" type="integer" value="0" label="Skip the first n reads (-s)" />
  211. <param name="sAlignLimit" type="integer" value="-1" label="Only align the first n reads (-u)" help="-1 for off" />
  212. <param name="sTrimH" type="integer" value="0" label="Trim n bases from high-quality (left) end of each read before alignment (-5)" />
  213. <param name="sTrimL" type="integer" value="0" label="Trim n bases from low-quality (right) end of each read before alignment (-3)" />
  214. <param name="sMismatchSeed" type="integer" value="2" label="Maximum number of mismatches permitted in the seed (-n)" help="May be 0, 1, 2, or 3" />
  215. <param name="sMismatchQual" type="integer" value="70" label="Maximum permitted total of quality values at mismatched read positions (-e)" />
  216. <param name="sSeedLen" type="integer" value="28" label="Seed length (-l)" help="Minimum value is 5" />
  217. <param name="sRounding" type="select" label="Whether or not to round to the nearest 10 and saturating at 30 (--nomaqround)">
  218. <option value="round">Round to nearest 10</option>
  219. <option value="noRound">Do not round to nearest 10</option>
  220. </param>
  221. <param name="sMaqSoapAlign" type="integer" value="-1" label="Number of mismatches for SOAP-like alignment policy (-v)" help="-1 for default MAQ-like alignment policy" />
  222. <param name="sTryHard" type="select" label="Whether or not to try as hard as possible to find valid alignments when they exist (-y)" help="Tryhard mode is much slower than regular mode">
  223. <option value="noTryHard">Do not try hard</option>
  224. <option value="doTryHard">Try hard</option>
  225. </param>
  226. <param name="sValAlign" type="integer" value="1" label="Report up to n valid alignments per read (-k)" />
  227. <param name="sAllValAligns" type="select" label="Whether or not to report all valid alignments per read (-a)">
  228. <option value="noAllValAligns">Do not report all valid alignments</option>
  229. <option value="doAllValAligns">Report all valid alignments</option>
  230. </param>
  231. <param name="sSuppressAlign" type="integer" value="-1" label="Suppress all alignments for a read if more than n reportable alignments exist (-m)" help="-1 for no limit" />
  232. <param name="sMaxFile" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Write all reads with a number of valid alignments exceeding the limit set with the -m option to a file (--max)" />
  233. <param name="sUnmappedFile" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Write all reads that could not be aligned to a file (--un)" />
  234. <conditional name="sBestOption">
  235. <param name="sBest" type="select" label="Whether or not to make Bowtie guarantee that reported singleton alignments are 'best' in terms of stratum and in terms of the quality values at the mismatched positions (--best)" help="Removes all strand bias. Only affects which alignments are reported by Bowtie. Runs slower with best option">
  236. <option value="noBest">Do not use best</option>
  237. <option value="doBest">Use best</option>
  238. </param>
  239. <when value="noBest">
  240. <param name="snMaxBacktracks" type="integer" value="125" label="Maximum number of backtracks permitted when aligning a read (--maxbts)" />
  241. </when>
  242. <when value="doBest">
  243. <param name="sdMaxBacktracks" type="integer" value="800" label="Maximum number of backtracks permitted when aligning a read (--maxbts)" />
  244. <param name="sdStrata" type="select" label="Whether or not to report only those alignments that fall in the best stratum if many valid alignments exist and are reportable (--strata)">
  245. <option value="noStrata">Do not use strata option</option>
  246. <option value="doStrata">Use strata option</option>
  247. </param>
  248. </when>
  249. </conditional> <!-- sBestOption -->
  250. <param name="sOffrate" type="integer" value="-1" label="Override the offrate of the index to n (-o)" help="-1 for default" />
  251. <param name="sSeed" type="integer" value="-1" label="Seed for pseudo-random number generator (--seed)" help="-1 for default" />
  252. <param name="sSnpphred" type="integer" value="-1" label="SNP penalty (ratio of SNPs per base in the subject genome) (--snpphred)" help="Enter this OR Ratio of SNPs per base" />
  253. <param name="sSnpfrac" type="float" value="0.001" label="Ratio of SNPs per base (estimated ratio for colorspace alignments) (--snpfrac)" help="Enter this OR SNP penalty" />
  254. <param name="sKeepends" type="select" label="Keep the extreme-ends nucleotides and qualities rather than trimming them (--col-keepends)">
  255. <option value="doKeepends">Keep ends</option>
  256. <option value="noKeepends">Trim ends</option>
  257. </param>
  258. </when> <!-- full -->
  259. </conditional> <!-- sParams -->
  260. </when> <!-- single -->
  261. <when value="paired">
  262. <param name="pInput1" type="data" format="fastqcssanger" label="FASTQ file" help="Must have Sanger-scaled quality values with ASCII offset 33"/>
  263. <param name="pInput2" type="data" format="fastqcssanger" label="Reverse FASTQ file" help="Must have Sanger-scaled quality values with ASCII offset 33"/>
  264. <param name="pMaxInsert" type="integer" value="1000" label="Maximum insert size for valid paired-end alignments (-X)" />
  265. <param name="pMateOrient" type="select" label="The upstream/downstream mate orientation for valid paired-end alignment against the forward reference strand (--fr/--rf/--ff)">
  266. <option value="ff">FF (for SOLiD)</option>
  267. <option value="fr">FR (for Illumina)</option>
  268. <option value="rf">RF</option>
  269. </param>
  270. <conditional name="pParams">
  271. <param name="pSettingsType" type="select" label="Bowtie settings to use" help="For most mapping needs use Commonly used settings. If you want full control use Full parameter list">
  272. <option value="preSet">Commonly used</option>
  273. <option value="full">Full parameter list</option>
  274. </param>
  275. <when value="preSet" />
  276. <when value="full">
  277. <param name="pSkip" type="integer" value="0" label="Skip the first n pairs (-s)" />
  278. <param name="pAlignLimit" type="integer" value="-1" label="Only align the first n pairs (-u)" help="-1 for off" />
  279. <param name="pTrimH" type="integer" value="0" label="Trim n bases from high-quality (left) end of each read before alignment (-5)" />
  280. <param name="pTrimL" type="integer" value="0" label="Trim n bases from low-quality (right) end of each read before alignment (-3)" />
  281. <param name="pMismatchSeed" type="integer" value="2" label="Maximum number of mismatches permitted in the seed (-n)" help="May be 0, 1, 2, or 3" />
  282. <param name="pMismatchQual" type="integer" value="70" label="Maximum permitted total of quality values at mismatched read positions (-e)" />
  283. <param name="pSeedLen" type="integer" value="28" label="Seed length (-l)" help="Minimum value is 5" />
  284. <param name="pRounding" type="select" label="Whether or not to round to the nearest 10 and saturating at 30 (--nomaqround)">
  285. <option value="round">Round to nearest 10</option>
  286. <option value="noRound">Do not round to nearest 10</option>
  287. </param>
  288. <param name="pMaqSoapAlign" type="integer" value="-1" label="Number of mismatches for SOAP-like alignment policy (-v)" help="-1 for default MAQ-like alignment policy" />
  289. <param name="pMinInsert" type="integer" value="0" label="Minimum insert size for valid paired-end alignments (-I)" />
  290. <param name="pMaxAlignAttempt" type="integer" value="100" label="Maximum number of attempts Bowtie will make to match an alignment for one mate with an alignment for the opposite mate (--pairtries)" />
  291. <param name="pForwardAlign" type="select" label="Choose whether or not to attempt to align the forward reference strand (--nofw)">
  292. <option value="forward">Align against the forward reference strand</option>
  293. <option value="noForward">Do not align against the forward reference strand</option>
  294. </param>
  295. <param name="pReverseAlign" type="select" label="Choose whether or not to align against the reverse-complement reference strand (--norc)">
  296. <option value="reverse">Align against the reverse-complement reference strand</option>
  297. <option value="noReverse">Do not align against the reverse-complement reference strand</option>
  298. </param>
  299. <param name="pTryHard" type="select" label="Whether or not to try as hard as possible to find valid alignments when they exist (-y)" help="Tryhard mode is much slower than regular mode">
  300. <option value="noTryHard">Do not try hard</option>
  301. <option value="doTryHard">Try hard</option>
  302. </param>
  303. <param name="pValAlign" type="integer" value="1" label="Report up to n valid arguments per pair (-k)" />
  304. <param name="pAllValAligns" type="select" label="Whether or not to report all valid alignments per pair (-a)">
  305. <option value="noAllValAligns">Do not report all valid alignments</option>
  306. <option value="doAllValAligns">Report all valid alignments</option>
  307. </param>
  308. <param name="pSuppressAlign" type="integer" value="-1" label="Suppress all alignments for a pair if more than n reportable alignments exist (-m)" help="-1 for no limit" />
  309. <param name="pMaxFile" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Write all reads with a number of valid alignments exceeding the limit set with the -m option to a file (--max)" />
  310. <param name="pUnmappedFile" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Write all reads that could not be aligned to a file (--un)" />
  311. <conditional name="pBestOption">
  312. <param name="pBest" type="select" label="Whether or not to make Bowtie guarantee that reported singleton alignments are 'best' in terms of stratum and in terms of the quality values at the mismatched positions (--best)" help="Removes all strand bias. Only affects which alignments are reported by Bowtie. Runs slower with best option">
  313. <option value="noBest">Do not use best</option>
  314. <option value="doBest">Use best</option>
  315. </param>
  316. <when value="noBest">
  317. <param name="pnMaxBacktracks" type="integer" value="125" label="Maximum number of backtracks permitted when aligning a read (--maxbts)" />
  318. </when>
  319. <when value="doBest">
  320. <param name="pdMaxBacktracks" type="integer" value="800" label="Maximum number of backtracks permitted when aligning a read (--maxbts)" />
  321. <param name="pdStrata" type="select" label="Whether or not to report only those alignments that fall in the best stratum if many valid alignments exist and are reportable (--strata)">
  322. <option value="noStrata">Do not use strata option</option>
  323. <option value="doStrata">Use strata option</option>
  324. </param>
  325. </when>
  326. </conditional> <!-- pBestOption -->
  327. <param name="pOffrate" type="integer" value="-1" label="Override the offrate of the index to n (-o)" help="-1 for default" />
  328. <param name="pSeed" type="integer" value="-1" label="Seed for pseudo-random number generator (--seed)" help="-1 for default" />
  329. <param name="pSnpphred" type="integer" value="-1" label="SNP penalty (ratio of SNPs per base in the subject genome) (--snpphred)" help="Enter this OR Ratio of SNPs per base" />
  330. <param name="pSnpfrac" type="float" value="0.001" label="Ratio of SNPs per base (estimated ratio for colorspace alignments) (--snpfrac)" help="Enter this OR SNP penalty" />
  331. <param name="pKeepends" type="select" label="Keep the extreme-ends nucleotides and qualities rather than trimming them (--col-keepends)">
  332. <option value="doKeepends">Keep ends</option>
  333. <option value="noKeepends">Trim ends</option>
  334. </param>
  335. </when> <!-- full -->
  336. </conditional> <!-- pParams -->
  337. </when> <!-- paired -->
  338. </conditional> <!-- singlePaired -->
  339. <param name="suppressHeader" type="boolean" truevalue="true" falsevalue="false" checked="False" label="Suppress the header in the output SAM file" help="Bowtie produces SAM with several lines of header information by default" />
  340. </inputs>
  341. <outputs>
  342. <data format="sam" name="output" label="${tool.name} on ${on_string}: mapped reads">
  343. <actions>
  344. <conditional name="refGenomeSource.genomeSource">
  345. <when value="indexed">
  346. <action type="metadata" name="dbkey">
  347. <option type="from_data_table" name="bowtie_indexes_color" column="1" offset="0">
  348. <filter type="param_value" column="0" value="#" filter_by="startswith" keep="False"/>
  349. <filter type="param_value" ref="refGenomeSource.index" column="0"/>
  350. </option>
  351. </action>
  352. </when>
  353. <when value="history">
  354. <action type="metadata" name="dbkey">
  355. <option type="from_param" name="refGenomeSource.ownFile" param_attribute="dbkey" />
  356. </action>
  357. </when>
  358. </conditional>
  359. </actions>
  360. </data>
  361. <data format="fastqcssanger" name="output_suppressed_reads_l" label="${tool.name} on ${on_string}: suppressed reads (L)">
  362. <filter>((
  363. singlePaired['sPaired'] == "single" and
  364. singlePaired['sParams']['sSettingsType'] == "full" and
  365. singlePaired['sParams']['sMaxFile'] is True
  366. ) or (
  367. singlePaired['sPaired'] == "paired" and
  368. singlePaired['pParams']['pSettingsType'] == "full" and
  369. singlePaired['pParams']['pMaxFile'] is True
  370. ))
  371. </filter>
  372. </data>
  373. <data format="fastqcssanger" name="output_suppressed_reads_r" label="${tool.name} on ${on_string}: suppressed reads (R)">
  374. <filter>singlePaired['sPaired'] == "paired"</filter>
  375. <filter>singlePaired['pParams']['pSettingsType'] == "full"</filter>
  376. <filter>singlePaired['pParams']['pMaxFile'] is True</filter>
  377. </data>
  378. <data format="fastqcssanger" name="output_unmapped_reads_l" label="${tool.name} on ${on_string}: unmapped reads (L)">
  379. <filter>
  380. ((
  381. singlePaired['sPaired'] == "single" and
  382. singlePaired['sParams']['sSettingsType'] == "full" and
  383. singlePaired['sParams']['sUnmappedFile'] is True
  384. ) or (
  385. singlePaired['sPaired'] == "paired" and
  386. singlePaired['pParams']['pSettingsType'] == "full" and
  387. singlePaired['pParams']['pUnmappedFile'] is True
  388. ))
  389. </filter>
  390. </data>
  391. <data format="fastqcssanger" name="output_unmapped_reads_r" label="${tool.name} on ${on_string}: unmapped reads (R)">
  392. <filter>singlePaired['sPaired'] == "paired"</filter>
  393. <filter>singlePaired['pParams']['pSettingsType'] == "full"</filter>
  394. <filter>singlePaired['pParams']['pUnmappedFile'] is True</filter>
  395. </data>
  396. </outputs>
  397. <tests>
  398. <test>
  399. <!--
  400. Bowtie command:
  401. bowtie -q -p 4 -S +sam-nohead -C chrM_color test-data/bowtie_in1.fastqcssanger > bowtie_out1_u.sam
  402. sort bowtie_out1_u.sam > bowtie_out1.sam
  403. -p is the number of threads, which is hardcoded above. You need to replace the + with 2 dashes.
  404. chrM_color needs to be the base location/name of the index files.
  405. -->
  406. <param name="genomeSource" value="indexed" />
  407. <param name="index" value="equCab2chrM" />
  408. <param name="sPaired" value="single" />
  409. <param name="sInput1" ftype="fastqcssanger" value="bowtie_in1.fastqcssanger" />
  410. <param name="sSettingsType" value="preSet" />
  411. <param name="suppressHeader" value="true" />
  412. <output name="output" ftype="sam" file="bowtie_out1.sam" sort="True" />
  413. </test>
  414. <test>
  415. <!--
  416. Bowtie command:
  417. bowtie-build -C -f test-data/chr_m.fasta chrM_color
  418. bowtie -q -X 1000 +ff -p 4 -S +sam-nohead -C -n 2 -e 70 -l 28 -X 250 +pairtries 100 +maxbts 125 -k 1 +snpfrac 0.001 +col-keepends +un bowtie_out3_u.fastq chrM_color -1 test-data/bowtie_in3.fastqcssanger -2 test-data/bowtie_in4.fastqcssanger > bowtie_out2_u.sam
  419. sort bowtie_out2_u.sam > bowtie_out2.sam
  420. sort bowtie_out3_u_1.sam > bowtie_out3_1.sam
  421. sort bowtie_out3_u_2.sam > bowtie_out3_2.sam
  422. Then also need to modify bowtie_out3_1.sam and bowtie_out3_2.sam so that all @ lines come before sequence lines.
  423. The two unmapped output files will be named bowtie_out4_1.fastq and bowtie_out4_2.fastq
  424. -p is the number of threads, hardcoded above. You need to replace the + with 2 dashes.
  425. chrM_base is the index files' location/base name.
  426. -->
  427. <param name="genomeSource" value="history" />
  428. <param name="ownFile" value="chr_m.fasta" />
  429. <param name="indexSettings" value="indexPreSet" />
  430. <param name="sPaired" value="paired" />
  431. <param name="pInput1" ftype="fastqcssanger" value="bowtie_in3.fastqcssanger" />
  432. <param name="pInput2" ftype="fastqcssanger" value="bowtie_in4.fastqcssanger" />
  433. <param name="pMaxInsert" value="1000" />
  434. <param name="pMateOrient" value="ff" />
  435. <param name="pSettingsType" value="full" />
  436. <param name="pSkip" value="0" />
  437. <param name="pAlignLimit" value="-1" />
  438. <param name="pTrimH" value="0" />
  439. <param name="pTrimL" value="0" />
  440. <param name="pMismatchSeed" value="2" />
  441. <param name="pMismatchQual" value="70" />
  442. <param name="pSeedLen" value="28" />
  443. <param name="pRounding" value="round" />
  444. <param name="pMaqSoapAlign" value="-1" />
  445. <param name="pMinInsert" value="0" />
  446. <param name="pMaxAlignAttempt" value="100" />
  447. <param name="pForwardAlign" value="forward" />
  448. <param name="pReverseAlign" value="reverse" />
  449. <param name="pTryHard" value="noTryHard" />
  450. <param name="pValAlign" value="1" />
  451. <param name="pAllValAligns" value="noAllValAligns" />
  452. <param name="pSuppressAlign" value="-1" />
  453. <param name="pUnmappedFile" value="true" />
  454. <param name="pMaxFile" value="false" />
  455. <param name="pBest" value="noBest" />
  456. <param name="pnMaxBacktracks" value="125" />
  457. <param name="pOffrate" value="-1" />
  458. <param name="pSeed" value="-1" />
  459. <param name="pSnpphred" value="-1" />
  460. <param name="pSnpfrac" value="0.001" />
  461. <param name="pKeepends" value="doKeepends" />
  462. <param name="suppressHeader" value="true" />
  463. <output name="output" ftype="sam" file="bowtie_out2.sam" sort="True" />
  464. <output name="output_unmapped_reads_l" ftype="fastqcssanger" file="bowtie_out3_1.fastq" sort="True" />
  465. <output name="output_unmapped_reads_r" ftype="fastqcssanger" file="bowtie_out3_2.fastq" sort="True" />
  466. </test>
  467. <test>
  468. <!--
  469. Bowtie command:
  470. bowtie -q -p 4 -S +sam-nohead -C -n 2 -e 70 -l 28 +maxbts 125 -k 1 +snpfrac 0.001 +col-keepends chrM_color test-data/bowtie_in1.fastqcssanger > bowtie_out4_u.sam
  471. sort bowtie_out4_u.sam > bowtie_out4.sam
  472. -p is the number of threads, hardcoded above. You need to replace the + with 2 dashes.
  473. chrM_base is the index files' location/base name.
  474. -->
  475. <param name="genomeSource" value="indexed" />
  476. <param name="index" value="equCab2chrM" />
  477. <param name="sPaired" value="single" />
  478. <param name="sInput1" ftype="fastqcssanger" value="bowtie_in1.fastqcssanger" />
  479. <param name="sSettingsType" value="full" />
  480. <param name="sSkip" value="0" />
  481. <param name="sAlignLimit" value="-1" />
  482. <param name="sTrimH" value="0" />
  483. <param name="sTrimL" value="0" />
  484. <param name="sMismatchSeed" value="2" />
  485. <param name="sMismatchQual" value="70" />
  486. <param name="sSeedLen" value="28" />
  487. <param name="sRounding" value="round" />
  488. <param name="sMaqSoapAlign" value="-1" />
  489. <param name="sTryHard" value="noTryHard" />
  490. <param name="sValAlign" value="1" />
  491. <param name="sAllValAligns" value="noAllValAligns" />
  492. <param name="sSuppressAlign" value="-1" />
  493. <param name="sUnmappedFile" value="false" />
  494. <param name="sMaxFile" value="false" />
  495. <param name="sBest" value="noBest" />
  496. <param name="snMaxBacktracks" value="125" />
  497. <param name="sOffrate" value="-1" />
  498. <param name="sSeed" value="-1" />
  499. <param name="sSnpphred" value="-1" />
  500. <param name="sSnpfrac" value="0.001" />
  501. <param name="sKeepends" value="doKeepends" />
  502. <param name="suppressHeader" value="true" />
  503. <output name="output" ftype="sam" file="bowtie_out4.sam" sort="True" />
  504. </test>
  505. <test>
  506. <!--
  507. Bowtie command:
  508. bowtie-build +noauto +bmaxdivn 4 +dcv 1024 +offrate 5 +ftabchars 10 +little -C -f test-data/chr_m.fasta chrM_color
  509. bowtie -q -X 1000 +ff -p 4 -S +sam-nohead -C chrM_color -1 test-data/bowtie_in3.fastqcssanger -2 test-data/bowtie_in4.fastqcssanger > bowtie_out5_u.sam
  510. sort bowtie_out5_u.sam > bowtie_out5.sam
  511. -p is the number of threads, hardcoded above. You need to replace the + with 2 dashes.
  512. chrM_base is the index files' location/base name.
  513. -->
  514. <param name="genomeSource" value="history" />
  515. <param name="ownFile" value="chr_m.fasta" />
  516. <param name="indexSettings" value="indexFull" />
  517. <param name="autoB" value="set" />
  518. <param name="packed" value="unpacked" />
  519. <param name="bmax" value="-1" />
  520. <param name="bmaxdivn" value="4" />
  521. <param name="dcv" value="1024" />
  522. <param name="nodc" value="dc" />
  523. <param name="noref" value="ref" />
  524. <param name="offrate" value="5" />
  525. <param name="ftab" value="10" />
  526. <param name="ntoa" value="no" />
  527. <param name="endian" value="little" />
  528. <param name="seed" value="-1" />
  529. <param name="cutoff" value="-1" />
  530. <param name="sPaired" value="paired" />
  531. <param name="pInput1" ftype="fastqcssanger" value="bowtie_in3.fastqcssanger" />
  532. <param name="pInput2" ftype="fastqcssanger" value="bowtie_in4.fastqcssanger" />
  533. <param name="pMaxInsert" value="1000" />
  534. <param name="pMateOrient" value="ff" />
  535. <param name="pSettingsType" value="preSet" />
  536. <param name="suppressHeader" value="true" />
  537. <output name="output" ftype="sam" file="bowtie_out5.sam" sort="True" />
  538. </test>
  539. </tests>
  540. <help>
  541. **What it does**
  542. Bowtie_ is a short read aligner designed to be ultrafast and memory-efficient. It is developed by Ben Langmead and Cole Trapnell. Please cite: Langmead B, Trapnell C, Pop M, Salzberg SL. Ultrafast and memory-efficient alignment of short DNA sequences to the human genome. Genome Biology 10:R25.
  543. .. _Bowtie: http://bowtie-bio.sourceforge.net/index.shtml
  544. ------
  545. **Know what you are doing**
  546. .. class:: warningmark
  547. There is no such thing (yet) as an automated gearshift in short read mapping. 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.
  548. .. __: http://bowtie-bio.sourceforge.net/index.shtml
  549. ------
  550. **Input formats**
  551. Bowtie accepts files in Sanger FASTQ format. Use the FASTQ Groomer to prepare your files.
  552. ------
  553. **A Note on Built-in Reference Genomes**
  554. Some genomes have multiple variants. If only one "type" of genome is listed, it is the Full version, which means that everything that came in the original genome data download (possibly with mitochondrial and plasmid DNA added if it wasn't already included). The Full version is available for every genome. Some genomes also come in the Canonical variant, which contains only the "canonical" (well-defined) chromosomes or segments, such as chr1-chr22, chrX, chrY, and chrM for human. Other variations include gender. These will come in the canonical form only, so the general Canonical variant is actually Canonical Female and the other is Canonical Male (identical to female excluding chrX).
  555. ------
  556. **Outputs**
  557. The output is in SAM format, and has the following columns::
  558. Column Description
  559. -------- --------------------------------------------------------
  560. 1 QNAME Query (pair) NAME
  561. 2 FLAG bitwise FLAG
  562. 3 RNAME Reference sequence NAME
  563. 4 POS 1-based leftmost POSition/coordinate of clipped sequence
  564. 5 MAPQ MAPping Quality (Phred-scaled)
  565. 6 CIGAR extended CIGAR string
  566. 7 MRNM Mate Reference sequence NaMe ('=' if same as RNAME)
  567. 8 MPOS 1-based Mate POSition
  568. 9 ISIZE Inferred insert SIZE
  569. 10 SEQ query SEQuence on the same strand as the reference
  570. 11 QUAL query QUALity (ASCII-33 gives the Phred base quality)
  571. 12 OPT variable OPTional fields in the format TAG:VTYPE:VALUE
  572. The flags are as follows::
  573. Flag Description
  574. ------ -------------------------------------
  575. 0x0001 the read is paired in sequencing
  576. 0x0002 the read is mapped in a proper pair
  577. 0x0004 the query sequence itself is unmapped
  578. 0x0008 the mate is unmapped
  579. 0x0010 strand of the query (1 for reverse)
  580. 0x0020 strand of the mate
  581. 0x0040 the read is the first read in a pair
  582. 0x0080 the read is the second read in a pair
  583. 0x0100 the alignment is not primary
  584. It looks like this (scroll sideways to see the entire example)::
  585. QNAME FLAG RNAME POS MAPQ CIAGR MRNM MPOS ISIZE SEQ QUAL OPT
  586. HWI-EAS91_1_30788AAXX:1:1:1761:343 4 * 0 0 * * 0 0 AAAAAAANNAAAAAAAAAAAAAAAAAAAAAAAAAAACNNANNGAGTNGNNNNNNNGCTTCCCACAGNNCTGG hhhhhhh;;hhhhhhhhhhh^hOhhhhghhhfhhhgh;;h;;hhhh;h;;;;;;;hhhhhhghhhh;;Phhh
  587. HWI-EAS91_1_30788AAXX:1:1:1578:331 4 * 0 0 * * 0 0 GTATAGANNAATAAGAAAAAAAAAAATGAAGACTTTCNNANNTCTGNANNNNNNNTCTTTTTTCAGNNGTAG hhhhhhh;;hhhhhhhhhhhhhhhhhhhhhhhhhhhh;;h;;hhhh;h;;;;;;;hhhhhhhhhhh;;hhVh
  588. -------
  589. **Bowtie settings**
  590. All of the options have a default value. You can change any of them. Most of the options in Bowtie have been implemented here.
  591. ------
  592. **Bowtie parameter list**
  593. This is an exhaustive list of Bowtie options:
  594. For indexing (bowtie-build)::
  595. -a No auto behavior. Disable the default behavior where bowtie automatically
  596. selects values for --bmax/--bmaxdivn/--dcv/--packed parameters according
  597. to the memory available. [off]
  598. --packed Packing. Use a packed representation for DNA strings. [auto]
  599. --bmax INT Suffix maximum. The maximum number of suffixes allowed in a block. [auto]
  600. --bmaxdivn INT Suffix maximum fraction. The maximum number of suffixes allowed in a block
  601. expressed as a fraction of the length of the reference. [4]
  602. --dcv INT Difference-cover sample. Use INT as the period for the difference-cover
  603. sample. [1024]
  604. --nodc INT No difference-cover sample. Disable the difference-cover sample. [off]
  605. -r No reference indexes. Do not build the NAME.3.ebwt and NAME.4.ebwt portions
  606. of the index. Used only for paired-end alignment. [off]
  607. -o Offrate. How many Burrows-Wheeler rows get marked by the indexer. The
  608. indexer will mark every 2^INT rows. The marked rows correspond to rows on
  609. the genome. [5]
  610. -t INT Ftab. The lookup table used to calculate an initial Burrows-Wheeler range
  611. with respect to the first INT characters of the query. Ftab is 4^INT+1
  612. bytes. [10]
  613. --ntoa N conversion. Convert Ns to As before building the index. Otherwise, Ns are
  614. simply excluded from the index and Bowtie will not find alignments that
  615. overlap them. [off]
  616. --big Endianness. Endianness to use when serializing integers to the index file. [off]
  617. --little Endianness. [--little]
  618. --seed INT Random seed. Use INT as the seed for the pseudo-random number generator. [off]
  619. --cutoff INT Cutoff. Index only the first INT bases of the reference sequences (cumulative
  620. across sequences) and ignore the rest. [off]
  621. For aligning (bowtie)::
  622. -s INT Skip. Do not align the first INT reads or pairs in the input. [off]
  623. -u INT Align limit. Only align the first INT reads/pairs from the input. [no limit]
  624. -5 INT High-quality trim. Trim INT bases from the high-quality (left) end of each
  625. read before alignment. [0]
  626. -3 INT Low-quality trim. Trim INT bases from the low-quality (right) end of each
  627. read before alignment. [0]
  628. -n INT Mismatch seed. Maximum number of mismatches permitted in the seed (defined
  629. with seed length option). Can be 0, 1, 2, or 3. [2]
  630. -e INT Mismatch quality. Maximum permitted total of quality values at mismatched
  631. read positions. Bowtie rounds quality values to the nearest 10 and saturates
  632. at 30. [70]
  633. -l INT Seed length. The number of bases on the high-quality end of the read to
  634. which the -n ceiling applies. Must be at least 5. [28]
  635. --nomaqround Suppress MAQ rounding. Values are internally rounded to the nearest 10 and
  636. saturate at 30. This options turns off that rounding. [off]
  637. -v INT MAQ- or SOAP-like alignment policy. This option turns off the default
  638. MAQ-like alignment policy in favor of a SOAP-like one. End-to-end alignments
  639. with at most INT mismatches. [off]
  640. -I INT Minimum insert. The minimum insert size for valid paired-end alignments.
  641. Does checking on untrimmed reads if -5 or -3 is used. [0]
  642. -X INT Maximum insert. The maximum insert size for valid paired-end alignments.
  643. Does checking on untrimmed reads if -5 or -3 is used. [250]
  644. --fr Mate orientation. The upstream/downstream mate orientations for a valid
  645. paired-end alignment against the forward reference strand. [--fr]
  646. --rf Mate orientation. [off]
  647. --ff Mate orientation. [off]
  648. --pairtries INT Maximum alignment attempts for paired-end data. [100]
  649. --nofw No forward aligning. Choosing this option means that Bowtie will not attempt
  650. to align against the forward reference strand. [off]
  651. --norc No reverse-complement aligning. Setting this will mean that Bowtie will not
  652. attempt to align against the reverse-complement reference strand. [off]
  653. --maxbts INT Maximum backtracks. The maximum number of backtracks permitted when aligning
  654. a read in -n 2 or -n 3 mode. [125 without --best] [800 with --best]
  655. -y Try hard. Try as hard as possible to find valid alignments when they exist,
  656. including paired-end alignments. [off]
  657. --chunkmbs INT Thread memory. The number of megabytes of memory a given thread is given to
  658. store path descriptors in --best mode. [32]
  659. -k INT Valid alignments. The number of valid alignments per read or pair. [off]
  660. -a All valid alignments. Choosing this means that all valid alignments per read
  661. or pair will be reported. [off]
  662. -m INT Suppress alignments. Suppress all alignments for a particular read or pair
  663. if more than INT reportable alignments exist for it. [no limit]
  664. --best Best mode. Make Bowtie guarantee that reported singleton alignments are
  665. "best" in terms of stratum (the number of mismatches) and quality values at
  666. mismatched position. [off]
  667. --strata Best strata. When running in best mode, report alignments that fall into the
  668. best stratum if there are ones falling into more than one. [off]
  669. -o INT Offrate override. Override the offrate of the index with INT. Some row
  670. markings are discarded when index read into memory. INT must be greater than
  671. the value used to build the index (default: 5). [off]
  672. --seed INT Random seed. Use INT as the seed for the pseudo-random number generator. [off]
  673. --snpphred INT Use INT as the SNP penalty for decoding colorspace alignments. True ratio of
  674. SNPs per base in the subject genome. [see --snpfrac]
  675. --snpfrac DEC Use DEC as the estimated ratio of SNPs per base when decoding colorspace
  676. alignments. [0.001]
  677. --col-keepends Keep the extreme-end nucleotides and qualities when decoding colorspace
  678. alignments. [off]
  679. </help>
  680. </tool>