/tools/meme/meme.xml

https://bitbucket.org/cistrome/cistrome-harvard/ · XML · 353 lines · 300 code · 45 blank · 8 comment · 0 complexity · e85d93ff7b06ba543ed9b328f0ef307b MD5 · raw file

  1. <tool id="meme_meme" name="MEME" version="1.0.0">
  2. <requirements><requirement type='package'>meme</requirement></requirements>
  3. <description>- Multiple Em for Motif Elicitation</description>
  4. <command>meme "$input1" -o "${html_outfile.files_path}"
  5. -nostatus
  6. ##-p 8 ##number of processors
  7. #if str( $options_type.options_type_selector ) == 'advanced':
  8. -sf "${ str( $options_type.sf ).replace( ' ', '_' ) }"
  9. -${options_type.alphabet_type.alphabet_type_selector}
  10. -mod "${options_type.mod_type.mod_type_selector}"
  11. -nmotifs "${options_type.nmotifs}"
  12. -wnsites "${options_type.wnsites}"
  13. #if $options_type.evt &lt; float('inf'):
  14. -evt "${options_type.evt}"
  15. #end if
  16. #if str( $options_type.mod_type.mod_type_selector ) != 'oops':
  17. #if str( $options_type.mod_type.motif_occurrence_type.motif_occurrence_type_selector ) == 'nsites':
  18. -nsites "${options_type.mod_type.motif_occurrence_type.nsites}"
  19. #elif str( $options_type.mod_type.motif_occurrence_type.motif_occurrence_type_selector ) == 'min_max_sites':
  20. -minsites "${options_type.mod_type.motif_occurrence_type.minsites}" -maxsites "${options_type.mod_type.motif_occurrence_type.maxsites}"
  21. #end if
  22. #end if
  23. #if str( $options_type.motif_width_type.motif_width_type_selector ) == 'exact':
  24. -w "${options_type.motif_width_type.width}"
  25. #else
  26. -minw "${options_type.motif_width_type.minw}" -maxw "${options_type.motif_width_type.maxw}"
  27. #end if
  28. #if str( $options_type.motif_trim_type.motif_trim_type_selector ) == 'nomatrim':
  29. -nomatrim
  30. #else
  31. -wg "${options_type.motif_trim_type.wg}" -ws "${options_type.motif_trim_type.ws}" ${options_type.motif_trim_type.noendgaps}
  32. #end if
  33. #if str( $options_type.bfile ) != 'None':
  34. -bfile "${options_type.bfile}"
  35. #end if
  36. #if str( $options_type.pspfile ) != 'None':
  37. -psp "${options_type.pspfile}"
  38. #end if
  39. #if str( $options_type.alphabet_type.alphabet_type_selector ) == "dna":
  40. ${options_type.alphabet_type.revcomp} ${options_type.alphabet_type.pal}
  41. #end if
  42. -maxiter "${options_type.maxiter}" -distance "${options_type.distance}"
  43. -prior "${options_type.alphabet_type.prior_type.prior_type_selector}"
  44. #if str( $options_type.alphabet_type.prior_type.prior_type_selector ) != 'addone':
  45. -b "${options_type.alphabet_type.prior_type.prior_b}"
  46. #if str( $options_type.alphabet_type.prior_type.plib ) != 'None':
  47. -plib "${options_type.alphabet_type.prior_type.plib}"
  48. #end if
  49. #end if
  50. #if str( $options_type.alphabet_type.spmap_type.spmap_type_selector ) == 'cons':
  51. -cons "${options_type.alphabet_type.spmap_type.cons}"
  52. #else
  53. -spmap "${options_type.alphabet_type.spmap_type.spmap_type_selector}"
  54. -spfuzz "${options_type.alphabet_type.spmap_type.spfuzz}"
  55. #end if
  56. #if str( $options_type.branching_type.branching_type_selector ) == 'x_branch':
  57. -x_branch -bfactor "${options_type.branching_type.bfactor}" -heapsize "${options_type.branching_type.heapsize}"
  58. #end if
  59. ##-maxsize "1000000" ##remove hardcoded maxsize? should increase number of processors instead
  60. #end if
  61. 2&gt;&amp;1 || echo "Error running MEME."
  62. &amp;&amp; mv ${html_outfile.files_path}/meme.html ${html_outfile}
  63. &amp;&amp; mv ${html_outfile.files_path}/meme.txt ${txt_outfile}
  64. &amp;&amp; mv ${html_outfile.files_path}/meme.xml ${xml_outfile}
  65. </command>
  66. <inputs>
  67. <param format="fasta" name="input1" type="data" label="Sequences"/>
  68. <conditional name="options_type">
  69. <param name="options_type_selector" type="select" label="Options Configuration">
  70. <option value="basic" selected="true">Basic</option>
  71. <option value="advanced">Advanced</option>
  72. </param>
  73. <when value="basic">
  74. <!-- do nothing here -->
  75. </when>
  76. <when value="advanced">
  77. <param name="sf" type="text" value="Galaxy FASTA Input" label="Name of sequence set" />
  78. <conditional name="alphabet_type">
  79. <param name="alphabet_type_selector" type="select" label="Sequence Alphabet">
  80. <option value="protein">Protein</option>
  81. <option value="dna" selected="true">DNA</option>
  82. </param>
  83. <when value="protein">
  84. <conditional name="prior_type">
  85. <param name="prior_type_selector" type="select" label="Choice of prior">
  86. <option value="dirichlet">simple Dirichlet prior</option>
  87. <option value="dmix" selected="true">mixture of Dirichlets prior</option>
  88. <option value="mega">extremely low variance dmix</option>
  89. <option value="megap">mega for all but last iteration of EM; dmix on last iteration</option>
  90. <option value="addone">add +1 to each observed count</option>
  91. </param>
  92. <when value="dirichlet">
  93. <param name="prior_b" type="float" value="0.01" label="strength of prior on model parameters" />
  94. <param name="plib" type="data" format="txt" optional="True" label="Dirichlet prior file" />
  95. </when>
  96. <when value="dmix">
  97. <param name="prior_b" type="float" value="0" label="strength of prior on model parameters" />
  98. <param name="plib" type="data" format="txt" optional="True" label="Dirichlet prior file" />
  99. </when>
  100. <when value="mega">
  101. <param name="prior_b" type="float" value="0" label="strength of prior on model parameters" />
  102. <param name="plib" type="data" format="txt" optional="True" label="Dirichlet prior file" />
  103. </when>
  104. <when value="megap">
  105. <param name="prior_b" type="float" value="0" label="strength of prior on model parameters" />
  106. <param name="plib" type="data" format="txt" optional="True" label="Dirichlet prior file" />
  107. </when>
  108. <when value="addone">
  109. <!-- no values here? -->
  110. </when>
  111. </conditional>
  112. <conditional name="spmap_type">
  113. <param name="spmap_type_selector" type="select" label="EM starting points">
  114. <option value="uni">uni</option>
  115. <option value="pam" selected="true">pam</option>
  116. <option value="cons">Use starting point from string</option>
  117. </param>
  118. <when value="uni">
  119. <param name="spfuzz" type="float" value="0.5" label="Fuzziness of the mapping" />
  120. </when>
  121. <when value="pam">
  122. <param name="spfuzz" type="integer" value="120" label="Fuzziness of the mapping" />
  123. </when>
  124. <when value="cons">
  125. <param name="cons" type="text" value="" label="Starting point from string" />
  126. </when>
  127. </conditional>
  128. </when>
  129. <when value="dna">
  130. <param name="revcomp" label="Check reverse complement" type="boolean" truevalue="-revcomp" falsevalue="" checked="False"/>
  131. <param name="pal" label="Check for palindromes" type="boolean" truevalue="-pal" falsevalue="" checked="False"/>
  132. <conditional name="prior_type">
  133. <param name="prior_type_selector" type="select" label="Sequence Alphabet">
  134. <option value="dirichlet" selected="true">simple Dirichlet prior</option>
  135. <option value="dmix">mixture of Dirichlets prior</option>
  136. <option value="mega">extremely low variance dmix</option>
  137. <option value="megap">mega for all but last iteration of EM; dmix on last iteration</option>
  138. <option value="addone">add +1 to each observed count</option>
  139. </param>
  140. <when value="dirichlet">
  141. <param name="prior_b" type="float" value="0.01" label="strength of prior on model parameters" />
  142. <param name="plib" type="data" format="txt" optional="True" label="Dirichlet prior file" />
  143. </when>
  144. <when value="dmix">
  145. <param name="prior_b" type="float" value="0" label="strength of prior on model parameters" />
  146. <param name="plib" type="data" format="txt" optional="True" label="Dirichlet prior file" />
  147. </when>
  148. <when value="mega">
  149. <param name="prior_b" type="float" value="0" label="strength of prior on model parameters" />
  150. <param name="plib" type="data" format="txt" optional="True" label="Dirichlet prior file" />
  151. </when>
  152. <when value="megap">
  153. <param name="prior_b" type="float" value="0" label="strength of prior on model parameters" />
  154. <param name="plib" type="data" format="txt" optional="True" label="Dirichlet prior file" />
  155. </when>
  156. <when value="addone">
  157. <!-- no values here? -->
  158. </when>
  159. </conditional>
  160. <conditional name="spmap_type">
  161. <param name="spmap_type_selector" type="select" label="EM starting points">
  162. <option value="uni" selected="true">uni</option>
  163. <option value="pam">pam</option>
  164. <option value="cons">Use starting point from string</option>
  165. </param>
  166. <when value="uni">
  167. <param name="spfuzz" type="float" value="0.5" label="Fuzziness of the mapping" />
  168. </when>
  169. <when value="pam">
  170. <param name="spfuzz" type="integer" value="120" label="Fuzziness of the mapping" />
  171. </when>
  172. <when value="cons">
  173. <param name="cons" type="text" value="" label="Starting point from string" />
  174. </when>
  175. </conditional>
  176. </when>
  177. </conditional>
  178. <param name="nmotifs" type="integer" value="1" label="Number of different motifs to search" />
  179. <param name="evt" type="float" value="inf" label="E-value to stop looking for motifs" />
  180. <conditional name="mod_type">
  181. <param name="mod_type_selector" type="select" label="Expected motif distribution">
  182. <option value="oops">One Occurrence Per Sequence</option>
  183. <option value="zoops" selected="true">Zero or One Occurrence Per Sequence</option>
  184. <option value="anr">Any Number of Repetitions</option>
  185. </param>
  186. <when value="oops">
  187. <!-- no values here -->
  188. </when>
  189. <when value="zoops">
  190. <conditional name="motif_occurrence_type">
  191. <param name="motif_occurrence_type_selector" type="select" label="Number of motif occurrences">
  192. <option value="default" selected="true">Use defaults</option>
  193. <option value="nsites">nsites</option>
  194. <option value="min_max_sites">min and max sites</option>
  195. </param>
  196. <when value="default">
  197. <!-- no values here -->
  198. </when>
  199. <when value="nsites">
  200. <param name="nsites" type="integer" value="1" label="Search nsites number of occurrences" />
  201. </when>
  202. <when value="min_max_sites">
  203. <param name="minsites" type="integer" value="1" label="minsites" />
  204. <param name="maxsites" type="integer" value="50" label="maxsites" />
  205. </when>
  206. </conditional>
  207. </when>
  208. <when value="anr">
  209. <conditional name="motif_occurrence_type">
  210. <param name="motif_occurrence_type_selector" type="select" label="Number of motif occurrences">
  211. <option value="default" selected="true">Use defaults</option>
  212. <option value="nsites">nsites</option>
  213. <option value="min_max_sites">min and max sites</option>
  214. </param>
  215. <when value="default">
  216. <!-- no values here -->
  217. </when>
  218. <when value="nsites">
  219. <param name="nsites" type="integer" value="1" label="Search nsites number of occurrences" />
  220. </when>
  221. <when value="min_max_sites">
  222. <param name="minsites" type="integer" value="1" label="minsites" />
  223. <param name="maxsites" type="integer" value="50" label="maxsites" />
  224. </when>
  225. </conditional>
  226. </when>
  227. </conditional>
  228. <param name="wnsites" type="float" value="0.8" label="Weight on the prior on nsites" />
  229. <conditional name="motif_width_type">
  230. <param name="motif_width_type_selector" type="select" label="Motif width type">
  231. <option value="exact">Exact width</option>
  232. <option value="range" selected="true">Specify a range</option>
  233. </param>
  234. <when value="exact">
  235. <param name="width" type="integer" value="10" label="Width of motif to search" />
  236. </when>
  237. <when value="range">
  238. <param name="minw" type="integer" value="8" label="Min width of motif to search" />
  239. <param name="maxw" type="integer" value="50" label="Max width of motif to search" />
  240. </when>
  241. </conditional>
  242. <conditional name="motif_trim_type">
  243. <param name="motif_trim_type_selector" type="select" label="Motif trim type">
  244. <option value="nomatrim">No motif trim</option>
  245. <option value="trim" selected="true">Trim motif</option>
  246. </param>
  247. <when value="nomatrim">
  248. <!-- no values here -->
  249. </when>
  250. <when value="trim">
  251. <param name="wg" type="integer" value="11" label="Gap cost" />
  252. <param name="ws" type="integer" value="1" label="Space cost" />
  253. <param name="noendgaps" label="Do not penalize endgaps" type="boolean" truevalue="-noendgaps" falsevalue="" checked="False"/>
  254. </when>
  255. </conditional>
  256. <param name="bfile" type="data" format="txt" optional="True" label="Background Model" />
  257. <param name="pspfile" type="data" format="txt" optional="True" label="Position-Specific Prior" />
  258. <param name="maxiter" type="integer" value="50" label="Number of iterations of EM to run" />
  259. <param name="distance" type="float" value="0.001" label="Convergence criterion" />
  260. <conditional name="branching_type">
  261. <param name="branching_type_selector" type="select" label="x-branching type">
  262. <option value="x_branch">Perform x-branching</option>
  263. <option value="no_x_branch" selected="true">No x-branching</option>
  264. </param>
  265. <when value="no_x_branch">
  266. <!-- no values here -->
  267. </when>
  268. <when value="x_branch">
  269. <param name="bfactor" type="integer" value="3" label="Number of iterations of branching" />
  270. <param name="heapsize" type="integer" value="64" label="Maximum number of heaps to use" />
  271. </when>
  272. </conditional>
  273. </when>
  274. </conditional>
  275. <param name="non_commercial_use" label="I certify that I am not using this tool for commercial purposes." type="boolean" truevalue="NON_COMMERCIAL_USE" falsevalue="COMMERCIAL_USE" checked="False">
  276. <validator type="expression" message="This tool is only available for non-commercial use.">value == True</validator>
  277. </param>
  278. </inputs>
  279. <outputs>
  280. <data format="html" name="html_outfile" label="${tool.name} on ${on_string} (html)"/>
  281. <data format="txt" name="txt_outfile" label="${tool.name} on ${on_string} (text)"/>
  282. <data format="memexml" name="xml_outfile" label="${tool.name} on ${on_string} (xml)"/>
  283. </outputs>
  284. <tests>
  285. <test>
  286. <param name="input1" value="meme/meme/meme_input_1.fasta" ftype="fasta" dbkey="hg19"/>
  287. <param name="options_type_selector" value="basic"/>
  288. <param name="non_commercial_use" value="True"/>
  289. <output name="html_outfile" file="meme/meme/meme_output_html_1.html" lines_diff="12"/>
  290. <output name="txt_outfile" file="meme/meme/meme_output_txt_1.txt" lines_diff="12"/>
  291. <output name="xml_outfile" file="meme/meme/meme_output_xml_1.xml" lines_diff="8"/>
  292. </test>
  293. </tests>
  294. <help>
  295. .. class:: warningmark
  296. **WARNING: This tool is only available for non-commercial use. Use for educational, research and non-profit purposes is permitted. Before using, be sure to review, agree, and comply with the license.**
  297. If you want to specify sequence weights, you must include them at the top of your input FASTA file.
  298. .. class:: infomark
  299. **To cite MEME:**
  300. Timothy L. Bailey and Charles Elkan, "Fitting a mixture model by expectation maximization to discover motifs in biopolymers", Proceedings of the Second International Conference on Intelligent Systems for Molecular Biology, pp. 28-36, AAAI Press, Menlo Park, California, 1994.
  301. For detailed information on MEME, click here_. To view the license_.
  302. ------
  303. **Citation**
  304. If you use this tool in Galaxy, please cite Blankenberg D, et al. *In preparation.*
  305. .. _here: http://meme.nbcr.net/meme/meme-intro.html
  306. .. _license: http://meme.nbcr.net/meme/COPYRIGHT.html
  307. </help>
  308. </tool>