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

# Rule Set 3

> [Rule Set 3](https://github.com/gpp-rnd/rs3) predicts SpCas9 guide activity from a 30-nucleotide target context and the experimental tracrRNA architecture. This wrapper exposes the published sequence model without adding hand-designed guide heuristics.

![Rule Set 3](https://proto-bio.github.io/proto-assets/images/tool/rs3/hero.png)[![](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) Broad Institute](https://proto.evodesign.org/docs/tools/organizations/broad-institute.md)

> [!NOTE]
>
> **License:** Rule Set 3 is open source and free for academic and commercial use under an Apache-2.0 license and may require explicit attribution when utilized. Please refer to [the license](https://github.com/gpp-rnd/rs3/blob/master/LICENSE) for full terms.

Proto is not affiliated with Broad Institute. 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  Publication Publication  Cite Cite  Tool Source Tool Source  Open as Notebook Open as Notebook  Run Locally Run Locally

![gpp-rnd/rs3](https://opengraph.githubassets.com/1/gpp-rnd/rs3)

&#x20;gpp-rnd/rs3

&#x20;View repo

[Open](https://github.com/gpp-rnd/rs3)

&#x20;gpp-rnd.github.io

&#x20;Visit website

[Open](https://gpp-rnd.github.io/rs3/)

Accounting for small variations in the tracrRNA sequence improves sgRNA activity predictions for CRISPR screeningPeter C. DeWeirdtNature Communications (2022)

&#x20;Read paper

[Open](https://doi.org/10.1038/s41467-022-33024-2)

@articledeweirdt2022ruleset3

```bibtex theme={null}
@article{deweirdt2022ruleset3,
  title={Accounting for small variations in the tracrRNA sequence improves sgRNA activity predictions for CRISPR screening},
  author={DeWeirdt, Peter C. and others},
  journal={Nature Communications},
  volume={13},
  pages={5555},
  year={2022},
  doi={10.1038/s41467-022-33024-2}
}
```

&#x20;Copy citation

![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/sequence_scoring/rs3)

Open Notebook

&#x20;Open notebook

[Open](https://github.com/evo-design/proto-tools/blob/0a918bae9551824984526ee13f2cff66e6fc4713/proto_tools/tools/sequence_scoring/rs3/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_rs3_score()` | Predict SpCas9 guide activity with the Rule Set 3 sequence model | [ Docs](#api-run-rs3-score) [ Source](https://github.com/evo-design/proto-tools/blob/0a918bae9551824984526ee13f2cff66e6fc4713/proto_tools/tools/sequence_scoring/rs3/rs3_score.py#L188) |

## Background

Rule Set 3 was trained to predict guide activity in CRISPR screening and explicitly accounts for differences between common tracrRNA scaffolds. Its raw output is a relative activity score rather than a probability, so comparisons should stay within the model's SpCas9 screening domain.

## Tools

### Rule Set 3 On-Target Score (`rs3-score`)

Scores contexts arranged as four upstream bases, a 20-base protospacer, a three-base NGG PAM, and three downstream bases. Select `Hsu2013` or `Chen2013` to match the tracrRNA scaffold. Scores are raw mean-centered model outputs, not calibrated probabilities; higher values predict greater activity within the model domain.

The tool validates the context and reports the exact model/package version. It does not evaluate genomic specificity, chromatin accessibility, target-gene features, or non-SpCas9 nucleases.

#### API Reference

[ Source](https://github.com/evo-design/proto-tools/blob/0a918bae9551824984526ee13f2cff66e6fc4713/proto_tools/tools/sequence_scoring/rs3/rs3_score.py#L19)

> [accordion] Input: RS3ScoreInput
>
> **sequences** `List[string]` *required*
>
> Contexts arranged as 4-nt upstream flank, 20-nt protospacer, 3-nt PAM, and 3-nt downstream flank.

[ Source](https://github.com/evo-design/proto-tools/blob/0a918bae9551824984526ee13f2cff66e6fc4713/proto_tools/tools/sequence_scoring/rs3/rs3_score.py#L64)

> [accordion] Config: RS3ScoreConfig
>
> **tracr\_rna** `enum` (default: Hsu2013)
>
> tracrRNA architecture used experimentally.
>
> Available options: `Hsu2013`, `Chen2013`
>
> **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/sequence_scoring/rs3/rs3_score.py#L111)

> [accordion] Output: RS3ScoreOutput
>
> **results** `List[RS3ScoreResult]` *required*
>
> Per-context activity predictions.
>
> **RS3ScoreResult**
>
> **sequence** `string` *required*
>
> Scored 30-nt context.
>
> **protospacer** `string` *required*
>
> Positions 5-24 of the context.
>
> **pam** `string` *required*
>
> Positions 25-27 of the context.
>
> **metrics** `RS3Metrics` *required*
>
> Raw model prediction.
>
> **model\_name** `string` *required*
>
> Scoring model identity.
>
> **model\_version** `string` *required*
>
> Pinned rs3 package version.
>
> **tracr\_rna** `string` *required*
>
> Scaffold feature set used by the model.
>
> **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`.
>
> **Metrics** (one set per `results` item)
>
> | Metric | Type | Range | Availability |
> | - | - | - | - |
> | `score` | float | unbounded | always |

#### Applications

Use this tool to rank PAM-compatible SpCas9 guide candidates after exact target matching and before separate genome-wide off-target evaluation.

#### Usage Tips

* Supply the complete 30-nt context in the documented orientation; do not score an isolated 20-mer.
* Select the tracrRNA architecture that matches the experimental construct.
* Retain raw scores and model version in candidate provenance rather than interpreting the score as a calibrated success probability.

## Toolkit Notes

* **Runs on CPU in an isolated Python 3.10 environment,** because the published package pins its training-era scikit-learn dependency.
* **Batched.** One call scores many contexts and results preserve input order.
* **Chaining from `crispr-guides-enumerate`.** Its `context_sequence` is this model's 30-nt window under the default flanks, but a candidate near an interval edge keeps a shorter context and flanks carry any non-ACGT reference bases. Filter to full-length ACGT contexts before scoring; both are rejected rather than silently scored.
* **Not available on Apple Silicon.** The pinned `lightgbm==3.3.5` ships no macOS arm64 wheel, so setup exits early instead of falling back to a source build. Linux and hosted execution use the published wheels.

> [!TIP]
>
> **Example notebook:** See the [full working example](https://github.com/evo-design/proto-tools/blob/0a918bae9551824984526ee13f2cff66e6fc4713/proto_tools/tools/sequence_scoring/rs3/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.