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

# CRISPR Guide Enumeration

> CRISPR Guide Enumeration scans reference-oriented DNA intervals for protospacers adjacent to an IUPAC PAM grammar. It examines either or both reference strands and returns sequence-exact candidates with biological coordinates and flanking context, without scoring or selecting them.

![CRISPR Guide Enumeration](https://proto-bio.github.io/proto-assets/images/tool/crispr_guides/hero.png)[![](https://mintcdn.com/bio-pro/UeudeF7pW-Dj-pIN/assets/images/cached/5586d2ede12e.png?fit=max\&auto=format\&n=UeudeF7pW-Dj-pIN\&q=85\&s=5d259f1a4ac3d5597c20cba7aa7521b2) Proto](https://proto.evodesign.org/docs/tools/organizations/proto.md)

> [!NOTE]
>
> **License:** CRISPR Guide Enumeration is open source and free for academic and commercial use under an MIT license. Please refer to [the license](https://github.com/evo-design/proto-tools) for full terms.

Proto is not affiliated with Proto. This toolkit is open source and builds on the implementation produced by this organization. Product names, logos, and trademarks are the property of their respective owners.

***

&#x20;GitHub GitHub  Website Website  Tool Source Tool Source  Open as Notebook Open as Notebook  Run Locally Run Locally

![evo-design/proto-tools](https://opengraph.githubassets.com/1/evo-design/proto-tools)

&#x20;evo-design/proto-tools

&#x20;View repo

[Open](https://github.com/evo-design/proto-tools)

&#x20;iupac.qmul.ac.uk

&#x20;Visit website

[Open](https://iupac.qmul.ac.uk/misc/naabb.html)

![Proto](https://mintcdn.com/bio-pro/cMLt8hAqaP9M3LKy/assets/logo/logo-light.svg?fit=max\&auto=format\&n=cMLt8hAqaP9M3LKy\&q=85\&s=f5e5dfd1b8f9b9db3a0be0e2eb01f678)

evo-design/proto-tools

&#x20;View source

[Open](https://github.com/evo-design/proto-tools/tree/0a918bae9551824984526ee13f2cff66e6fc4713/proto_tools/tools/gene_annotation/crispr_guides)

Open Notebook

&#x20;Open notebook

[Open](https://github.com/evo-design/proto-tools/blob/0a918bae9551824984526ee13f2cff66e6fc4713/proto_tools/tools/gene_annotation/crispr_guides/examples/example.ipynb)

[![proto-tools on GitHub](https://opengraph.githubassets.com/1/evo-design/proto-tools)](https://github.com/evo-design/proto-tools)

Run locally with proto-tools

```bash theme={null}
pip install git+https://github.com/evo-design/proto-tools.git
```

Toolkit contributors[![](https://avatars.githubusercontent.com/u/21143637?v=4\&s=64)bviggiano](https://github.com/bviggiano)[![](https://avatars.githubusercontent.com/u/61667248?v=4\&s=64)adititm](https://github.com/adititm)

| Function | Description | |
| - | - | - |
| `run_crispr_guides_enumerate()` | Enumerate PAM-compatible guide protospacers on both strands of reference-oriented DNA intervals | [ Docs](#api-run-crispr-guides-enumerate) [ Source](https://github.com/evo-design/proto-tools/blob/0a918bae9551824984526ee13f2cff66e6fc4713/proto_tools/tools/gene_annotation/crispr_guides/crispr_guides_enumerate.py#L350) |

## Background

RNA-guided CRISPR nucleases recognize a protospacer together with a nuclease-specific protospacer-adjacent motif (PAM). The PAM's sequence and position relative to the protospacer vary by nuclease, so the operation accepts both an IUPAC PAM grammar and an explicit five-prime or three-prime orientation. The default `NGG` three-prime PAM and 20-nt protospacer describe SpCas9-style enumeration.

This implementation performs deterministic string matching rather than efficacy or off-target prediction. It uses standard [IUPAC-IUB nucleic-acid ambiguity symbols](https://iupac.qmul.ac.uk/misc/naabb.html) for the PAM grammar, but emits only candidates whose complete protospacer and observed PAM contain canonical A/C/G/T bases. Returned coordinates are always 1-indexed and inclusive, regardless of PAM strand.

## Tools

### CRISPR Guide Enumeration (`crispr-guides-enumerate`)

Enumerates every PAM-compatible protospacer in each supplied reference interval and bundles the candidates by input region.

#### API Reference

[ Source](https://github.com/evo-design/proto-tools/blob/0a918bae9551824984526ee13f2cff66e6fc4713/proto_tools/tools/gene_annotation/crispr_guides/crispr_guides_enumerate.py#L72)

> [accordion] Input: CRISPRGuideEnumerationInput
>
> **regions** `List[CRISPRGuideRegion]` *required*
>
> Independently scanned reference intervals.
>
> **CRISPRGuideRegion**
>
> **sequence\_id** `string` *required*
>
> Reference record or contig identifier.
>
> **sequence** `string` *required*
>
> DNA interval in reference plus-strand orientation.
>
> **start** `integer` (default: 1)
>
> 1-indexed inclusive coordinate of the first base.
>
> **reference\_id** `string`
>
> Optional assembly the coordinates refer to.

[ Source](https://github.com/evo-design/proto-tools/blob/0a918bae9551824984526ee13f2cff66e6fc4713/proto_tools/tools/gene_annotation/crispr_guides/crispr_guides_enumerate.py#L93)

> [accordion] Config: CRISPRGuideEnumerationConfig
>
> **pam** `string` (default: NGG)
>
> IUPAC PAM motif without protospacer placeholder bases.
>
> **pam\_side** `enum` (default: three\_prime)
>
> PAM orientation.
>
> Available options: `three_prime`, `five_prime`
>
> **protospacer\_length** `integer` (default: 20)
>
> Number of PAM-free guide bases.
>
> **strands** `enum` (default: both)
>
> Reference PAM strands to scan.
>
> Available options: `both`, `plus`, `minus`
>
> **context\_5p** `integer` (default: 4)
>
> Exterior 5-prime context bases to return.
>
> **context\_3p** `integer` (default: 3)
>
> Exterior 3-prime context bases to return.
>
> **verbose** `integer` (default: 0)
>
> Verbosity level (0=quiet, 1=info, 2=debug, 3=raw subprocess stderr). `True` is coerced to `1` and `False` to `0`.
>
> **device** `string` (default: cpu)
>
> Device to run the tool on.
>
> **timeout** `integer` (default: 3600)
>
> Maximum execution time in seconds, not counting time spent while a weights download keeps progressing. `None` waits indefinitely.
>
> **seed** `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.

[ Source](https://github.com/evo-design/proto-tools/blob/0a918bae9551824984526ee13f2cff66e6fc4713/proto_tools/tools/gene_annotation/crispr_guides/crispr_guides_enumerate.py#L206)

> [accordion] Output: CRISPRGuideEnumerationOutput
>
> **results** `List[CRISPRGuideRegionResult]` *required*
>
> One result per input region, in input order.
>
> **CRISPRGuideRegionResult**
>
> **sequence\_id** `string` *required*
>
> Reference record or contig identifier.
>
> **region\_start** `integer` *required*
>
> 1-indexed inclusive interval start.
>
> **region\_end** `integer` *required*
>
> 1-indexed inclusive interval end.
>
> **reference\_id** `string`
>
> Optional assembly the coordinates refer to.
>
> **candidates** `List[CRISPRGuideCandidate]`
>
> Deterministically ordered guide candidates.
>
> **ambiguous\_windows\_skipped** `integer`
>
> Windows excluded for non-ACGT protospacer or PAM bases.
>
> **pam** `string` *required*
>
> Normalized IUPAC PAM grammar.
>
> **pam\_side** `enum` *required*
>
> PAM orientation.
>
> **protospacer\_length** `integer` *required*
>
> PAM-free guide length.
>
> **strands** `enum` *required*
>
> Scanned PAM-bearing strands.
>
> **context\_5p** `integer` *required*
>
> Requested exterior 5-prime context.
>
> **context\_3p** `integer` *required*
>
> Requested exterior 3-prime context.
>
> **tool\_version** `string`
>
> Version of the toolkit that produced the output, from its `versions.yaml`. Suffixed `+dirty` when the source no longer matches that version. See `notes/versioning.md`.

#### Applications

Use this operation to create an auditable candidate pool before applying on-target activity models, mismatch/bulge-aware off-target searches, feature-window constraints, or portfolio selection. Its returned exterior context can feed models such as Rule Set 3 when the configured context dimensions match that model's contract.

#### Usage Tips

* **Supply intervals in reference plus-strand orientation.** Set each region's 1-indexed `start`. The tool derives all plus- and minus-strand coordinates from that representation.
* **Write the PAM in nuclease orientation.** Use `pam_side="three_prime"` for patterns such as SpCas9 `NGG`, or `pam_side="five_prime"` for patterns such as Cas12a `TTTV`.
* **`pam_strand` is the strand carrying the protospacer and PAM.** The guide RNA matches the protospacer and pairs with the opposite strand.
* **Fetch enough exterior sequence.** A candidate near an interval edge keeps whatever flank is available, so its `context_sequence` is shorter than `context_5p + protospacer + PAM + context_3p`.
* **Chain the output.** Under the defaults, `context_sequence` is the 30-nt window Rule Set 3 scores (4-nt flank, 20-nt protospacer, 3-nt PAM, 3-nt flank), and `protospacer` is what a mismatch-aware off-target search takes.
* **Score downstream.** This tool intentionally performs no guide ranking, efficacy prediction, off-target search, or candidate selection.

## Toolkit Notes

These notes apply to every tool in the CRISPR Guide Enumeration toolkit.

* **Pure CPU operation.** Enumeration runs in process with no separate environment, model weights, network access, or local database.
* **Naturally batched.** One call accepts multiple independently identified intervals and returns exactly one candidate bundle per interval.
* **Deterministic.** Identical normalized sequence and configuration inputs produce identical ordered candidates.

> [!TIP]
>
> **Example notebook:** See the [full working example](https://github.com/evo-design/proto-tools/blob/0a918bae9551824984526ee13f2cff66e6fc4713/proto_tools/tools/gene_annotation/crispr_guides/examples/example.ipynb) for a copy-paste-ready walkthrough.

## Infrastructure Guides

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

> [card] [Tool Persistence](https://proto.evodesign.org/docs/tools/guides/tool-persistence.md)
>
> Keep a tool's model warm across calls instead of reloading it every invocation.

> [card] [Device Management](https://proto.evodesign.org/docs/tools/guides/device-management.md)
>
> How GPUs are allocated to tools and how to target specific devices.

> [card] [Parallel Execution](https://proto.evodesign.org/docs/tools/guides/parallel-execution.md)
>
> Fan a batch of inputs out across multiple GPUs.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.