view meme.xml @ 19:7ce0fe11b411 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/meme commit 93fe7345e2b6a97000975d978bf06513b3a442d9
author iuc
date Thu, 29 Aug 2024 10:20:10 +0000
parents 19237efe98d1
children
line wrap: on
line source

<tool id="meme_meme" name="MEME" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <description>- Multiple EM for Motif Elicitation</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <xrefs>
        <xref type="bio.tools">meme_meme</xref>
    </xrefs>
    <expand macro="requirements"/>
    <command detect_errors="exit_code"><![CDATA[
@CHECK_NON_COMMERCIAL_USE@
export TMPDIR=\${TMPDIR:-.};

meme '$input1'
-p \${GALAXY_SLOTS:-1}
-o '${html_outfile.files_path}'
-nostatus
-maxsize 1000000
#if str( $options_type.options_type_selector ) == 'advanced':
    -sf '${ str( $options_type.sf ).replace( " ", "_" ) }'
    -${options_type.alphabet_type.alphabet_type_selector}
    -mod '${options_type.mod_type.mod_type_selector}'
    -nmotifs '${options_type.nmotifs}'
    -wnsites '${options_type.wnsites}'
    #if $options_type.evt < float('inf'):
        -evt '${options_type.evt}'
    #end if
    #if str( $options_type.mod_type.mod_type_selector ) != 'oops':
        #if str( $options_type.mod_type.motif_occurrence_type.motif_occurrence_type_selector ) == 'nsites':
            -nsites '${options_type.mod_type.motif_occurrence_type.nsites}'
        #elif str( $options_type.mod_type.motif_occurrence_type.motif_occurrence_type_selector ) == 'min_max_sites':
            -minsites '${options_type.mod_type.motif_occurrence_type.minsites}'
            -maxsites '${options_type.mod_type.motif_occurrence_type.maxsites}'
        #end if
    #end if
    #if str( $options_type.motif_width_type.motif_width_type_selector ) == 'exact':
        -w '${options_type.motif_width_type.width}'
    #else
        -minw '${options_type.motif_width_type.minw}'
        -maxw '${options_type.motif_width_type.maxw}'
    #end if
    #if str( $options_type.motif_trim_type.motif_trim_type_selector ) == 'nomatrim':
        -nomatrim
    #else
        -wg '${options_type.motif_trim_type.wg}'
        -ws '${options_type.motif_trim_type.ws}'
        ${options_type.motif_trim_type.noendgaps}
    #end if
    #if str( $options_type.bfile ) != 'None':
        -bfile '${options_type.bfile}'
    #end if
    #if str( $options_type.pspfile ) != 'None':
        -psp '${options_type.pspfile}'
    #end if
    #if str( $options_type.alphabet_type.alphabet_type_selector ) == 'dna':
        ${options_type.alphabet_type.revcomp} ${options_type.alphabet_type.pal}
    #end if
    -maxiter '${options_type.maxiter}'
    -distance '${options_type.distance}'
    -prior '${options_type.alphabet_type.prior_type.prior_type_selector}'
    #if str( $options_type.alphabet_type.prior_type.prior_type_selector ) != 'addone':
        -b '${options_type.alphabet_type.prior_type.prior_b}'
        #if str( $options_type.alphabet_type.prior_type.plib ) != 'None':
            -plib '${options_type.alphabet_type.prior_type.plib}'
        #end if
    #end if
    #if str( $options_type.alphabet_type.spmap_type.spmap_type_selector ) == 'cons':
        -cons '${options_type.alphabet_type.spmap_type.cons}'
    #else
        -spmap '${options_type.alphabet_type.spmap_type.spmap_type_selector}'
        -spfuzz '${options_type.alphabet_type.spmap_type.spfuzz}'
    #end if
    #if str( $options_type.branching_type.branching_type_selector ) == 'x_branch':
        -x_branch
        -bfactor '${options_type.branching_type.bfactor}'
        -heapsize '${options_type.branching_type.heapsize}'
    #end if
#end if
&& mv '${html_outfile.files_path}/meme.html' '${html_outfile}'
&& mv '${html_outfile.files_path}/meme.txt' '${txt_outfile}'
&& mv '${html_outfile.files_path}/meme.xml' '${xml_outfile}'
    ]]></command>
    <inputs>
        <param name="input1" type="data" format="fasta" label="Sequences"/>
        <conditional name="options_type">
            <param name="options_type_selector" type="select" label="Options Configuration">
                <option value="basic" selected="true">Basic</option>
                <option value="advanced">Advanced</option>
            </param>
            <when value="basic"/>
            <when value="advanced">
                <param argument="-sf" type="text" value="Galaxy FASTA Input" label="Name of sequence set"/>
                <conditional name="alphabet_type">
                    <param name="alphabet_type_selector" type="select" label="Sequence Alphabet">
                        <option value="protein">Protein</option>
                        <option value="dna" selected="true">DNA</option>
                    </param>
                    <when value="protein">
                        <conditional name="prior_type">
                            <param name="prior_type_selector" argument="-prior" type="select" label="Choice of prior">
                                <option value="dirichlet">simple Dirichlet prior</option>
                                <option value="dmix" selected="true">mixture of Dirichlets prior</option>
                                <option value="mega">extremely low variance dmix</option>
                                <option value="megap">mega for all but last iteration of EM; dmix on last iteration</option>
                                <option value="addone">add +1 to each observed count</option>
                            </param>
                            <when value="dirichlet">
                                <param name="prior_b" argument="-b" type="float" value="0.01" label="strength of prior on model parameters"/>
                                <param argument="-plib" type="data" format="txt" optional="True" label="Dirichlet prior file"/>
                            </when>
                            <when value="dmix">
                                <param name="prior_b" argument="-b" type="float" value="0" label="strength of prior on model parameters"/>
                                <param argument="-plib" type="data" format="txt" optional="True" label="Dirichlet prior file"/>
                            </when>
                            <when value="mega">
                                <param name="prior_b" argument="-b" type="float" value="0" label="strength of prior on model parameters"/>
                                <param argument="-plib" type="data" format="txt" optional="True" label="Dirichlet prior file"/>
                            </when>
                            <when value="megap">
                                <param name="prior_b" argument="-b" type="float" value="0" label="strength of prior on model parameters"/>
                                <param argument="-plib" type="data" format="txt" optional="True" label="Dirichlet prior file"/>
                            </when>
                            <when value="addone"/>
                        </conditional>
                        <conditional name="spmap_type">
                            <param name="spmap_type_selector" argument="-spmap" type="select" label="EM starting points">
                                <option value="uni">uni</option>
                                <option value="pam" selected="true">pam</option>
                                <option value="cons">Use starting point from string</option>
                            </param>
                            <when value="uni">
                                <param argument="-spfuzz" type="float" value="0.5" label="Fuzziness of the mapping"/>
                            </when>
                            <when value="pam">
                                <param argument="-spfuzz" type="integer" value="120" label="Fuzziness of the mapping"/>
                            </when>
                            <when value="cons">
                                <param argument="-cons" type="text" value="" label="Starting point from string"/>
                            </when>
                        </conditional>
                    </when>
                    <when value="dna">
                        <param argument="-revcomp" type="boolean" truevalue="-revcomp" falsevalue="" checked="False" label="Check reverse complement"/>
                        <param argument="-pal" type="boolean" truevalue="-pal" falsevalue="" checked="False" label="Check for palindromes"/>
                        <conditional name="prior_type">
                            <param name="prior_type_selector" argument="-prior" type="select" label="Sequence Alphabet">
                                <option value="dirichlet" selected="true">simple Dirichlet prior</option>
                                <option value="dmix">mixture of Dirichlets prior</option>
                                <option value="mega">extremely low variance dmix</option>
                                <option value="megap">mega for all but last iteration of EM; dmix on last iteration</option>
                                <option value="addone">add +1 to each observed count</option>
                            </param>
                            <when value="dirichlet">
                                <param name="prior_b" argument="-b" type="float" value="0.01" label="strength of prior on model parameters"/>
                                <param argument="-plib" type="data" format="txt" optional="True" label="Dirichlet prior file"/>
                            </when>
                            <when value="dmix">
                                <param name="prior_b" argument="-b" type="float" value="0" label="strength of prior on model parameters"/>
                                <param argument="-plib" type="data" format="txt" optional="True" label="Dirichlet prior file"/>
                            </when>
                            <when value="mega">
                                <param name="prior_b" argument="-b" type="float" value="0" label="strength of prior on model parameters"/>
                                <param argument="-plib" type="data" format="txt" optional="True" label="Dirichlet prior file"/>
                            </when>
                            <when value="megap">
                                <param name="prior_b" argument="-b" type="float" value="0" label="strength of prior on model parameters"/>
                                <param argument="-plib" type="data" format="txt" optional="True" label="Dirichlet prior file"/>
                            </when>
                            <when value="addone"/>
                        </conditional>
                        <conditional name="spmap_type">
                            <param name="spmap_type_selector" argument="-spmap" type="select" label="EM starting points">
                                <option value="uni" selected="true">uni</option>
                                <option value="pam">pam</option>
                                <option value="cons">Use starting point from string</option>
                            </param>
                            <when value="uni">
                                <param argument="-spfuzz" type="float" value="0.5" label="Fuzziness of the mapping"/>
                            </when>
                            <when value="pam">
                                <param argument="-spfuzz" type="integer" value="120" label="Fuzziness of the mapping"/>
                            </when>
                            <when value="cons">
                                <param argument="-cons" type="text" value="" label="Starting point from string"/>
                            </when>
                        </conditional>
                    </when>
                </conditional>
                <param argument="-nmotifs" type="integer" value="1" label="Number of different motifs to search"/>
                <param argument="-evt" type="float" value="inf" label="E-value to stop looking for motifs"/>
                <conditional name="mod_type">
                    <param name="mod_type_selector" argument="-mod" type="select" label="Expected motif distribution">
                        <option value="oops">One Occurrence Per Sequence</option>
                        <option value="zoops" selected="true">Zero or One Occurrence Per Sequence</option>
                        <option value="anr">Any Number of Repetitions</option>
                    </param>
                    <when value="oops"/>
                    <when value="zoops">
                        <conditional name="motif_occurrence_type">
                            <param name="motif_occurrence_type_selector" type="select" label="Number of motif occurrences">
                                <option value="default" selected="true">Use defaults</option>
                                <option value="nsites">nsites</option>
                                <option value="min_max_sites">min and max sites</option>
                            </param>
                            <when value="default"/>
                            <when value="nsites">
                                <param argument="-nsites" type="integer" value="1" label="Search nsites number of occurrences"/>
                            </when>
                            <when value="min_max_sites">
                                <param argument="-minsites" type="integer" value="1" label="minsites"/>
                                <param argument="-maxsites" type="integer" value="50" label="maxsites"/>
                            </when>
                        </conditional>
                    </when>
                    <when value="anr">
                        <conditional name="motif_occurrence_type">
                            <param name="motif_occurrence_type_selector" type="select" label="Number of motif occurrences">
                                <option value="default" selected="true">Use defaults</option>
                                <option value="nsites">nsites</option>
                                <option value="min_max_sites">min and max sites</option>
                            </param>
                            <when value="default"/>
                            <when value="nsites">
                                <param argument="-nsites" type="integer" value="1" label="Search nsites number of occurrences"/>
                            </when>
                            <when value="min_max_sites">
                                <param argument="-minsites" type="integer" value="1" label="minsites"/>
                                <param argument="-maxsites" type="integer" value="50" label="maxsites"/>
                            </when>
                        </conditional>
                    </when>
                </conditional>
                <param argument="-wnsites" type="float" value="0.8" label="Weight on the prior on nsites"/>
                <conditional name="motif_width_type">
                    <param name="motif_width_type_selector" type="select" label="Motif width type">
                        <option value="exact">Exact width</option>
                        <option value="range" selected="true">Specify a range</option>
                    </param>
                    <when value="exact">
                        <param name="width" argument="-w" type="integer" value="10" label="Width of motif to search"/>
                    </when>
                    <when value="range">
                        <param argument="-minw" type="integer" value="8" label="Min width of motif to search"/>
                        <param argument="-maxw" type="integer" value="50" label="Max width of motif to search"/>
                    </when>
                </conditional>
                <conditional name="motif_trim_type">
                    <param name="motif_trim_type_selector" type="select" label="Motif trim type">
                        <option value="nomatrim">No motif trim</option>
                        <option value="trim" selected="true">Trim motif</option>
                    </param>
                    <when value="nomatrim"/>
                    <when value="trim">
                        <param argument="-wg" type="integer" value="11" label="Gap cost"/>
                        <param argument="-ws" type="integer" value="1" label="Space cost"/>
                        <param argument="-noendgaps" type="boolean" truevalue="-noendgaps" falsevalue="" checked="False" label="Do not penalize endgaps"/>
                    </when>
                </conditional>
                <param argument="-bfile" type="data" format="txt" optional="True" label="Background Model"/>
                <param name="pspfile" argument="-psp" type="data" format="txt" optional="True" label="Position-Specific Prior"/>
                <param argument="-maxiter" type="integer" value="50" label="Number of iterations of EM to run"/>
                <param argument="-distance" type="float" value="0.001" label="Convergence criterion"/>
                <conditional name="branching_type">
                    <param name="branching_type_selector" type="select" label="x-branching type">
                        <option value="x_branch">Perform x-branching</option>
                        <option value="no_x_branch" selected="true">No x-branching</option>
                    </param>
                    <when value="no_x_branch"/>
                    <when value="x_branch">
                        <param argument="-bfactor" type="integer" value="3" label="Number of iterations of branching"/>
                        <param argument="-heapsize" type="integer" value="64" label="Maximum number of heaps to use"/>
                    </when>
                </conditional>
            </when>
        </conditional>
        <param name="non_commercial_use" type="boolean" truevalue="NON_COMMERCIAL_USE" falsevalue="COMMERCIAL_USE" checked="False" label="I certify that I am not using this tool for commercial purposes.">
            <validator type="expression" message="This tool is only available for non-commercial use.">value == True</validator>
        </param>
    </inputs>
    <outputs>
        <data format="html" name="html_outfile" label="${tool.name} on ${on_string} (html)"/>
        <data format="txt" name="txt_outfile" label="${tool.name} on ${on_string} (text)"/>
        <data format="memexml" name="xml_outfile" label="${tool.name} on ${on_string} (xml)"/>
    </outputs>
    <tests>
        <test>
            <param name="input1" value="meme_input_1.fasta" ftype="fasta" dbkey="hg19"/>
            <param name="options_type_selector" value="basic"/>
            <param name="non_commercial_use" value="True"/>
            <output name="html_outfile" file="meme_output_test1.html" compare="contains"/>
            <output name="txt_outfile" file="meme_output_test1.txt" compare="contains"/>
            <output name="xml_outfile" file="meme_output_test1.xml" compare="contains"/>
        </test>
        <test>
            <param name="input1" value="meme_input_1.fasta" ftype="fasta" dbkey="hg19"/>
            <param name="options_type_selector" value="advanced"/>
            <param name="plib" value="prior30.plib" ftype="txt"/>
            <param name="non_commercial_use" value="True"/>
            <output name="html_outfile" file="meme_output_test2.html" compare="contains"/>
            <output name="txt_outfile" file="meme_output_test2.txt" compare="contains"/>
            <output name="xml_outfile" file="meme_output_test2.xml" compare="contains"/>
        </test>
    </tests>
    <help>

.. class:: warningmark

**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.**

If you want to specify sequence weights, you must include them at the top of your input FASTA file.

MEME discovers novel, ungapped motifs (recurring, fixed-length patterns) in your sequences (sample output from sequences).
MEME splits variable-length patterns into two or more separate motifs.  A motif is a sequence pattern that occurs repeatedly
in a group of related sequences.  MEME represents motifs as position-dependent letter-probability matrices which describe the
probability of each possible letter at each position in the pattern.  Individual MEME motifs do not contain gaps.  Patterns
with variable-length gaps are split by MEME into two or more separate motifs.  MEME takes as input a group of sequences and
outputs as many motifs as requested.  MEME uses statistical modeling techniques to automatically choose the best width, number
of occurrences, and description for each motif.

.. class:: infomark

For detailed information on MEME, click here_, or view the license_.

.. _here: http://meme-suite.org/doc/meme.html?man_type=web
.. _license: http://meme-suite.org/doc/copyright.html?man_type=web

    </help>
    <citations>
        <citation type="bibtex">
@inproceedings{Bailey1994Fitting,
    booktitle = {Proceedings of the Second International Conference on Intelligent Systems for Molecular Biology},
    pages = {28-36},
    author = {Bailey, Timothy L. and Elkan, Charles},
    title = {Fitting a mixture model by expectation maximization to discover motifs in biopolymers},
    url = {https://www.aaai.org/Papers/ISMB/1994/ISMB94-004.pdf},
    year = {1994}
}
        </citation>
    </citations>
</tool>