<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>MEME - Submission form</title>
    <link rel="shortcut icon" type="image/x-icon" href="../doc/images/memesuite_icon.ico">
    <link rel="icon" type="image/png" href="../doc/images/memesuite_icon.png">
    <link href="../doc/css/style.css" rel="stylesheet" type="text/css" />
    <link href="../css/component_sequences.css" rel="stylesheet" type="text/css">
    <link href="../css/component_bfile.css" rel="stylesheet" type="text/css">
    <script src="../doc/js/menu-path.js"></script>
    <script src="../doc/js/menu.js"></script>
    <script src="../doc/js/utilities.js"></script>
    <script src="../doc/js/motif_logo.js"></script>
    <script src="../js/site.js"></script>
    <script src="../js/alphabet_parser.js" type="text/javascript"></script>
    <script src="../js/fasta-debug.js" type="text/javascript"></script>
    <script src="../js/bg_parser.js"></script>
    <script src="../js/component_sequences.js"></script>
    <script src="../js/component_bfile.js"></script>
    <script src="../js/meme.js"></script>
    <style>
      span.pad {
        display: inline-block;
        min-width: 12em;
      }
      div.wide {
        width: 500px;
      }
    </style>
  </head>
  <body>
    <!-- Help Popups -->
    <!--{help/}-->
    <div class="pop_content wide" id="pop_disc_mode">
      <dl>
        <dt>Classic mode</dt>
        <dd>
        <p>You provide <b>one</b> set of sequences and MEME discovers motifs enriched 
        in this set. Enrichment is measured relative to a (higher order) random model based on 
        frequencies of the letters in your sequences, or relative to the frequencies 
        given in a "Custom background model" that you may provide (see Advanced options).</p>
        </dd>

        <dt>Discriminative mode</dt>
        <dd>
        <p>You provide <b>two</b> sets of sequences and MEME discovers motifs that 
        are enriched in the first (primary) set relative to the second (control) set.  
        In Discriminative mode, we first calculate a 
        <a href="javascript:help_popup(help_popup.activator, 'pop_psp')" 
          >position-specific prior</a>
        from the two sets of sequences.
        MEME then searches the first set of sequences for motifs using the 
        position-specific prior to inform the search.  This approach is based on the 
        simple discriminative prior "D" described in Section 3.5 of
        <a href="http://www.springerlink.com/content/av526j7u275n1508/">Narlikar et al</a>.
        We modify their approach to search for the "best" initial motif width, and 
        to handle protein sequences using
        <a href="javascript:help_popup(help_popup.activator, 'pop_spaced_triples')"
          >spaced triples</a>.
        <br>Refer to the <a href="../doc/psp-gen.html#detail">psp-gen</a> documentation
	and to <a href="http://www.biomedcentral.com/1471-2105/11/179">our paper</a>
        for more details.</p>
        </dd>

        <dt>Differential Enrichment mode</dt>
        <dd>
        <p>You provide <b>two</b> sets of sequences and MEME discovers motifs that 
        are enriched in the first (primary) set relative to the second (control) set.  
	In Differential Enrichment mode, MEME optimizes an objective function based on the 
	hypergeometric distribution to determine the relative enrichment of sites in the
	primary sequences compared to the control sequences.
        </p>
        </dd>

      </dl>
      <div class="pop_close">[ <a href="javascript:help_popup()">close</a> ]</div>
    </div>

    <div class="pop_content wide" id="pop_psp">
      <a href="javascript:help_popup(help_popup.activator, 'pop_disc_mode')">&lt;&lt; back to discovery mode description</a>
      <p>Position-specific priors (PSPs) assign a probability that a motif
      starts at each possible location in your sequence data.  MEME uses PSPs to
      guide its search, biasing the search towards sites that have higher values
      in the PSP.  MEME creates a PSP when you use it in "Discriminative mode",
      up-weighting words in the primary dataset that occur frequently there but
      are infrequent in the negative dataset.</p>
      <div class="pop_close">[ <a href="javascript:help_popup()">close</a> ]</div>
    </div>

    <div class="pop_content wide" id="pop_spaced_triples">
      <a href="javascript:help_popup(help_popup.activator, 'pop_disc_mode')">&lt;&lt; back to modes description</a>
      <p>Spaced triples are sub-sequences in which only the first and last
      letter (residue or amino acid for protein) and one interior letter are
      used in matches. For example, the subsequence MTFEKI contains the
      following triples:
      <pre>
          MT...I
          M.F..I
          M..E.I
          M...KI
      </pre>
      where "." matches anything. We use spaced triples for protein because the
      probability of exact matches is much lower than for DNA due to the much
      larger amino acid alphabet.</p>
      <p>To score a word using spaced triples, we count how often each
      triple contained in the word occurs in the primary and control sequence
      sets, and use the maximum over all triples as the word count in the 
      formula for scoring words described by 
      <a href="http://www.springerlink.com/content/av526j7u275n1508/">Narlikar et al</a>.
      </p>
      <div class="pop_close">[ <a href="javascript:help_popup()">close</a> ]</div>
    </div>

    <div class="pop_content" id="pop_sequences">
      <p>Please enter sequences that you believe share one or more motifs. 
      When running MEME in "Discriminative" or Differential Enrichment" mode, this set of sequences
      is referred to as the "primary sequence set".</p>
      <p>There may be at most <b>500,000 (primary) sequences</b>
      in <a href="../doc/fasta-format.html">FASTA format</a>.  There is also
      a limit of 80,000,000 bytes for the entire contents of the input form.</p>
      <p>See the <a href="@SITE_URL@/doc/examples/example-datasets/crp0.fna"
      >example DNA sequences</a> which were used to create the <a 
      href="../doc/examples/meme_example_output_files/meme.html">sample output</a>.</p>
      <div class="pop_close">[ <a href="javascript:help_popup()">close</a> ]</div>
    </div>

    <div class="pop_content" id="pop_control_sequences">
      <p>Please enter sequences that you believe contain patterns you wish to
      avoid making motifs from. This set of sequences is referred to as the "control sequence set.</p>
      <p>The control sequence set should contain sequences that are in some sense a
      contrast to likely sites for motifs (e.g. sequences rejected as unlikely
      to contain a transcription factor binding site), but otherwise similar to
      the primary sequence set.</p>
      <p>There may be at most <b>500,000 control sequences</b>
      in <a href="../doc/fasta-format.html">FASTA format</a>.  There is also
      a limit of 80,000,000 bytes for the entire contents of the input form.</p>
      <div class="pop_close">[ <a href="javascript:help_popup()">close</a> ]</div>
    </div>

    <div class="pop_content" id="pop_background">
      <p>You can use a background model with MEME in order to normalize
      for biased distribution of letters and groups of letters in your sequences.
      A 0-order model adjusts for single letter biases, a 1-order model adjusts for
      dimer biases (e.g., GC content in DNA sequences), etc.</p>
      <p>By default MEME will use a the letter frequencies in the primary sequence
      set to create a 0-order background model.
      Alternatively, you may select 'Upload background model' and you
      can then specify here a file containing a <a 
      href="../doc/bfile-format.html">background model</a> in a simple format.</p>
      <p>The downloadable version of the MEME Suite also contains a program named
      <a href="../doc/fasta-get-markov.html">fasta-get-markov</a> that you can
      use to create background model files in the correct format from FASTA
      sequence files.</p>
      <div class="pop_close">[ <a href="javascript:help_popup()">close</a> ]</div>
    </div>

    <div class="pop_content wide" id="pop_dist">
      <p>This is where you tell MEME how you believe occurrences of the motifs
      are distributed among the sequences. Selecting the correct type of
      distribution improves the sensitivity and quality of the motif search.</p>
      <dl>
        <dt>Zero or One Occurrence per Sequence (zoops)</dt>
        <dd>MEME assumes that each sequence may contain <b>at most</b> one
        occurrence of each motif. This option is useful when you suspect that
        some motifs may be missing from some of the sequences. In that case, the
        motifs found will be more accurate than using the One Occurrence per
        Sequence option. This option takes more computer time than the One 
        Occurrence Per Sequence option (about twice as much) and is slightly less
        sensitive to weak motifs present in all of the sequences.</dd>
        <dt>One Occurrence Per Sequence (oops)</dt>
        <dd>MEME assumes that each sequence in the dataset contains
        <b>exactly</b> one occurrence of each motif. This option is the fastest
        and most sensitive but the motifs returned by MEME will be "blurry" (less specific) 
        if they do not occur in every input sequence.</dd>
        <dt>Any Number of Repetitions (anr)</dt>
        <dd>MEME assumes each sequence may contain <b>any number</b> of
        non-overlapping occurrences of each motif. This option is useful when
        you suspect that motifs repeat multiple times within a single sequence.
        In that case, the motifs found will be much more accurate than using one
        of the other options. This option can also be used to discover repeats
        within a single sequence. This option takes much more computer time than
        the One Occurrence Per Sequence option (about ten times as much) and is
        somewhat less sensitive to weak motifs that do not repeat within a
        single sequence than the other two options.</dd>
      </dl>
      <div class="pop_close">[ <a href="javascript:help_popup()">close</a> ]</div>
    </div>

    <div class="pop_content" id="pop_nmotifs">
      <p>MEME will keep searching until it finds this many motifs or until it
      exceeds one of its other thresholds (e.g., maximum run time). Note that 
      unlike DREME, MEME does not use an <i>E</i>-value threshold, so you should always 
      check the <i>E</i>-value of any motifs discovered by MEME.</p>
      <div class="pop_close">[ <a href="javascript:help_popup()">close</a> ]</div>
    </div>

    <div class="pop_content" id="pop_width">
      <p>This is the width (number of characters in the sequence pattern) of a
      single motif. MEME chooses the optimal width of each motif individually
      using a heuristic function. You can choose limits
      for the minimum and maximum motif widths that MEME will consider. The
      width of each motif that MEME reports will lie within the limits you
      choose.</p>
      <div class="pop_close">[ <a href="javascript:help_popup()">close</a> ]</div>
    </div>

    <div class="pop_content wide" id="pop_sites">
      <p>This is the total number of sites in the primary sequence set where a single
      motif occurs. You can choose limits for the minimum and maximum
      number of occurrences that MEME will consider. If you have prior knowledge
      about the number of occurrences that motifs have in your primary sequence set,
      limiting MEME's search in this way can can increase the likelihood of
      MEME finding true motifs.</p>
      <p>MEME chooses the number of occurrences to report for each motif by
      optimizing a heuristic function, restricting the number of
      occurrences to the range you give here.</p>
      <p>If you do not select one of these fields, MEME uses the following defaults
      for the range of the number of motif sites, where "n" is the number of sequences in
      the primary sequence set:</p>
      <table>
      <tr><th>Distribution</th><th>Minimum</th><th>Maximum</th></tr>
      <tr><td>Zero or One Occurrence per Sequence</td><td>sqrt(n)</td><td>n</td></tr>
      <tr><td>One Occurrence per Sequence</td><td>n</td><td>n</td></tr>
      <tr><td>Any Number of Repetitions</td><td>sqrt(n)</td><td>min(5*n, 600)</td></tr>
      </table>
      <div class="pop_close">[ <a href="javascript:help_popup()">close</a> ]</div>
    </div>

    <div class="pop_content" id="pop_norc">
      <p>Checking this box instructs MEME to <b>NOT</b> check the reverse
      complement of the input sequences for motif sites when analyzing 
      DNA or RNA sequences.</p>
      <p><b>Note:</b> When your sequences are RNA, you should select this option
      to ensure that only the given strand is searched for motifs.</p>
      <div class="pop_close">[ <a href="javascript:help_popup()">close</a> ]</div>
    </div>

    <div class="pop_content" id="pop_pal">
      <p>Checking this box causes MEME to search only for DNA palindromes.</p>
      <p>This causes MEME to average the letter frequencies in corresponding motif
      columns together. For instance, if the width of the motif is 10, columns
      1 and 10, 2 and 9, 3 and 8, etc., are averaged together. The averaging
      combines the frequency of A in one column with T in the other, and the
      frequency of C in one column with G in the other. If this box is not
      checked, the columns are not averaged together.</p>
      <div class="pop_close">[ <a href="javascript:help_popup()">close</a> ]</div>
    </div>

    <div class="pop_content" id="pop_shuffle">
      <p>Checking this box causes MEME to shuffle each of the primary sequences
      individually. The sequences will still be the same length and have
      the same character frequencies but any existing patterns will be obliterated.</p>
      <p>Using this option repeatedly you can get an idea of the <i>E</i>-values of motifs
      discovered in "random" sequence datasets similar to your primary dataset.
      This can help you determine a reasonable <i>E</i>-value cutoff
      for motifs discovered in your unshuffled primary sequence dataset.</p>
      <div class="pop_close">[ <a href="javascript:help_popup()">close</a> ]</div>
    </div>

    <!-- Page starts -->
    <div class="content_box">
      <!--{header}-->
      <p>
      <!--{title}-->MEME<!--{/title}--> - <!--{subtitle}-->Multiple Em for Motif Elicitation<!--{/subtitle}--><br>
      <!--{logo}-->../doc/images/meme_icon.png<!--{/logo}-->: <!--{alt}-->MEME Logo<!--{/alt}--><br>
      <!--{blurb}--><span class="blurb" data-id="meme"></span><!--{/blurb}-->
      </p>
      <!--{/header}-->
      <form enctype="multipart/form-data" accept-charset="utf-8" 
      method="POST" action="meme" id="meme_form">
        <fieldset>
          <legend>Data Submission Form</legend>
          <p class="meme">Perform motif discovery on DNA, RNA, protein or custom alphabet datasets.</p> 
          <!-- mode -->
          <h2 class="meme">Select the motif discovery mode <div class="help" data-topic="pop_disc_mode"></div></h2>
          <div class="subcontent">
            <input type="radio" name="disc_mode" id="classic" value="classic" checked>
            <label for="classic">Classic mode</label>
            <input type="radio" name="disc_mode" id="psp" value="psp">
            <label for="psp">Discriminative mode</label>
            <input type="radio" name="disc_mode" id="de" value="de">
            <label for="de">Differential Enrichment mode</label>&nbsp;<img src="../images/new_icon.png" alt="NEW" id="new_1">
          </div>
          <!-- /mode -->

          <!--{alphabet}-->
          <p style="border: 1px solid black">
          <!--{prefix}-->alphabet<!--{/prefix}--><br>
          <!--{description}-->sequence alphabet<!--{/description}-->
          <!--{register}-->register_component<!--{/register}-->
          </p>
          <!--{/alphabet}-->

          <!--{sequences}-->
          <p style="border: 1px solid black">
          <!--{prefix}-->sequences<!--{/prefix}--><br>
          <!--{description}-->sequences<!--{/description}-->
          <!--{title}-->Input the primary sequences<!--{/title}--><br>
          <!--{subtitle}-->Enter sequences in which you want to find motifs.<!--{/subtitle}--><br>
          <!--{default}-->FILE<!--{/default}-->
          <!--{enable_weights/}-->
          <!--{min_seq_len}-->8<!--{/min_seq_len}-->
          <!--{max_seq_count}-->500000<!--{/max_seq_count}-->
          <!--{max_seq_total}-->80000000<!--{/max_seq_total}-->
          <!--{register}-->register_component<!--{/register}-->
          </p>
          <!--{/sequences}-->
          <div id="discr_sequences_area" style="display:none">
          <!--{control}-->
          <p style="border: 1px solid black">
          <!--{prefix}-->control_sequences<!--{/prefix}--><br>
          <!--{description}-->control sequences<!--{/description}-->
          <!--{title}-->Input the control sequences<!--{/title}--><br>
          <!--{subtitle}-->MEME will find motifs that are enriched relative to these sequences.<!--{/subtitle}--><br>
          <!--{default}-->FILE<!--{/default}-->
          <!--{max_seq_count}-->500000<!--{/max_seq_count}-->
          <!--{max_seq_total}-->80000000<!--{/max_seq_total}-->
          <!--{register}-->register_component<!--{/register}-->
          </p>
          <!--{/control}-->
          </div>
          <!-- distribution -->
          <h2 class="meme">Select the site distribution</h2>
          <div class="subcontent">
            <h4 class="meme">How do you expect motif sites to be distributed in sequences?
            <div class="help" data-topic="pop_dist"></div></h4>
            <select class="meme" name="dist" id="dist">
              <option value="zoops" selected>Zero or One Occurrence Per Sequence (zoops)</option>
              <option value="oops" >One Occurrence Per Sequence (oops)</option>
              <option value="anr" >Any Number of Repetitions (anr)</option>
            </select> 
          </div>
          <!-- /distribution -->
          <h2 class="meme">Select the number of motifs</h2>
          <div class="subcontent">
            <h4 class="meme">How many motifs should MEME find?
            <div class="help" data-topic="pop_nmotifs"></div></h4>
            <input class="meme intonly sz2" type="number" name="nmotifs" value="3"
            step="1" min="1" size="2" id="nmotifs">
          </div>

          <!--{job_details/}-->
          
          <!-- Advanced Options -->
          <div style="margin-top:5px; margin-bottom: 5px; width:90%;">
	    <!--{advanced_options/}-->
            <div>
	      <!--{bfile}-->
		<!--{prefix}-->background<!--{/prefix}-->
		<!--{enable_zero_order/}-->
		<!--{enable_first_order/}-->
		<!--{enable_high_order/}-->
		<!--{enable_upload/}-->
		<!--{selected}-->zero<!--{/selected}-->
		<!--{register}-->register_component<!--{/register}-->
	      <!--{/bfile}-->

	      <h3 class="meme">How wide can motifs be?</h3>
	      <span class="pad">
	      <label for="minw">Minimum width:</label>
	      <input class="meme intonly sz2" type="number" name="minw" value="6"
	      step="1" min="2" max="300" size="2" id="minw">
	      </span>

	      <label for="maxw">Maximum width:</label>
	      <input class="meme intonly sz2" type="number" name="maxw" value="50"
	      step="1" min="2" max="300"  size="2" id="maxw">
	      <div class="help" data-topic="pop_width"></div>

	      <div id="sites">
		<h3 class="meme">How many sites must each motif have?</h3>
		<span class="enabopt pad">
		<input type="checkbox" value="1" name="minsites_enable" id="minsites_enable">
		<label for="minsites">Minimum sites:</label>
		<input class="meme intonly sz2" type="number" id="minsites" 
		name="minsites" value="2" step="1" min="2" max="600" size="2">
		</span>
		<span class="enabopt">
		<input type="checkbox" value="1" name="maxsites_enable" id="maxsites_enable">
		<label for="maxsites">Maximum sites:</label>
		<input class="meme intonly sz3" type="number" id="maxsites" 
		name="maxsites" value="600" step="1" min="2" max="600" size="3">
		</span>
		<div class="help" data-topic="pop_sites"></div>
	      </div>
	      
	      <h3 class="meme top">Can motif sites be on both strands? (DNA/RNA only)</h3>
	      <input class="meme" type="checkbox" id="norc" name="norc" value="1">
	      <label for="norc">search given strand only</label>
	      <div class="help" data-topic="pop_norc"></div>
	      <h3 class="meme">Should MEME restrict the search to palindromes? (DNA only)</h3>
	      <input class="meme" type="checkbox" name="pal" value="1" id="pal">
	      <label for="pal">look for palindromes only</label>
	      <div class="help" data-topic="pop_pal"></div>
	      <h3 class="meme">Should MEME shuffle the sequences?</h3>
	      <input class="meme" type="checkbox" id="shuffle" name="shuffle" value="1">
	      <label for="shuffle">Shuffle the sequences</label>
	      <div class="help" data-topic="pop_shuffle"></div>
            </div>
          </div>
          <!-- /Advanced Options -->
          <!-- Search and clear buttons -->
          <!--{submit_reset/}-->
        </fieldset>
      </form>
      <!--{footer/}-->
    </div>
  </body>
</html>
