<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>DREME - 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">
    <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"></script>
    <script src="../js/fasta-debug.js"></script>
    <script src="../js/component_sequences.js"></script>
    <script src="../js/dreme.js"></script>
    <style>
      span.pad {
        display: inline-block;
        min-width: 12em;
      }
    </style>
  </head>
  <body>
    <!-- Help Popups -->

    <!--{help/}-->

    <div class="pop_content" style="display:none" id="pop_discr">
      <p>DREME looks for motifs that are enriched in your sequences relative
      to a control set of sequences.
      </p>
      <p>By default DREME creates the control
      set by shuffling each of your sequences, conserving dinucleotide 
      frequencies ("Shuffled input sequences").  
      </p>
      <p>Alternatively, you may
      may provide a set of control sequences ("User-provided sequences").
      </p>
      <p><b>IMPORTANT:</b> If you provide the control sequences,
      they should have exactly the same length distribution as the
      the primary sequences.  (E.g., all sequences
      in both sets could have the same length, or for each sequence in
      the primary set there could be exactly <i>N</i> sequences with the 
      same length as it in in the control set.)
      Failure to ensure this may cause DREME to fail to find motifs or
      to report inaccurate <i>E</i>-values.
      </p>

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

    <div class="pop_content" style="display:none" id="pop_sequences" >
      <p>Select a file of <a href="../doc/fasta-format.html">FASTA formatted</a>
      nucleotide sequences or paste in actual <a href="../doc/fasta-format.html"
      >FASTA formatted</a> nucleotide sequences to search for small regular expression 
      motifs.</p>
      <p>DREME works best with sequences which are less than 500 nucleotides 
      long so if you have very long sequences DREME might work better if you 
      split long sequences into shorter ones. 
      For ChIP-seq we recommend using sequences of length 100 centered on
      the summit or center of the peak. 
      The more sequences that you can give DREME the 
      more subtle the motifs it can find.</p>
      <p>See the <a href="@SITE_URL@/doc/examples/example-datasets/Klf1.fna"
      >example DNA sequences</a> which were used to create the <a
      href="../doc/examples/dreme_example_output_files/dreme.html">sample output</a>
      to get an idea of input that works well for DREME.</p>
      <div class="pop_close">[ <a href="javascript:help_popup()">close</a> ]</div>
    </div>

    <div class="pop_content" style="display:none" id="pop_discr_sequences" >
      <p>Input comparative sequences which have approximately the same length 
      distribution and background frequencies but which are unlikely to contain 
      the motifs that you are attempting to find.</p> 
      <p>Note that using comparative sequences that are much longer or shorter 
      than your input sequences has the potential to create incorrect 
      p-values.</p>
      <div class="pop_close">[ <a href="javascript:help_popup()">close</a> ]</div>
    </div>

    <div class="pop_content" style="display:none" id="pop_email">
      <p>Enter the email address where you want the job notification email to
      be sent. Please check that this is a valid email address!</p>
      <p>The notification email will include a link to your job results.</p>
      <p><b>Note:</b> You can also access your jobs via the <b>Recent Jobs</b>
        menu on the left of all MEME Suite input pages.  That menu only
        keeps track of jobs submitted during the current session of your internet browser.</p>
      <p><b>Note:</b> Most MEME Suite servers only store results for a couple of days.
      So be sure to download any results you wish to keep.</p>
      <div class="pop_close">[ <a href="javascript:help_popup()">close</a> ]</div>
    </div>

    <div class="pop_content" style="display:none" id="pop_job_description">
      <p>The job description will be included in the notification email you 
      receive and in the DREME output.</p>
      <div class="pop_close">[ <a href="javascript:help_popup()">close</a> ]</div>
    </div>

    <div class="pop_content" style="display:none" id="pop_limit">
      <p>DREME stops looking for motifs when one of these limits is met. There
      is an additional time limit which is set by the server operator.</p>
      <dl>
        <dt><i>E</i>-value threshold</dt>
        <dd>The expected number of false positives. This may be any positive 
        number.  DREME stops if a motif is found whose <i>E</i>-value exceeds
        this threshold.</dd>
        <dt>Number of motifs</dt>
        <dd>DREME stops if it has found this many motifs.  By default DREME
        does not limit the number of motifs to be found.</dd>
      </dl>
      <div class="pop_close">[ <a href="javascript:help_popup()">close</a> ]</div>
    </div>

    <div class="pop_content" style="display:none" id="pop_norc">
      <p>Checking this box instructs DREME to <b>NOT</b> check the reverse
      complement of the input sequences for motif sites when reading
      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>
    <!-- Content Starts -->
    <div class="content_box">
      <!--{header}-->
      <p>
      <!--{title}-->DREME<!--{/title}--> - <!--{subtitle}-->Discriminative Regular Expression Motif Elicitation<!--{/subtitle}--><br>
      <!--{logo}-->../doc/images/dreme_icon.png<!--{/logo}-->: <!--{alt}-->DREME Logo<!--{/alt}--><br>
      <!--{blurb}--><span class="blurb" data-id="dreme"></span><!--{/blurb}-->
      </p>
      <!--{/header}-->
      <form enctype="multipart/form-data" accept-charset="utf-8"
      method="POST" action="dreme" id="dreme_form">
        <fieldset>
          <legend>Data Submission Form</legend>
          <p class="meme">Perform motif discovery on DNA or RNA datasets for short regular expression motifs.</p> 
          <!-- mode -->
          <h2 class="meme">Select the type of control sequences to use</h2>
          <div class="subcontent">
            <input type="radio" name="discr" id="discr_off" value="0" checked>
            <label for="discr_off">Shuffled input sequences</label>
            <input type="radio" name="discr" id="discr_on" value="1">
            <label for="discr_on">User-provided sequences</label>
            <div class="help" data-topic="pop_discr"></div>
          </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 sequences<!--{/title}--><br>
          <!--{subtitle}-->Enter sequences in which you want to find motifs<!--{/subtitle}--><br>
          <!--{default}-->FILE<!--{/default}-->
          <!--{alphabets}-->DNA RNA<!--{/alphabets}-->
          <!--{min_seq_len}-->8<!--{/min_seq_len}-->
          <!--{min_seq_count}-->2<!--{/min_seq_count}-->
          <!--{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}-->DREME will find motifs that are enriched relative to these sequences.
<!--{/subtitle}--><br>
            <!--{default}-->FILE<!--{/default}-->
            <!--{alphabets}-->DNA RNA<!--{/alphabets}-->
            <!--{min_seq_len}-->8<!--{/min_seq_len}-->
            <!--{min_seq_count}-->2<!--{/min_seq_count}-->
            <!--{register}-->register_component<!--{/register}-->
            </p>
            <!--{/control}-->
          </div>

          <!--{job_details/}-->

          <!-- Advanced Options -->
          <div style="margin-top:5px; margin-bottom: 5px; width:90%;">
          <!--{advanced_options/}-->
          <div>
            <!-- limits -->
            <h3 class="meme top">How should the search be limited?</h3>
            <span class="selectopt pad">
              <input type="radio" name="srch_limit" id="enable_ethresh" value="enable_ethresh" checked>
              <label for="ethresh"><i>E</i>-value threshold:</label>
              <input class="meme numonly sz4" type="text" name="ethresh" id="ethresh" value="0.05" step="any" min="0" size="4">
              <input type="radio" name="srch_limit" id="enable_nmotifs" value="enable_nmotifs">
              <label for="nmotifs">motif count:</label>
              <input class="meme intonly sz2" type="number" name="nmotifs" id="nmotifs" value="10" step="1" min="1" size="2">
            </span>
            <div class="help" data-topic="pop_limit"></div>
            <!-- /limits -->
            <!-- norc -->
            <h3 class="meme top">Can motif sites be on both strands?</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>
            <!-- /norc -->
          </div>
          
          <!-- Search and clear buttons -->
          <!--{submit_reset/}-->
        </fieldset>
      </form>
      <!--{footer/}-->
    </div>
  </body>
</html>
