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

# Malinois

> Malinois is the CODA/BODA2 convolutional neural network for predicting MPRA-measured regulatory DNA activity from 200 bp inserts. This toolkit scores sequences in K562, HepG2, and SK-N-SH cell contexts and exposes a differentiable activity-gradient call for sequence design.

<div class="page-hero"><img class="page-hero-banner" src="https://proto-bio.github.io/proto-assets/images/tool/malinois/hero.png" alt="Malinois" /><div class="tool-org-badges page-hero-badges"><a href="/docs/tools/organizations/broad-institute" class="tool-org-badge" style={{background: "#0E6BA8"}} title="Broad Institute"><img src="https://mintcdn.com/bio-pro/UeudeF7pW-Dj-pIN/assets/images/cached/bddd3f7a9c3d.png?fit=max&auto=format&n=UeudeF7pW-Dj-pIN&q=85&s=5466c361c59d5211ef8491a58019cbaa" alt="" class="tool-org-badge-logo" width="200" height="200" data-path="assets/images/cached/bddd3f7a9c3d.png" /> Broad Institute</a> <a href="/docs/tools/organizations/the-jackson-laboratory" class="tool-org-badge" style={{background: "#00558C"}} title="The Jackson Laboratory"><img src="https://mintcdn.com/bio-pro/UeudeF7pW-Dj-pIN/assets/images/cached/3f39871e93d0.png?fit=max&auto=format&n=UeudeF7pW-Dj-pIN&q=85&s=f15df9c789b688eb105eeccc3f744c03" alt="" class="tool-org-badge-logo" width="200" height="200" data-path="assets/images/cached/3f39871e93d0.png" /> The Jackson Laboratory</a> <a href="/docs/tools/organizations/yale-university" class="tool-org-badge" style={{background: "#00356B"}} title="Yale University"><img src="https://mintcdn.com/bio-pro/UeudeF7pW-Dj-pIN/assets/images/cached/94cec05156be.png?fit=max&auto=format&n=UeudeF7pW-Dj-pIN&q=85&s=2926566568a1ade9758877d14519ec9c" alt="" class="tool-org-badge-logo" width="200" height="200" data-path="assets/images/cached/94cec05156be.png" /> Yale University</a></div></div>

<Note>
  **License:** Malinois is open source and free for academic and commercial use under an MIT license and may require explicit attribution when utilized. Please refer to [the license](https://github.com/sjgosai/boda2/blob/main/LICENSE.mit) for full terms.
</Note>

<p class="entity-disclaimer">Proto is not affiliated with Broad Institute, The Jackson Laboratory, and Yale University. 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-malinois" id="none-malinois" class="tab-radio-input" />

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

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

<input type="radio" name="tab-malinois" id="preprint-malinois" class="tab-radio-input" />

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

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

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

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

<div class="tool-tab-bar">
  <span class="tool-tab-wrap"><label for="github-malinois" 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-malinois" 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="paper-malinois" 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-malinois" 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="preprint-malinois" class="tool-tab tab-open badge-preprint"><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> Preprint</label><label for="none-malinois" class="tool-tab tab-close badge-preprint"><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> Preprint</label></span> <span class="tool-tab-wrap"><label for="cite-malinois" 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-malinois" 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-malinois" 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-malinois" 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-malinois" 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-malinois" 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-malinois" class="tool-tab tab-open badge-proto"><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="M13 2L3 14h9l-1 8 10-12h-9l1-8z" /></svg> Open on Proto</label><label for="none-malinois" class="tool-tab tab-close badge-proto"><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="M13 2L3 14h9l-1 8 10-12h-9l1-8z" /></svg> Open on Proto</label></span>
</div>

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

    <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> sjgosai/boda2</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://doi.org/10.1038/s41586-024-08070-z" target="_blank" class="tab-panel paper-panel" data-tab="paper-malinois">
  <div class="paper-info">
    <div class="paper-title">Machine-guided design of cell-type-targeting cis-regulatory elements</div>
    <div class="paper-meta">Sager J. Gosai, Rodrigo I. Castro, ... Ryan Tewhey</div>
    <div class="paper-meta paper-venue">Nature (2024)</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>

<a href="https://doi.org/10.1101/2023.08.08.552077" target="_blank" class="tab-panel preprint-panel" data-tab="preprint-malinois">
  <div class="paper-info">
    <div class="paper-title">Machine-guided design of synthetic cell type-specific cis-regulatory elements</div>
    <div class="paper-meta">SJ Gosai, R. Castro, ... R. Tewhey</div>
    <div class="paper-meta paper-venue">bioRxiv (2023)</div>
  </div>

  <span class="panel-goto-btn preprint-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 preprint</span></span>
</a>

<div class="tab-panel cite-panel" data-tab="cite-malinois">
  <div class="cite-code-wrap">
    ```bibtex theme={null}
    @article{gosai2024machine,
      title={Machine-guided design of cell-type-targeting cis-regulatory elements},
      author={Gosai, Sager J. and Castro, Rodrigo I. and Fuentes, Natalia and Butts, John C. and Mouri, Kousuke and Alasoadura, Michael and Kales, Susan and Nguyen, Thanh Thanh L. and Noche, Ramil R. and Rao, Arya S. and Joy, Mary T. and Sabeti, Pardis C. and Reilly, Steven K. and Tewhey, Ryan},
      journal={Nature},
      volume={634},
      pages={1211--1220},
      year={2024},
      doi={10.1038/s41586-024-08070-z},
      url={https://doi.org/10.1038/s41586-024-08070-z}
    }

    @misc{gosai2024machine_zenodo,
      title={Machine-guided design of cell-type-targeting cis-regulatory elements},
      author={Gosai, Sager and Castro, Rodrigo and Fuentes, Natalia and Butts, John and Mouri, Kousuke and Alasoadura, Michael and Kales, Susan and Nguyen, Thanh Thanh and Noche, Ramil and Rao, Arya and Joy, Mary Teena and Sabeti, Pardis and Reilly, Steven and Tewhey, Ryan},
      year={2024},
      publisher={Zenodo},
      version={1.0},
      doi={10.5281/zenodo.10698014},
      url={https://doi.org/10.5281/zenodo.10698014},
      note={Supplemental data and resources for the Nature article, including the Malinois model artifact}
    }
    ```
  </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/sequence_scoring/malinois" target="_blank" class="tab-panel source-panel" data-tab="source-malinois">
  <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/sequence\_scoring/malinois</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/sequence_scoring/malinois/examples/example.ipynb" target="_blank" class="tab-panel notebook-panel" data-tab="notebook-malinois">
  <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" data-tab="proto-malinois">
  <div class="proto-info">
    <div class="proto-cloud">
      <svg class="proto-cloud-bg" viewBox="0 0 640 512" xmlns="http://www.w3.org/2000/svg">
        <path d="M0 336c0 79.5 64.5 144 144 144H512c70.7 0 128-57.3 128-128c0-61.9-44-113.6-102.4-125.4c4.1-10.7 6.4-22.4 6.4-34.6c0-53-43-96-96-96c-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32C167.6 32 96 103.6 96 192c0 2.7 .1 5.4 .2 8.1C40.2 219.8 0 273.2 0 336z" />
      </svg>

      <img noZoom src="https://mintcdn.com/bio-pro/KVh0EKV-IKblvXR8/assets/logo/evo-logo-light.svg?fit=max&auto=format&n=KVh0EKV-IKblvXR8&q=85&s=0cb66034ba45618505501aee6ea5f5c1" class="proto-panel-logo block dark:hidden" alt="Proto" width="198" height="151" data-path="assets/logo/evo-logo-light.svg" />

      <img noZoom src="https://mintcdn.com/bio-pro/KVh0EKV-IKblvXR8/assets/logo/evo-logo-dark.svg?fit=max&auto=format&n=KVh0EKV-IKblvXR8&q=85&s=2c9e23a14635e60384a434e220788f54" class="proto-panel-logo hidden dark:block" alt="Proto" width="198" height="151" data-path="assets/logo/evo-logo-dark.svg" />
    </div>
  </div>

  <div class="proto-actions">
    <a href="https://proto.evodesign.org/tools/malinois-gradient" target="_blank" class="proto-action-btn"><span>Malinois Gradient</span><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="7" y1="17" x2="17" y2="7" /><polyline points="7 7 17 7 17 17" /></svg></a>
    <a href="https://proto.evodesign.org/tools/malinois-score" target="_blank" class="proto-action-btn"><span>Malinois MPRA Score</span><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="7" y1="17" x2="17" y2="7" /><polyline points="7 7 17 7 17 17" /></svg></a>
  </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: 7 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><a class="entity-contributor" href="https://github.com/dguo8412" target="_blank" rel="noopener" title="dguo8412: 4 commits"><img noZoom class="entity-contributor-avatar" src="https://avatars.githubusercontent.com/u/46211285?v=4&s=64" alt="" loading="lazy" /><span class="entity-contributor-login">dguo8412</span></a><a class="entity-contributor" href="https://github.com/brianhie" target="_blank" rel="noopener" title="brianhie: 2 commits"><img noZoom class="entity-contributor-avatar" src="https://avatars.githubusercontent.com/u/6365340?v=4&s=64" alt="" loading="lazy" /><span class="entity-contributor-login">brianhie</span></a></span></div>

| Function                  | Description                                                                                     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ------------------------- | ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `run_malinois_gradient()` | Compute differentiable Malinois MPRA activity losses and gradients for relaxed DNA logits (GPU) | <a href="#api-run-malinois-gradient" 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/sequence_scoring/malinois/malinois_score.py#L722" 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> |
| `run_malinois_score()`    | Score regulatory DNA activity using the Malinois MPRA model (GPU)                               | <a href="#api-run-malinois-score" 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/sequence_scoring/malinois/malinois_score.py#L650" 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

Malinois is the regulatory sequence model used in CODA ([Gosai et al., 2024](https://doi.org/10.1038/s41586-024-08070-z)) for machine-guided design of cell-type-targeting cis-regulatory elements. The model adapts the Basset-style convolutional architecture to MPRA data and predicts activity from a fixed 200 nucleotide insert after adding the assay flanks expected by the published checkpoint.

The model returns one raw activity value for each supported cell context: K562, HepG2, and SK-N-SH. The scoring wrapper averages forward and reverse-complement predictions and returns selected raw outputs. The gradient wrapper applies max/min sigmoid objective terms to these raw scores and backpropagates through relaxed A,C,G,T logits, matching the Fast SeqProp-style design path used for regulatory DNA optimization.

## Tools

<a name="api-run-malinois-score" />

<div class="tool-section-card tool-section-card--score">
  ### Malinois Score (`malinois-score`)

  Scores one or more 200 bp DNA inserts and returns raw Malinois predictions keyed by requested cell type.

  #### API Reference

  <div class="api-model-section api-input-section">
    <a href="https://github.com/evo-design/proto-tools/blob/47e34afa5ea240a3b406e323dc38aa5dc85f223e/proto_tools/tools/sequence_scoring/malinois/malinois_score.py#L77" 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: MalinoisScoreInput">
      <ParamField path="sequences" type="List[string]" required>
        DNA insert sequence(s) to score. A single string is normalized to a one-item list. Sequences must contain only A, C, G, and T; the configured `seq_length` is checked at run time.
      </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/sequence_scoring/malinois/malinois_score.py#L211" 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: MalinoisScoreConfig">
      <ParamField path="cell_types" type="List[string]" default="['K562', 'HepG2', 'SKNSH']">
        Cell-type outputs to return.
      </ParamField>

      <ParamField path="seq_length" type="integer" default="200">
        Expected insert length before MPRA flank padding.
      </ParamField>

      <ParamField path="artifact_path" type="string" default="">
        Optional local override path to the Malinois model artifact tarball. Leave empty to download `artifact_url` into the managed weights cache.
      </ParamField>

      <ParamField path="artifact_url" type="string" default="https://zenodo.org/records/10698014/files/MODELS-malinois_artifacts__20211113_021200__287348.tar.gz?download=1">
        HTTPS URL used to provision the Malinois artifact.
      </ParamField>

      <ParamField path="artifact_md5" type="string" default="375142a714e7df73c463b46113a65210">
        Optional MD5 checksum for the downloaded artifact.
      </ParamField>

      <ParamField path="malinois_dir" type="string" default="">
        Optional local override directory containing unpacked artifact metadata. Leave empty to use the cache extraction directory.
      </ParamField>

      <ParamField path="batch_size" type="integer" default="8">
        Number of sequences to process in each GPU batch.
      </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="cuda">
        Device used for inference.
      </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/sequence_scoring/malinois/malinois_score.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: MalinoisScoreOutput">
      <ResponseField name="results" type="List[MalinoisScoreResult]" required>
        Per-sequence Malinois predictions.

        <Expandable title="MalinoisScoreResult">
          <ResponseField name="sequence" type="string" required>
            DNA sequence that was scored.
          </ResponseField>

          <ResponseField name="sequence_length" type="integer" required>
            Length of the scored DNA sequence.
          </ResponseField>

          <ResponseField name="scores" type="MalinoisActivityMetrics" required>
            Malinois predictions keyed by requested cell type name.
          </ResponseField>
        </Expandable>
      </ResponseField>

      <ResponseField name="cell_types" type="List[string]" required>
        Cell types included in each result's `scores`.
      </ResponseField>

      <ResponseField name="seq_length" type="integer" required>
        Expected insert length used for MPRA flank padding.
      </ResponseField>

      **Metrics** (one set per `results` item)

      | Metric  | Type  | Range     | Availability   |
      | ------- | ----- | --------- | -------------- |
      | `K562`  | float | unbounded | when requested |
      | `HepG2` | float | unbounded | when requested |
      | `SKNSH` | float | unbounded | when requested |
    </Accordion>
  </div>

  #### Applications

  Use this tool to rank regulatory DNA designs by predicted activity in K562, HepG2, or SK-N-SH cells, screen MPRA insert candidates, or compare candidate designs before selecting sequences for downstream validation.

  #### Usage Tips

  * **Sequence length is fixed by default.** Inputs must match `seq_length`, which defaults to 200 bp.
  * **Cell type keys are canonical.** Request outputs as `K562`, `HepG2`, and `SKNSH`; `SKNSH` maps to the SK-N-SH model output.
  * **Batch size affects throughput.** Increase `batch_size` for many same-length inserts when GPU memory allows.

  <a name="api-run-malinois-gradient" />
</div>

<div class="tool-section-card tool-section-card--gradient">
  ### Malinois Gradient (`malinois-gradient`)

  Computes a weighted differentiable activity objective and, by default, returns the gradient with respect to batched relaxed DNA logits.

  #### API Reference

  <div class="api-model-section api-input-section">
    <a href="https://github.com/evo-design/proto-tools/blob/47e34afa5ea240a3b406e323dc38aa5dc85f223e/proto_tools/tools/sequence_scoring/malinois/malinois_score.py#L343" 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: MalinoisGradientInput">
      <ParamField path="logits" type="List[array]" required>
        Batched relaxed DNA sequence logits with shape `(B, L, 4)` in `A,C,G,T` order. Use `B=1` for a single design candidate.
      </ParamField>

      <ParamField path="temperature" type="number" default="1.0">
        Softmax temperature used to relax logits.
      </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/sequence_scoring/malinois/malinois_score.py#L393" 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: MalinoisGradientConfig">
      <ParamField path="loss_terms" type="List[MalinoisGradientLossTerm]">
        Per-cell objective terms summed into one scalar loss.

        <Expandable title="MalinoisGradientLossTerm">
          <ParamField path="cell_type" type="enum" default="K562">
            Malinois output to optimize.

            Available options: `K562`, `HepG2`, `SKNSH`
          </ParamField>

          <ParamField path="direction" type="enum" default="max">
            `"max"` minimizes `1 - sigmoid((raw - center) / scale)`; `"min"` minimizes `sigmoid((raw - center) / scale)`.

            Available options: `max`, `min`
          </ParamField>

          <ParamField path="weight" type="number" default="1.0">
            Non-negative scalar applied before terms are summed.
          </ParamField>

          <ParamField path="sigmoid_center" type="number" default="4.0">
            Raw Malinois score where the sigmoid is 0.5.
          </ParamField>

          <ParamField path="sigmoid_scale" type="number" default="1.0">
            Positive scale for the raw score transform.
          </ParamField>
        </Expandable>
      </ParamField>

      <ParamField path="seq_length" type="integer" default="200">
        Expected insert length before Malinois flank padding.
      </ParamField>

      <ParamField path="artifact_path" type="string" default="">
        Optional local artifact tarball path.
      </ParamField>

      <ParamField path="artifact_url" type="string" default="https://zenodo.org/records/10698014/files/MODELS-malinois_artifacts__20211113_021200__287348.tar.gz?download=1">
        URL used to provision the Malinois artifact.
      </ParamField>

      <ParamField path="artifact_md5" type="string" default="375142a714e7df73c463b46113a65210">
        Expected checksum for the downloaded artifact.
      </ParamField>

      <ParamField path="malinois_dir" type="string" default="">
        Optional extracted Malinois artifact directory.
      </ParamField>

      <ParamField path="soft" type="number" default="1.0">
        Blend hard argmax one-hot (0) to softmax probabilities (1).
      </ParamField>

      <ParamField path="hard" type="number" default="0.0">
        Straight-through hard-forward coefficient.
      </ParamField>

      <ParamField path="compute_gradient" type="boolean" default="True">
        Run backward pass and return gradient.
      </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="cuda">
        Device used for inference and backpropagation.
      </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/sequence_scoring/malinois/malinois_score.py#L580" 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: MalinoisGradientOutput">
      <ResponseField name="sample_metrics" type="List[MalinoisGradientSampleMetrics]">
        Per-sample metric containers with scalar loss and raw cell-type scores.

        <Expandable title="MalinoisGradientSampleMetrics">
          <ResponseField name="loss_terms" type="List[Dict[string, any]]">
            Per-objective-term metadata, including direction, weight, sigmoid transform, and weighted score.
          </ResponseField>

          <ResponseField name="primary_metric" type="string">
            Name of the metric that best summarizes the result overall (e.g. `"avg_plddt"` for AlphaFold2). Used by downstream UI and reporting to pick a headline value.
          </ResponseField>

          <ResponseField name="metric_type" type="string">
            Concrete Metrics subclass tag; enables typed reconstruction after a serialization round-trip.
          </ResponseField>
        </Expandable>
      </ResponseField>

      <ResponseField name="gradient" type="array">
        Gradient tensor matching input DNA logits, or `None` when `compute_gradient=False`.
      </ResponseField>

      <ResponseField name="loss" type="number" required>
        Sum of per-sample weighted scalar objective values. Per-sample values are available in `sample_metrics`.
      </ResponseField>

      <ResponseField name="metrics" type="Dict[string, any]">
        Auxiliary metadata bundle from the standalone worker, including raw scores, objective-term metadata, and runtime relaxation parameters.
      </ResponseField>

      <ResponseField name="vocab" type="List[string]" required>
        DNA column ordering for logits and gradient.
      </ResponseField>

      **Metrics**

      | Metric  | Type  | Range     | Availability   |
      | ------- | ----- | --------- | -------------- |
      | `loss`  | float | ≥ 0.0     | always         |
      | `K562`  | float | unbounded | when requested |
      | `HepG2` | float | unbounded | when requested |
      | `SKNSH` | float | unbounded | when requested |
    </Accordion>
  </div>

  #### Applications

  Use this tool inside gradient-based DNA design loops to maximize activity in an on-target cell type while minimizing activity in off-target cell types. It is designed for optimizer calls rather than final biological validation.

  #### Usage Tips

  * **Logits are batched.** Pass logits with shape `B x L x 4` in `A,C,G,T` order; use `B=1` for a single candidate.
  * **Directions are per term.** `direction="max"` minimizes `1 - sigmoid(raw)` and `direction="min"` minimizes `sigmoid(raw)` after centering and scaling.
  * **Soft/hard mixing controls relaxation.** `soft=1.0, hard=0.0` is fully soft; increasing `hard` uses a straight-through hard-forward estimator.
</div>

## Toolkit Notes

These apply to every Malinois tool in this toolkit (`malinois-score`, `malinois-gradient`).

* **Requires a GPU.** Both tools load a PyTorch Malinois checkpoint and run most practically on CUDA.
* **Weights are provisioned automatically.** By default, the standalone worker downloads the CODA Zenodo artifact into the managed model cache and verifies its MD5 checksum.
* **The gradient tool is a single evaluation.** It returns one loss and optional gradient for the provided logits; run it from an optimizer for iterative design.

<Tip>
  **Example notebook:** See the [full working example](https://github.com/evo-design/proto-tools/blob/47e34afa5ea240a3b406e323dc38aa5dc85f223e/proto_tools/tools/sequence_scoring/malinois/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>

## Additional Information

<AccordionGroup>
  <Accordion title="References">
    * Gosai, S. J. et al. Machine-guided design of cell-type-targeting cis-regulatory elements. *Nature* 634, 1211-1220 (2024). DOI: [10.1038/s41586-024-08070-z](https://doi.org/10.1038/s41586-024-08070-z)
    * CODA/BODA2 repository: [sjgosai/boda2](https://github.com/sjgosai/boda2)
    * CODA supplemental data and resources: [Zenodo record 10698014](https://doi.org/10.5281/zenodo.10698014)
  </Accordion>
</AccordionGroup>
