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

# ORFipy

> [ORFipy](https://github.com/urmi-21/orfipy) is a fast Python implementation of [open reading frame](https://en.wikipedia.org/wiki/Open_reading_frame) (ORF) extraction developed by [Singh and Wurtele](https://github.com/urmi-21/orfipy) at the Iowa State University Bioinformatics and Computational Biology Program. It scans DNA sequences for ORFs across both strands by default, identifies every stretch bounded by a configurable set of start and stop codons, and reports the resulting ORFs together with their translated protein sequences. This toolkit exposes ORFipy through a single registered tool that accepts one or more DNA sequences and returns the ORFs per sequence with both nucleotide and amino-acid output.

<div class="page-hero">
  <img class="page-hero-banner" src="https://proto-bio.github.io/proto-assets/images/tool/orfipy/hero.png" alt="ORFipy" />
</div>

<Note>
  **License:** ORFipy is open source and free for academic and commercial use under an MIT license. Please refer to [the license](https://github.com/urmi-21/orfipy/blob/master/LICENSE) for full terms.
</Note>

<p class="entity-disclaimer">This toolkit is open source. Any third-party models, product names, or trademarks referenced are the property of their respective owners, and Proto is not affiliated with them.</p>

<hr class="entity-rule" />

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

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

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

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

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

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

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

<div class="tool-tab-bar">
  <span class="tool-tab-wrap"><label for="github-orfipy" 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-orfipy" 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-orfipy" 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-orfipy" 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-orfipy" 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-orfipy" 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-orfipy" 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-orfipy" 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-orfipy" 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-orfipy" 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-orfipy" 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-orfipy" 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/urmi-21/orfipy" target="_blank" class="tab-panel github-panel" data-tab="github-orfipy">
  <div class="gh-card-wrap">
    <img src="https://opengraph.githubassets.com/1/urmi-21/orfipy" class="gh-card-img img-fallback" alt="urmi-21/orfipy" />

    <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> urmi-21/orfipy</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.1093/bioinformatics/btab090" target="_blank" class="tab-panel paper-panel" data-tab="paper-orfipy">
  <div class="paper-info">
    <div class="paper-title">orfipy: a fast and flexible tool for extracting ORFs</div>
    <div class="paper-meta">Urminder Singh and Eve Syrkin Wurtele</div>
    <div class="paper-meta paper-venue">Bioinformatics (2021)</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-orfipy">
  <div class="cite-code-wrap">
    ```bibtex theme={null}
    @article{singh2021orfipy,
      title={orfipy: a fast and flexible tool for extracting ORFs},
      author={Singh, Urminder and Wurtele, Eve Syrkin},
      journal={Bioinformatics},
      volume={37},
      number={18},
      pages={3019--3020},
      year={2021},
      publisher={Oxford University Press},
      doi={10.1093/bioinformatics/btab090}
    }
    ```
  </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/orf_prediction/orfipy" target="_blank" class="tab-panel source-panel" data-tab="source-orfipy">
  <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/orf\_prediction/orfipy</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/orf_prediction/orfipy/examples/example.ipynb" target="_blank" class="tab-panel notebook-panel" data-tab="notebook-orfipy">
  <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-orfipy">
  <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/orfipy-prediction" target="_blank" class="proto-action-btn"><span>Orfipy ORF Prediction</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: 17 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: 17 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/leba01" target="_blank" rel="noopener" title="leba01: 3 commits"><img noZoom class="entity-contributor-avatar" src="https://avatars.githubusercontent.com/u/124846286?v=4&s=64" alt="" loading="lazy" /><span class="entity-contributor-login">leba01</span></a></span></div>

| Function                  | Description                                      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ------------------------- | ------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `run_orfipy_prediction()` | ORF (Open Reading Frame) prediction using Orfipy | <a href="#api-run-orfipy-prediction" 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/orf_prediction/orfipy/orfipy.py#L374" 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

ORFipy ([Singh and Wurtele, 2021](https://doi.org/10.1093/bioinformatics/btab090)) was developed as a fast and flexible replacement for older ORF-extraction tools that struggle with the scale of contemporary genomic and transcriptomic datasets. The published work emphasises customisable search criteria together with high throughput, and reports that ORFipy scales to whole-genome and de novo transcriptome inputs that exceed what earlier ORF finders can comfortably process. The reference implementation is written in Python and is distributed through PyPI and bioconda.

An [open reading frame](https://en.wikipedia.org/wiki/Open_reading_frame) is a continuous stretch of DNA bounded by an in-frame [start](https://en.wikipedia.org/wiki/Start_codon) and [stop codon](https://en.wikipedia.org/wiki/Stop_codon). ORF extraction is mechanistic rather than predictive. Every region that begins at a recognised start codon and continues in frame to the first downstream stop codon is reported, regardless of whether the resulting region encodes a biologically functional protein. This stands in contrast to gene-prediction tools such as Prodigal, which apply learned models to score whether each candidate ORF is likely to correspond to a real gene. ORFipy is appropriate when the goal is exhaustive enumeration of every candidate ORF for downstream filtering or annotation; a gene-prediction tool is appropriate when the goal is a curated set of likely coding genes.

### Learning Resources

* [urmi-21/orfipy](https://github.com/urmi-21/orfipy) (Wurtele Lab, Iowa State University). Official ORFipy repository and command-line reference.

## Tools

<a name="api-run-orfipy-prediction" />

<div class="tool-section-card tool-section-card--predict">
  ### Orfipy ORF Prediction (`orfipy-prediction`)

  Scans one or more DNA sequences across the configured strand setting (three forward and three reverse reading frames by default) and returns every open reading frame that satisfies the configured start codon, stop codon, strand, and length filters. Each returned ORF carries its nucleotide sequence, translated amino-acid sequence, 1-indexed start and end positions on the parent sequence, strand, reading frame, and the parent sequence identifier.

  #### API Reference

  <div class="api-model-section api-input-section">
    <a href="https://github.com/evo-design/proto-tools/blob/47e34afa5ea240a3b406e323dc38aa5dc85f223e/proto_tools/tools/orf_prediction/orfipy/orfipy.py#L88" 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: OrfipyInput">
      <ParamField path="sequences" type="List[string]" required>
        DNA sequence(s) to analyze for open reading frames. Can be provided as:
      </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/orf_prediction/orfipy/orfipy.py#L121" 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: OrfipyConfig">
      <ParamField path="threads" type="integer" default="4">
        Number of CPU threads to use for processing each sequence. Since processing is batched per-sequence, this controls intra-sequence parallelism. Must be at least 1. Default: 4.
      </ParamField>

      <ParamField path="start_codons" type="List[string]" default="['ATG', 'GTG', 'TTG']">
        Start codons to recognize for ORF prediction. Multi-select from:
      </ParamField>

      <ParamField path="stop_codons" type="List[string]" default="['TAA', 'TAG', 'TGA']">
        Stop codons to recognize for ORF prediction. Multi-select from:
      </ParamField>

      <ParamField path="strand" type="enum" default="b">
        Which strand(s) to scan for ORFs. Options:

        Available options: `f`, `r`, `b`
      </ParamField>

      <ParamField path="min_len" type="integer" default="0">
        Minimum ORF length in nucleotides (not including stop codon unless `include_stop=True`). ORFs shorter than this are filtered out. Common values:
      </ParamField>

      <ParamField path="max_len" type="integer" default="10000">
        Maximum ORF length in nucleotides. ORFs longer than this are silently filtered out by orfipy; raise (e.g. `1_000_000_000`) for genome-scale inputs. Default: 10000.
      </ParamField>

      <ParamField path="include_stop" type="boolean" default="True">
        Whether to include the stop codon in the reported ORF nucleotide sequence. If `True`, the stop codon is included in both the nucleotide sequence and length calculations. If `False`, the stop codon is excluded. Default: `True`.
      </ParamField>

      <ParamField path="ignore_case" type="boolean" default="False">
        Treat lowercase (soft-masked) nucleotides as ORF-eligible. Default: `False`.
      </ParamField>

      <ParamField path="partial_3" type="boolean" default="False">
        Report ORFs missing a stop codon at the 3' end of the sequence. Default: `False`.
      </ParamField>

      <ParamField path="partial_5" type="boolean" default="False">
        Report ORFs missing a start codon at the 5' end of the sequence. Default: `False`.
      </ParamField>

      <ParamField path="between_stops" type="boolean" default="False">
        Report ORFs spanning stop-to-stop (start codons ignored). Default: `False`.
      </ParamField>

      <ParamField path="translation_table" type="string">
        NCBI genetic code for translation. `None` uses the standard genetic code (table 1). Only tables supported by orfipy's built-in translation table dict are available (NCBI tables 1-6, 9-14, 16, 21-30). Common options:
      </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/orf_prediction/orfipy/orfipy.py#L278" 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: OrfipyOutput">
      <ResponseField name="results" type="List[OrfPredictionResult]">
        One entry per input sequence, in input order, each holding the ORFs found in that sequence.

        <Expandable title="OrfPredictionResult">
          <ResponseField name="orfs" type="List[ORF]">
            ORFs found in this sequence, in the caller's order.
          </ResponseField>
        </Expandable>
      </ResponseField>
    </Accordion>
  </div>

  #### Applications

  This tool is appropriate for the upstream ORF-enumeration step of any analysis that begins with raw DNA sequences and needs candidate coding regions. Representative applications include cataloguing all ORFs in a newly assembled genome before annotation, extracting coding-sequence candidates from a de novo transcriptome assembly, generating an exhaustive ORF set for downstream filtering by length, codon usage, or homology to a known protein, and producing translated protein sequences for downstream language-model scoring or domain annotation.

  #### Usage Tips

  * **`min_len` is the primary control on the number of reported ORFs.** At the default of `min_len=0`, every candidate region is reported, including many short ORFs that arise by chance in any DNA sequence and do not encode functional proteins. A threshold of `min_len=150` (approximately 50 amino acids) excludes the majority of these short ORFs. A threshold of `min_len=300` (approximately 100 amino acids) focuses the output on typical small proteins, and `min_len=900` (approximately 300 amino acids) restricts the output to larger proteins. The threshold is specified in nucleotides.
  * **`start_codons` should match the genetic context of the input.** The default of `["ATG", "GTG", "TTG"]` is appropriate for bacterial and archaeal sequences, in which alternative start codons account for approximately 15 to 20 percent of genes. A value of `["ATG"]` is appropriate for stringent eukaryotic ORF analyses, and the inclusion of `"CTG"` is appropriate for organisms that use a non-standard genetic code in which `CTG` functions as an alternative start codon.
  * **`strand` controls which DNA strands are scanned.** The default of `"b"` scans both strands and reports ORFs from both the forward sequence and its reverse complement. A value of `"f"` or `"r"` restricts the scan to a single strand, which approximately halves the number of ORFs returned and is appropriate when the coding strand of the input is known in advance.
  * **`translation_table` selects the genetic code used for amino-acid translation.** The default value of `None` applies the standard genetic code (NCBI table 1). A value of `"bacterial"` selects the bacterial, archaeal, and plant plastid code (NCBI table 11), `"vertebrate_mitochondrial"` selects the vertebrate mitochondrial code (NCBI table 2), and the remaining supported NCBI tables are appropriate for organisms that use the corresponding alternative codes.
  * **The partial-ORF flags allow incomplete reading frames at sequence boundaries.** A value of `partial_3=True` reports ORFs that begin at a recognised start codon and continue to the 3' end of the input without an in-frame stop codon. A value of `partial_5=True` reports ORFs that end at a recognised stop codon but begin at the 5' end of the input without a recognised start codon. Both flags are disabled by default and are appropriate when the input represents a fragment of a larger sequence, such as a transcriptome contig.
  * **`between_stops=True` reports every region between two in-frame stop codons regardless of whether a recognised start codon is present.** This is appropriate for ribosome-profiling analyses that aim to identify all potential translation regions, and implies that both `partial_3` and `partial_5` behave as if enabled.
  * **The output is exhaustive rather than curated.** ORFipy reports every candidate ORF that satisfies the configured filters. Confirming the biological relevance of any individual ORF requires subsequent analyses such as homology search with BLAST, domain annotation with HMMER, or gene prediction with Prodigal.
</div>

## Toolkit Notes

These apply to every ORFipy tool in this toolkit (`orfipy-prediction`).

* **`max_len` defaults to 10000 nucleotides and silently filters longer ORFs.** Raise the limit (for example to `1_000_000_000`) for genome-scale inputs to avoid losing long open reading frames without an error.
* **`threads` controls intra-sequence parallelism.** The default of `4` is reasonable for single-genome inputs. Raise this on multi-core hosts when processing very large sequences. The tool processes each input sequence independently, so additional sequence-level parallelism can be achieved by running multiple instances of `orfipy-prediction` concurrently through a `ToolPool`.
* **Input sequences are normalised to uppercase and filtered to the four standard DNA nucleotides before scanning.** Ambiguity codes such as `N` and IUPAC mixture codes are silently removed from the sequence, as are non-DNA characters. The remaining nucleotides are passed to ORFipy in their original order.
* **Position fields are 1-indexed to match standard biological residue numbering conventions.** ORF start and end positions on the parent sequence follow the conventions used in PDB files, GenBank annotations, and the published literature, so positions can be compared directly against external references without conversion.

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