Skip to content

v0.2.0

Choose a tag to compare

@ericmalekos ericmalekos released this 02 Jun 14:09

crisprware v0.2.0

Comprehensive on-target scoring + faster Rust off-target backend.

This release adds 12 new on-target scorers spanning SpCas9 and Cas12a, replaces the GuideScan2 off-target shell-out with the in-tree Rust crispr-ots backend, and lets you run multiple scorers in a single CLI invocation. All scorer ports are gated by bit-equivalence parity tests against their upstream reference implementations.

New on-target scorers

SpCas9 (joins existing RuleSet3 / rs3)

Scorer Source Notes
DeepSpCas9 Kim et al. 2019, Sci Adv — MIT TF2 port of the inception-CNN. 30-nt context. Bit-exact (1.9e-5 max abs diff) vs TF1 reference.
DeepHF wt_u6 Wang et al. 2019, Nat Commun — OA Wildtype SpCas9, U6 promoter. BiLSTM + 11 bio-features.
DeepHF esp same eSpCas9-1.1 variant.
DeepHF hf same SpCas9-HF1 high-fidelity variant.

Cas12a / Cpf1

Scorer Source Variants
DeepCpf1 Kim et al. 2018, Nat Biotechnol wildtype AsCas12a/LbCas12a
enPAM+GB Luo et al. 2020, Nat Biotechnol (via sgrna_modeler, MIT) enAsCas12a
enseq-DeepCpf1 Chen et al. 2025, Nat Commun (capsule MIT/CC0) wildtype AsCas12a, modern
seq-DeepCpf1variants Chen 2025 23 variants including AsCas12a Ultra (2xNLS), enAsCas12a-HF1, HyperFi-AsCas12a, the LbCas12a / FnCas12a / iCas12a / Lb2Cas12a / Eb / Ce families. The only public scorer covering most of these.

Off-target: GuideScan2 replaced by Rust crispr-ots

CLI changes

  • New --cas9_scorer flag (multi-value) with choices deepspcas9, deephf_wt_u6, deephf_esp, deephf_hf. Runs in parallel with RS3.
  • New --cas12a_scorer flag (multi-value) with choices deepcpf1, enpam_gb, enseq_deepcpf1, seq_deepcpf1variants. The legacy both value is preserved as an alias for enpam_gb deepcpf1.
  • New --cas12a_variant argument, required when --cas12a_scorer includes seq_deepcpf1variants. Accepts any of the 23 variant names case-insensitively (AsCas12a Ultra, ascas12a_ultra, iCas12a(mut2C-W) all resolve).
  • New --min_deepcpf1, --min_enpam_gb, --min_enseq_deepcpf1, --min_deepspcas9, --min_deephf post-score filter thresholds.
  • A single crisprware score_guides call can now emit any combination of scores in one output BED.

Breaking changes

generate_guides 5'-PAM context window now includes the PAM. Cas12a users who previously passed --context_window 8 3 to work around the old behavior should now pass --context_window 4 3. The canonical layout becomes:

--pam TTTV --sgRNA_length 23 --pam_5_prime --context_window 4 3
  → 34-nt context = 4 upstream + 4 PAM + 23 protospacer + 3 downstream

This matches what DeepCpf1, enPAM+GB, and enseq-DeepCpf1 all expect.

New dependencies

  • tensorflow=2.15.* — required by DeepCpf1, enseq-DeepCpf1, DeepSpCas9, DeepHF. CPU build is sufficient for inference.
  • scikit-learn>=1.3, joblib>=1.3 — enPAM+GB.
  • h5py>=3.10 — legacy .hdf5 weight loading.
  • ViennaRNA>=2.4 — DeepHF's stem and dG features. pip install ViennaRNA works; conda users can use bioconda::viennarna.

Total install footprint up by ~1 GB (mostly TensorFlow). All weight files bundled as package data: ~60 MB total across Cas9 + Cas12a + variants.

License audits

All bundled weights have verified compatible licenses:

  • DeepSpCas9: MIT (Hyongbum Kim et al., 2018).
  • DeepCpf1: Springer Nature standard supplementary terms (publicly downloadable via CDN).
  • enPAM+GB: MIT (Peter DeWeirdt's sgrna_modeler).
  • Chen 2025 (enseq-DeepCpf1 + 23 variants): capsule code MIT (Yankang Wu), capsule data CC0-1.0 — both verified in the cloned Code Ocean LICENSE files. Author permission obtained for use of supplementary data.
  • DeepHF: Article CC-BY-4.0 (Nat Commun OA). Weights bundled under the article's redistribution terms. Original izhangcd/DeepHF GitHub repo has been deleted; this release preserves the trained weights.

Test coverage

  • 60+ unit + parity tests across the scorers, all passing.
  • Parity validation against upstream references:
    • DeepCpf1: Spearman 1.0 on 67-row golden TSV.
    • enPAM+GB: Spearman 1.0, mean abs diff 2.6e-9 across all 67 golden rows.
    • enseq-DeepCpf1: Spearman 1.0, max abs diff < 1e-3 across 1,600-row Chen 2025 golden CSV.
    • DeepSpCas9: max abs diff 1.9e-5 across 100 random sequences vs TF1 reference.
    • DeepHF (all 3 variants): max abs diff 6e-8 (single-precision ULP) across 100 random sequences vs Keras 2.1.6 reference.

Not in this release

  • 7 commits on dev/crispr-ots (GPU off-target scanner, AVX-512 VPOPCNTDQ scan path, off-target engine selector) — staged for a future release.

Pull requests merged

  • #1 — Cas12a on-target scoring (5 scorers, 25 models) + crispr-ots off-target backend
  • #2 — DeepSpCas9 + DeepHF (3 variants) SpCas9 scorers + multi-value CLI