<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>CentriMo - 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_motifs.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/motif_logo.js"></script>
    <script src="../doc/js/utilities.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/motif_parser.js"></script>
    <script src="../js/bg_parser.js"></script>
    <script src="../js/component_motifs.js"></script>
    <script src="../js/component_sequences.js"></script>
    <script src="../js/component_bfile.js"></script>
    <script src="../js/centrimo.js"></script>
    <style>
      div.wide {
        width: 500px;
      }
    </style>
  </head>
  <body>
    <!-- Help Popups -->
    <div class="pop_content wide" id="pop_local">
      <dl>
        <dt><b>Centrally</b></dt> 
        <dd>
          <ul>
            <li>Choose this mode to look for motifs that are enriched
            in the centers of your sequences relative to their flanks. 
            <li>This mode is appropriate for ChIP-seq and other types of data where you expect
            the distribution of motifs to be symmetrical around the sequence centers.
          </ul>
        </dt>
        <dt><b>Anywhere</b></dt> 
        <dd>
          <ul>
            <li>Choose this mode to look for motifs that are enriched in
            some confined (local) region along the sequences.  
            <li>This mode is appropriate when your sequences are all aligned on a genomic 
            landmark such as transcription start sites or splice junctions and you expect that motifs may be enriched
            at specifc locations relative to the genomic landmark.  
            <li>This mode can also detect centrally enriched motifs, but will have lower statistical power due
            to more multiple tests being performed.
          </ul>
        </dd>
      <dl>
      <div class="pop_close">[ <a href="javascript:help_popup()">close</a> ]</div>
    </div>

    <div class="pop_content wide" id="pop_compare">
      <dl>
        <dt><b>Absolute (single dataset)</b></dt>
        <dd>
          <ul>
            <li>Choose this mode if you have just one set of sequences to search for
            enriched motifs.
            <li>In this mode, CentriMo uses the binomial test 
            to determine if the number of sequences that have their best
            matches to a motif in a given region is greater than expected given
            that matches should be uniformly distributed along the sequence.
          </ul>
        </dd>
        <dt><b>Absolute and Differential (two datasets)</b></dt>
        <dd>
          <ul>
            <li>Choose this mode if you would also like to find motifs that are more 
            locally enriched in the first set of sequences compared to the second set.
            <li>When you choose this mode, you will be able to view the motifs sorted by either 
            absolute enrichment (E-value) or by differential enrichment (Fisher E-value) via the <code>Sort</code> 
            menu on CentriMo's report.
            <li>CentriMo first determines the regions of localized enrichment in the
            primary set of sequences for a given motif as in <b>Absolute</b> mode, 
            and then it computes the <b>differential</b> enrichment of those regions.
            <li>For differential enrichment, CentriMo uses Fisher's exact test
            to determine if the number of best matches to the motif in the region
            in the primary sequences is surpringly higher than the number of best matches
            in the same region of the control sequences.  
          </ul>
        </dd>
      <dl>
      <div class="pop_close">[ <a href="javascript:help_popup()">close</a> ]</div>
    </div>

    <div class="pop_content" id="pop_sequences" >
      <p>Use the menu below to choose how you wish to input your primary sequences.</p>
      <p><b>Note 1:</b> All sequences should be the <b>same length</b>.
        Suggested lengths are 500-bp for ChIP-seq, 100-bp for CLIP-seq and 1000bp for promoter regions.
      <p><b>Note 2:</b> You must convert your RNA sequences to the DNA alphabet (<tt>U</tt> to <tt>T</tt>)
      for use with CentriMo.</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/centrimo_example_output_files/centrimo.html">sample output</a>
      to get an idea of input that works well for CentriMo.</p>
      <div class="pop_close">[ <a href="javascript:help_popup()">close</a> ]</div>
    </div>

    <div class="pop_content" id="pop_comparative" >
      <p>Use the menu below to choose how you wish to input your control sequences.</p>
      <p><b>Note 1:</b> All sequences should be the same length as the primary sequences.</p>
      <p><b>Note 2:</b> You must convert your RNA sequences to the DNA alphabet (<tt>U</tt> to <tt>T</tt>)
      for use with CentriMo.</p>
      <p>See the <a href="@SITE_URL@/doc/examples/example-datasets/Klf1.fna"
      >example DNA sequences</a> 
      to get an idea of input that works well for CentriMo.</p>
      <div class="pop_close">[ <a href="javascript:help_popup()">close</a> ]</div>
    </div>

    <div class="pop_content" id="pop_motifs">
      <p>Using the menu below, select the way you want to input motifs that
        will be tested for enrichment in your input sequences.
        Use the first menu below to choose how you want to input the motifs, and
        the second menu to choose the particular motif database you require.</p>
      <div class="pop_close">[ <a href="javascript:help_popup()">close</a> ]</div>
    </div>

    <div class="pop_content" id="pop_background">
      <p>The background model normalizes for biased distribution of
      individual letters in your sequences.
      By default CentriMo will create a 0-order Markov sequence model from 
      the letter frequencies in the primary input sequences.
      You may also choose to use a uniform background model or to use
      the background model specified by the motifs.</p>
      <p>Alternately you may select "Upload background" and input a file containing
      a <a href="../doc/bfile-format.html">background model</a>.</p>
      <p>The downloadable version of the MEME Suite contains a script named
      "fasta-get-markov" that you can use to create sequence model files in
      the correct format from a FASTA sequence file.</p>
      <div class="pop_close">[ <a href="javascript:help_popup()">close</a> ]</div>
    </div>

    <div class="pop_content wide" id="pop_strands">
      <dl>
        <dt><b>match either strand</b></dt>
        <dd>
          <ul>
            <li>Choose this mode if your sequences are DNA and you want CentriMo
            to consider motif matches on either strand to be equivalent.
            <li>This mode is usually appropriate for ChIP-seq and similar data.
          </ul>
        </dd>
        <dt><b>match given strand only</b></dt>
        <dd>
          <ul>
            <li>Choose this mode if your sequences are RNA or if you want to
            CentriMo to ignore motif matches on the reverse-complement strand of DNA sequences.
            <li>This mode is usually appropriate with CLIP-seq and similar data.
          </ul>
        </dd>
        <dt><b>separately</b></dt>
        <dd>
          <ul>
            <li>Choose this mode if you want to treat matches on the reverse-complement
            strand separately from those on the given strand.
            <li>CentriMo will produce separate site distribution plots for each motif
            and its reverse-complement.
            <li>This mode is is useful when your sequences have strand information,
            such as when they are promoter regions.
          </ul>
        </dd>
        <dt><b>reflected</b></dt>
        <dd>
          <ul>
            <li>Choose this mode if you think the positions of motif matches on the reverse-complement strand should
            be reflected around the sequence centers.  
            <li>This mode is useful with ChIP-seq data for detecting the presence
            of (non-palindromic) motifs for co-factors--transcription factors other than the one that was ChIP-ed.
          </ul>
        </dd>
      </dl>
      <div class="pop_close">[ <a href="javascript:help_popup()">close</a> ]</div>
    </div>

    <div class="pop_content wide" id="pop_score">
      <dl>
      <dt><b>score &ge;</b></dt>
      <dd>
        <ul>
          <li>Increase the match score threshold if want CentriMo to ignore
          weaker matches to motifs, or decrease it to include them in the analysis.
          <li>Sequences with no match to a given motif above the match score threshold are ignored
          in computating that motif's enrichment.
        </ul>
      </dd>
      <dt><b>optimize score</b></dt>
      <dd>
        <ul>
          <li>Select option this if you want CentriMo to find the optimal match score threshold. 
          <li>Independently for each motif, CentriMo will consider all thresholds 
          above <b>0</b> and will choose the one
          that maximizes the statistical significance of the motif's enrichment.
          <li>This option increases running time and can reduce statistical power
          due to increased multiple tests.
      </dd>
      <div class="pop_close">[ <a href="javascript:help_popup()">close</a> ]</div>
    </div>

    <div class="pop_content" id="pop_max_region">
      <p>Check this option and specify the maximum width for enriched
      regions if you have prior knowledge of what is a reasonable limit.</p>
      <p>By default CentriMo considers regions up to one minus the maximum
      number of places that a given motif will fit in a sequence.</p>
      <p>Reducing the maximum width increases the statistical power of CentriMo.
      and can help cut-down the multiple testing correction.</p>
      <div class="pop_close">[ <a href="javascript:help_popup()">close</a> ]</div>
    </div>

    <div class="pop_content" id="pop_evalue_threshold">
      <p>Reduce the <i>E</i>-value threshold if you want CentriMo to report
      only more significant motif enrichments; increase it to include less significant motif enrichments in the report.</p>
      <p>Setting the <i>E</i>-value threshold to the number of motifs in the input database
      will cause CentriMo to report a result for every motif.</p>
      <p>Note that if there are multiple, overlapping enriched regions, then CentriMo
      reports the most significant overlapping region.</p>
      <div class="pop_close">[ <a href="javascript:help_popup()">close</a> ]</div>
    </div>

    <div class="pop_content" id="pop_store_ids">
      <p>Disable this option if you don't want CentriMo to store sequence identifiers 
      in its output file.</p>
      <p>Disabling this option will make the CentriMo output file smaller, but the 
      CentriMo output will not be able to interactively show you the sizes of the intersection and union 
      sets of sequences matching the motifs you select.</p>
      <div class="pop_close">[ <a href="javascript:help_popup()">close</a> ]</div>
    </div>

    <!--{help/}-->
    <div class="content_box">
      <!--{header}-->
      <p>
      <!--{title}-->CentriMo<!--{/title}--> - <!--{subtitle}-->Local Motif Enrichment Analysis<!--{/subtitle}--><br>
      <!--{logo}-->../doc/images/centrimo_icon.png<!--{/logo}-->: <!--{alt}-->CentriMo Logo<!--{/alt}--><br>
      <!--{blurb}--><span class="blurb" data-id="centrimo"></span><!--{/blurb}-->
      </p>
      <!--{/header}-->
      <form enctype="multipart/form-data" accept-charset="utf-8"
      method="POST" action="centrimo" id="centrimo_form">
        <fieldset>
          <legend>Data Submission Form</legend>
          <p class="meme">Perform local motif enrichment analysis.</p> 

          <!-- enrichment location -->
          <h2 class="meme">Select the kind of local motif enrichment to search for</h2>
          <div class="subcontent">
            <input type="radio" class="meme" name="local" id="local_off" value="0" checked>
            <label for="local_off">Central</label>
            <input type="radio" class="meme" name="local" id="local_on" value="1">
            <label for="local_on">Anywhere</label>
            <div class="help" data-topic="pop_local"></div>
          </div>
          <!-- /enrichment location -->

          <!-- enrichment method-->
          <h2 class="meme">Select whether to perform differential enrichment analysis</h2>
          <div class="subcontent">
            <input type="radio" class="meme" name="compare" id="compare_off" value="0" checked>
            <label for="compare_off">Absolute (single dataset)</label>
            <input type="radio" class="meme" name="compare" id="compare_on" value="1">
            <label for="compare_on">Absolute and Differential (two datasets)</label>
            <div class="help" data-topic="pop_compare"></div>
          </div>
          <!-- /enrichment method -->

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

          <!--{sequences}-->
          <!--{prefix}-->sequences<!--{/prefix}-->
          <!--{description}-->sequences<!--{/description}-->
          <!--{title}-->Input the primary sequences<!--{/title}-->
          <!--{subtitle}-->Enter the nucleotide sequences you want to search for enriched motifs.<!--{/subtitle}-->
          <!--{default}-->FILE<!--{/default}-->
          <!--{register}-->register_component<!--{/register}-->
          <!--{/sequences}-->

          <!-- comparative sequences -->
          <div id="compare_sequences_area" style="display:none">
          <!--{comparative}-->
          <!--{prefix}-->control_sequences<!--{/prefix}-->
          <!--{description}-->control sequences<!--{/description}-->
          <!--{title}-->Input the control sequences<!--{/title}-->
          <!--{subtitle}-->Enter the control sequences for differential enrichment analysis.<!--{/subtitle}-->
          <!--{default}-->FILE<!--{/default}-->
          <!--{alphabets}-->DNA RNA<!--{/alphabets}-->
          <!--{register}-->register_component<!--{/register}-->
          <!--{/comparative}-->
          </div>
          <!-- /comparative sequences -->

          <!--{motifs}-->
          <!--{prefix}-->motifs<!--{/prefix}-->
          <!--{description}-->motifs<!--{/description}-->
          <!--{title}-->Input the motifs<!--{/title}-->
          <!--{subtitle}-->Select a <a href="../db/motifs">motif database</a> or enter the motifs you wish to test for enrichment.<!--{/subtitle}-->
          <!--{default}-->DATABASE<!--{/default}-->
          <!--{alphabets}-->DNA RNA<!--{/alphabets}-->
          <!--{enable_db/}-->
          <!--{register}-->register_component<!--{/register}-->
          <!--{/motifs}-->

          <!--{job_details/}-->

          <!-- Advanced Options -->
          <div style="margin-top:5px; margin-bottom: 5px; width:80%;">
            <!--{advanced_options/}-->
            <div>
              <h3 class="meme">Select how to treat the reverse-complement strand</h3>
              <select class="meme" name="strands" id="strands">
                <option value="both" selected>match either strand</option>
                <option value="given">match given strand only</option>
                <option value="both_separately">separately</option>
                <option value="both_flip">reflected</option>
              </select>
              <div class="help" data-topic="pop_strands"></div>
              
              <h3 class="meme">Choose the match score threshold (bits)</h3>
	      <span class="selectopt pad">
		<input type="radio" name="score" id="enable_min_score" value="enable_min_score" checked>
                <label for="min_score">score &ge;</label>
                <input class="meme numonly sz3" type="text" id="min_score" name="min_score" size="3" value="5" step="any">
		<input type="radio" name="score" id="enable_opt_score" value="enable_opt_score" style="margin-left:20px;">
                <label for="opt_score">optimize score</label>
                <div class="help" data-topic="pop_score"></div>
	      </span>

              <h3 class="meme">Set the maximum width of enriched regions</h3>
              <span class="enabopt">
              <input class="meme" type="checkbox" id="use_max_region"
              name="use_max_region" value="1">
              <label for="max_region">region width &le;</label>
              <input class="meme intonly sz5" type="number" id="max_region" 
              name="max_region" value="200" step="1" min="1" size="5">
              </span>
              <div class="help" data-topic="pop_max_region"></div>
              
              <h3 class="meme">Set the <i>E</i>-value threshold for reporting enriched regions</h3>
              <label for="evalue_threshold"><i>E</i>-value &le;</label>
              <input class="meme numonly sz5" type="text" id="evalue_threshold"
                  name="evalue_threshold" size="5" value="10" min="0" step="any">
              <div class="help" data-topic="pop_evalue_threshold"></div>
              
              <h3 class="meme">Include/supress sequence IDs</h3>
              <input class="meme" type="checkbox" name="store_ids" id="store_ids" value="1" checked>
              <label for="store_ids">Include a list of matching sequence ids</label>
              <div class="help" data-topic="pop_store_ids"></div>

              <!--{bfile}-->
                <!--{prefix}-->background<!--{/prefix}-->
                <!--{enable_zero_order/}-->
		<!--{enable_uniform/}-->
		<!--{enable_meme/}-->
                <!--{enable_upload/}-->
                <!--{selected}-->zero<!--{/selected}-->
                <!--{register}-->register_component<!--{/register}-->
              <!--{/bfile}-->
            </div>
          </div>
          <!--{submit_reset/}-->
        </fieldset>
      </form>
      <!--{footer/}-->
    </div>
  </body>
</html>
