> ## Documentation Index
> Fetch the complete documentation index at: https://proto.evodesign.org/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# MEME Suite (FIMO)

> [FIMO](https://meme-suite.org/meme/doc/fimo.html) (Find Individual Motif Occurrences) is a tool from the [MEME Suite](https://meme-suite.org/) that scans DNA or protein sequences for occurrences of known motifs described as position weight matrices. This toolkit exposes FIMO through [pymemesuite](https://github.com/althonos/pymemesuite), a Cython binding to the MEME Suite C library, so scans run entirely in-process with no separate MEME installation required.

<div class="page-hero"><img class="page-hero-banner" src="https://proto-bio.github.io/proto-assets/images/tool/meme/hero.png" alt="MEME Suite (FIMO)" /><div class="tool-org-badges page-hero-badges"><a href="/docs/tools/organizations/university-of-nevada-reno" class="tool-org-badge" style={{background: "#003366"}} title="University of Nevada, Reno"><img src="https://mintcdn.com/bio-pro/rW-ZVHoYhZw2v7T_/assets/images/cached/5629497fc5f9.png?fit=max&auto=format&n=rW-ZVHoYhZw2v7T_&q=85&s=0152a7b2026578de05c05152d8d36b92" alt="" class="tool-org-badge-logo" width="330" height="108" data-path="assets/images/cached/5629497fc5f9.png" /> UNR</a> <a href="/docs/tools/organizations/university-of-washington" class="tool-org-badge" style={{background: "#4B2E83"}} title="University of Washington">UW</a> <a href="/docs/tools/organizations/university-of-queensland" class="tool-org-badge" style={{background: "#51247A"}} title="University of Queensland"><img src="https://mintcdn.com/bio-pro/rW-ZVHoYhZw2v7T_/assets/images/cached/a4e83fbbeb06.png?fit=max&auto=format&n=rW-ZVHoYhZw2v7T_&q=85&s=3378fc54f11fc74455207f45eee61ff4" alt="" class="tool-org-badge-logo" width="180" height="180" data-path="assets/images/cached/a4e83fbbeb06.png" /> UQ</a> <a href="/docs/tools/organizations/university-of-california-san-diego" class="tool-org-badge" style={{background: "#182B49"}} title="University of California, San Diego"><img src="https://mintcdn.com/bio-pro/rW-ZVHoYhZw2v7T_/assets/images/cached/ec1fd211cd18.png?fit=max&auto=format&n=rW-ZVHoYhZw2v7T_&q=85&s=a9bd8bd71144d343f19d8d950a5561d9" alt="" class="tool-org-badge-logo" width="330" height="332" data-path="assets/images/cached/ec1fd211cd18.png" /> UCSD</a></div></div>

<Note>
  **License:** MEME Suite (FIMO) is licensed under Custom (MEME Suite Academic License) and has restrictions around commercial use and may require explicit attribution when utilized. Please refer to [the license](https://github.com/althonos/pymemesuite/blob/main/vendor/meme/COPYING) for full terms.
</Note>

<p class="entity-disclaimer">Proto is not affiliated with University of Nevada, Reno, University of Washington, University of Queensland, and University of California, San Diego. This toolkit is open source and builds on the implementations produced by these organizations. Product names, logos, and trademarks are the property of their respective owners.</p>

<hr class="entity-rule" />

<input type="radio" name="tab-meme" id="none-meme" class="tab-radio-input" />

<input type="radio" name="tab-meme" id="github-meme" class="tab-radio-input" defaultChecked />

<input type="radio" name="tab-meme" id="website-meme" class="tab-radio-input" />

<input type="radio" name="tab-meme" id="paper-meme" class="tab-radio-input" />

<input type="radio" name="tab-meme" id="cite-meme" class="tab-radio-input" />

<input type="radio" name="tab-meme" id="source-meme" class="tab-radio-input" />

<input type="radio" name="tab-meme" id="notebook-meme" class="tab-radio-input" />

<input type="radio" name="tab-meme" id="proto-meme" class="tab-radio-input" />

<div class="tool-tab-bar">
  <span class="tool-tab-wrap"><label for="github-meme" class="tool-tab tab-open badge-github"><svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z" /></svg> GitHub</label><label for="none-meme" class="tool-tab tab-close badge-github"><svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z" /></svg> GitHub</label></span> <span class="tool-tab-wrap"><label for="website-meme" class="tool-tab tab-open badge-website"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10" /><path d="M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" /></svg> Website</label><label for="none-meme" class="tool-tab tab-close badge-website"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10" /><path d="M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" /></svg> Website</label></span> <span class="tool-tab-wrap"><label for="paper-meme" class="tool-tab tab-open badge-paper"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" /><polyline points="14 2 14 8 20 8" /><line x1="16" y1="13" x2="8" y2="13" /><line x1="16" y1="17" x2="8" y2="17" /><polyline points="10 9 9 9 8 9" /></svg> Publication</label><label for="none-meme" class="tool-tab tab-close badge-paper"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" /><polyline points="14 2 14 8 20 8" /><line x1="16" y1="13" x2="8" y2="13" /><line x1="16" y1="17" x2="8" y2="17" /><polyline points="10 9 9 9 8 9" /></svg> Publication</label></span> <span class="tool-tab-wrap"><label for="cite-meme" class="tool-tab tab-open badge-cite"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z" /><path d="M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z" /></svg> Cite</label><label for="none-meme" class="tool-tab tab-close badge-cite"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z" /><path d="M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z" /></svg> Cite</label></span> <span class="tool-tab-wrap"><label for="source-meme" class="tool-tab tab-open badge-source"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6" /><polyline points="8 6 2 12 8 18" /></svg> Tool Source</label><label for="none-meme" class="tool-tab tab-close badge-source"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6" /><polyline points="8 6 2 12 8 18" /></svg> Tool Source</label></span> <span class="tool-tab-wrap"><label for="notebook-meme" class="tool-tab tab-open badge-notebook"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z" /><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z" /></svg> Open as Notebook</label><label for="none-meme" class="tool-tab tab-close badge-notebook"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z" /><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z" /></svg> Open as Notebook</label></span> <span class="tool-tab-wrap"><label for="proto-meme" class="tool-tab tab-open badge-local"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="4 17 10 11 4 5" /><line x1="12" y1="19" x2="20" y2="19" /></svg> Run Locally</label><label for="none-meme" class="tool-tab tab-close badge-local"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="4 17 10 11 4 5" /><line x1="12" y1="19" x2="20" y2="19" /></svg> Run Locally</label></span>
</div>

<a href="https://github.com/althonos/pymemesuite" target="_blank" class="tab-panel github-panel" data-tab="github-meme">
  <div class="gh-card-wrap">
    <img src="https://opengraph.githubassets.com/1/althonos/pymemesuite" class="gh-card-img img-fallback" alt="althonos/pymemesuite" />

    <div class="gh-card-fallback">
      <div class="gh-fallback-org"><svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z" /></svg> althonos/pymemesuite</div>
    </div>
  </div>

  <span class="panel-goto-btn gh-goto-btn"><span><svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z" /></svg> View repo</span></span>
</a>

<a href="https://meme-suite.org/" target="_blank" class="tab-panel website-panel" data-tab="website-meme">
  <div class="website-info">
    <img src="https://www.google.com/s2/favicons?domain=meme-suite.org&sz=32" class="website-favicon" width="24" height="24" />

    <span class="website-url">meme-suite.org</span>
  </div>

  <span class="panel-goto-btn website-goto-btn"><span><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10" /><path d="M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" /></svg> Visit website</span></span>
</a>

<a href="https://doi.org/10.1093/bioinformatics/btr064" target="_blank" class="tab-panel paper-panel" data-tab="paper-meme">
  <div class="paper-info">
    <div class="paper-title">FIMO: scanning for occurrences of a given motif</div>
    <div class="paper-meta">Charles E. Grant, Timothy L. Bailey and William Stafford Noble</div>
    <div class="paper-meta paper-venue">Bioinformatics (2011)</div>
  </div>

  <span class="panel-goto-btn pub-goto-btn"><span><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" /><polyline points="14 2 14 8 20 8" /><line x1="16" y1="13" x2="8" y2="13" /><line x1="16" y1="17" x2="8" y2="17" /><polyline points="10 9 9 9 8 9" /></svg> Read paper</span></span>
</a>

<div class="tab-panel cite-panel" data-tab="cite-meme">
  <div class="cite-code-wrap">
    ```bibtex theme={null}
    @article{grant2011fimo,
      title={FIMO: scanning for occurrences of a given motif},
      author={Grant, Charles E. and Bailey, Timothy L. and Noble, William Stafford},
      journal={Bioinformatics},
      volume={27},
      number={7},
      pages={1017--1018},
      year={2011},
      publisher={Oxford University Press},
      doi={10.1093/bioinformatics/btr064}
    }
    ```
  </div>

  <span class="panel-goto-btn cite-copy-btn"><span><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z" /><path d="M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z" /></svg> Copy citation</span></span>
</div>

<a href="https://github.com/evo-design/proto-tools/tree/47e34afa5ea240a3b406e323dc38aa5dc85f223e/proto_tools/tools/gene_annotation/meme" target="_blank" class="tab-panel source-panel" data-tab="source-meme">
  <div class="source-info">
    <img src="https://github.com/evo-design.png?size=40" class="source-avatar" width="36" height="36" />

    <span class="source-path">evo-design/proto-tools<span class="source-subpath">/proto\_tools/tools/gene\_annotation/meme</span></span>
  </div>

  <span class="panel-goto-btn source-goto-btn"><span><svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor"><path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z" /></svg> View source</span></span>
</a>

<a href="https://github.com/evo-design/proto-tools/blob/47e34afa5ea240a3b406e323dc38aa5dc85f223e/proto_tools/tools/gene_annotation/meme/examples/example.ipynb" target="_blank" class="tab-panel notebook-panel" data-tab="notebook-meme">
  <div class="notebook-info">
    <span class="notebook-icon">
      <svg width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
        <path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z" />

        <path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z" />
      </svg>
    </span>

    <span class="notebook-label">Open Notebook</span>
  </div>

  <span class="panel-goto-btn notebook-goto-btn"><span><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z" /><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z" /></svg> Open notebook</span></span>
</a>

<div class="tab-panel proto-panel run-local-panel" data-tab="proto-meme">
  <a href="https://github.com/evo-design/proto-tools" target="_blank" class="run-local-preview">
    <img noZoom src="https://opengraph.githubassets.com/1/evo-design/proto-tools" alt="proto-tools on GitHub" />
  </a>

  <div class="run-local-install">
    <span class="run-local-label">Run locally with proto-tools</span>

    <div class="run-local-code">
      ```bash theme={null}
      pip install git+https://github.com/evo-design/proto-tools.git
      ```
    </div>
  </div>
</div>

<div class="entity-contributors"><span class="entity-contributors-label">Toolkit contributors</span><span class="entity-contributors-people"><a class="entity-contributor" href="https://github.com/bviggiano" target="_blank" rel="noopener" title="bviggiano: 6 commits"><img noZoom class="entity-contributor-avatar" src="https://avatars.githubusercontent.com/u/21143637?v=4&s=64" alt="" loading="lazy" /><span class="entity-contributor-login">bviggiano</span></a></span></div>

| Function               | Description                                                                 |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ---------------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `run_meme_fimo_scan()` | Scan sequences for occurrences of known motifs (PWMs) using MEME Suite FIMO | <a href="#api-run-meme-fimo-scan" class="func-table-btn func-api-btn"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20" /></svg> Docs</a> <a href="https://github.com/evo-design/proto-tools/blob/47e34afa5ea240a3b406e323dc38aa5dc85f223e/proto_tools/tools/gene_annotation/meme/meme_fimo_scan.py#L218" target="_blank" class="func-table-btn func-source-btn"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6" /><polyline points="8 6 2 12 8 18" /></svg> Source</a> |

## Background

[FIMO](https://meme-suite.org/meme/doc/fimo.html) ([Grant, Bailey & Noble, 2011](https://doi.org/10.1093/bioinformatics/btr064)) treats a motif as a [position weight matrix](https://en.wikipedia.org/wiki/Position_weight_matrix) (PWM) and slides it across every position of each target sequence. At each position it computes a log-odds [score](https://en.wikipedia.org/wiki/Log_odds) of the windowed subsequence under the motif model versus a background nucleotide (or amino-acid) distribution, then converts that score to a [p-value](https://en.wikipedia.org/wiki/P-value) using the exact null distribution of scores for the motif. Because many positions across many sequences and motifs are tested, FIMO also reports a Benjamini-Hochberg [q-value](https://en.wikipedia.org/wiki/False_discovery_rate) so that hits can be filtered at a controlled [false discovery rate](https://en.wikipedia.org/wiki/False_discovery_rate).

Motifs are supplied in [MEME format](https://meme-suite.org/meme/doc/meme-format.html), the text PWM format shared across the MEME Suite, and large curated collections such as the [JASPAR](https://jaspar.elixir.no/) transcription-factor database publish their matrices in this format directly. For nucleotide motifs FIMO scans both the given strand and its reverse complement by default, since a regulatory motif may occur on either DNA strand; protein and strand-specific scans disable the reverse strand. Coordinates of each match are reported as 1-indexed, inclusive intervals to match biological residue selection conventions. [pymemesuite](https://github.com/althonos/pymemesuite) preserves the FIMO scoring algorithm exactly while returning structured per-match results in Python.

### Learning Resources

* [FIMO documentation](https://meme-suite.org/meme/doc/fimo.html) (The MEME Suite) - the canonical reference for FIMO's inputs, p-value/q-value statistics, threshold options, and output columns.
* [MEME motif format guide](https://meme-suite.org/meme/doc/meme-format.html) (The MEME Suite) - describes the text PWM format FIMO consumes, including how to convert matrices from other databases.
* [JASPAR](https://jaspar.elixir.no/) (JASPAR Consortium) - the standard open-access database of curated transcription-factor binding profiles, downloadable as MEME-format motifs ready to feed to FIMO.

## Tools

<a name="api-run-meme-fimo-scan" />

<div class="tool-section-card">
  ### MEME FIMO Motif Scan (`meme-fimo-scan`)

  Scans one or more target sequences against every position weight matrix in a MEME-format motif file and returns each occurrence with its motif id, 1-indexed coordinates, strand, log-odds score, p-value, and q-value.

  #### API Reference

  <div class="api-model-section api-input-section">
    <a href="https://github.com/evo-design/proto-tools/blob/47e34afa5ea240a3b406e323dc38aa5dc85f223e/proto_tools/tools/gene_annotation/meme/meme_fimo_scan.py#L71" target="_blank" class="func-table-btn func-source-btn api-model-source"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6" /><polyline points="8 6 2 12 8 18" /></svg> Source</a>

    <Accordion title="Input: MEMEFimoScanInput">
      <ParamField path="sequences" type="List[string]" required>
        Target sequences to scan for motif occurrences. A single sequence string is normalized to a one-element list.
      </ParamField>

      <ParamField path="motifs" type="string | string" required>
        Path to a MEME-format motif file (`.meme`) of position weight matrices, e.g. exported from JASPAR. `AssetRef` supported.
      </ParamField>
    </Accordion>
  </div>

  <div class="api-model-section api-config-section">
    <a href="https://github.com/evo-design/proto-tools/blob/47e34afa5ea240a3b406e323dc38aa5dc85f223e/proto_tools/tools/gene_annotation/meme/meme_fimo_scan.py#L111" target="_blank" class="func-table-btn func-source-btn api-model-source"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6" /><polyline points="8 6 2 12 8 18" /></svg> Source</a>

    <Accordion title="Config: MEMEFimoScanConfig">
      <ParamField path="threshold" type="number" default="0.0001">
        Report only matches with a p-value at or below this cutoff (FIMO `--thresh`). Default 1e-4.
      </ParamField>

      <ParamField path="both_strands" type="boolean" default="True">
        Scan both the given and reverse-complement strands. Set False for single-strand scans (FIMO `--norc` disables the reverse strand). Automatically ignored for protein / non-complementable motifs, which are always scanned forward-only. Default True.
      </ParamField>

      <ParamField path="verbose" type="integer" default="0">
        Verbosity level (0=quiet, 1=info, 2=debug, 3=raw subprocess stderr). `True` is coerced to `1` and `False` to `0`.
      </ParamField>

      <ParamField path="device" type="string" default="cpu">
        Device to run the tool on.
      </ParamField>

      <ParamField path="timeout" type="integer" default="3600">
        Maximum execution time in seconds. `None` waits indefinitely.
      </ParamField>

      <ParamField path="seed" type="integer">
        Random seed. When set, tools run reproducibly up to small GPU float noise (see `BaseToolOutput.approx_equal`), and the seed participates in cache keys. When None, cacheable seed-sensitive tools skip cache until seeded.
      </ParamField>
    </Accordion>
  </div>

  <div class="api-model-section api-output-section">
    <a href="https://github.com/evo-design/proto-tools/blob/47e34afa5ea240a3b406e323dc38aa5dc85f223e/proto_tools/tools/gene_annotation/meme/meme_fimo_scan.py#L141" target="_blank" class="func-table-btn func-source-btn api-model-source"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="16 18 22 12 16 6" /><polyline points="8 6 2 12 8 18" /></svg> Source</a>

    <Accordion title="Output: MEMEFimoScanOutput">
      <ResponseField name="results" type="List[FimoSequenceMatches]">
        One entry per input sequence, positionally aligned to `MEMEFimoScanInput.sequences` — `results[i]` holds the matches found in sequence `i` (empty if none).

        <Expandable title="FimoSequenceMatches">
          <ResponseField name="matches" type="List[FimoMatch]">
            Occurrences in this sequence, across all motifs.
          </ResponseField>
        </Expandable>
      </ResponseField>
    </Accordion>
  </div>

  #### Applications

  Use this when the question is "where does motif X occur in these sequences." Typical workflows include locating transcription-factor binding sites in promoters or enhancers, screening a designed regulatory library for unwanted or intended motif occurrences, and annotating candidate sites for downstream filtering on score or q-value.

  #### Usage Tips

  * **`threshold` is the p-value cutoff and is the main sensitivity parameter.** It defaults to `1e-4`, reproducing FIMO's command-line default (`--thresh`); only matches with a p-value at or below this value are reported. Loosen it (e.g. `1e-3`) to recover weaker sites at the cost of more false positives, or tighten it for stringent calls. The reported q-value gives the false discovery rate for filtering after the scan.
  * **`both_strands` controls strand coverage for nucleotide motifs.** It defaults to `True`, scanning the forward strand and its reverse complement (the right choice for DNA/RNA motifs, which can bind on either strand). Set it to `False` for single-strand scans (this maps to FIMO's `--norc`). For protein and other non-complementable motifs the reverse complement is meaningless, so it is ignored automatically and scanning is always forward-only — matching the FIMO CLI.
  * **Motifs come from MEME-format files, such as those exported from JASPAR.** Supply a `.meme` PWM file; matrices from JASPAR and other databases can be converted to this format. The scan iterates over every motif in the file against every target sequence.
</div>

## Toolkit Notes

These apply to the MEME FIMO tool in this toolkit (`meme-fimo-scan`).

* **Runs on CPU.** FIMO scanning is a CPU operation; `pymemesuite` compiles the MEME Suite C library into its wheel, so there is no GPU acceleration to enable and no separate MEME install or PATH lookup is needed.
* **Motifs are user-supplied.** FIMO ships no motif database; provide your own MEME-format PWM file (e.g. exported from [JASPAR](https://jaspar.elixir.no/)) via `motifs`. Every motif in the file is scanned against every target sequence.
* **Results are returned per input sequence.** `results[i]` holds the matches found in input sequence `i`, positionally aligned to the input — a sequence with no occurrences yields an empty bundle. Scanning is deterministic — identical inputs return identical matches on repeated calls.

<Tip>
  **Example notebook:** See the [full working example](https://github.com/evo-design/proto-tools/blob/47e34afa5ea240a3b406e323dc38aa5dc85f223e/proto_tools/tools/gene_annotation/meme/examples/example.ipynb) for a copy-paste-ready walkthrough.
</Tip>

## Infrastructure Guides

The following guides cover how to run tools efficiently and at scale.

<CardGroup cols={2}>
  <Card title="Tool Persistence" icon="repeat" href="/docs/tools/guides/tool-persistence">Keep a tool's model warm across calls instead of reloading it every invocation.</Card>
  <Card title="Device Management" icon="cpu" href="/docs/tools/guides/device-management">How GPUs are allocated to tools and how to target specific devices.</Card>
  <Card title="Parallel Execution" icon="layers" href="/docs/tools/guides/parallel-execution">Fan a batch of inputs out across multiple GPUs.</Card>
</CardGroup>
