PageRenderTime 35ms CodeModel.GetById 18ms app.highlight 10ms RepoModel.GetById 1ms app.codeStats 1ms

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