CRISPRme is a comprehensive tool designed for thorough off-target assessment in CRISPR-Cas systems. It is available as a command-line interface and an offline tool with a locally deployable web interface. CRISPRme integrates human genetic variant datasets with orthogonal genomic annotations to predict and prioritize potential off-target sites at scale. CRISPRme accounts for single-nucleotide variants (SNVs) and indels, considers bona fide haplotypes, and allows for spacer:protospacer mismatches and bulges, making it well-suited for both population-wide and personal genome analyses. CRISPRme automates the entire workflow, from data download to executing the search, and delivers detailed reports complete with tables and figures through an interactive web-based interface.
If you know CRISPRme 2.1.x, this is what the "+" line does that it did not. What changed in behavior, and what to pass to get the old behavior back, is the migration guide below; the detail behind each item is in Highlights below it and in METHODS.
- Whole haplotypes, not one variant at a time. A site that needs two nearby variants on the same chromosome copy is found and reported — SNP+SNP or SNP+indel, CONFIRMED where phasing proves cis or PUTATIVE where it cannot, with the joint allele frequency and, on a genotyped panel, the individuals who carry it by name. The search resolves per sample wherever the index supports it and otherwise screens each variant window for its worst case, lossless for detection; on a genotyped panel a carrier gate then ranks last the combinations no phased haplotype carries, so a row at the top is one somebody could have.
- Indexes you download instead of build. The variant index carries its own allele-frequency registry and genotype store, so there are no per-sample dictionaries to build and a first genome-wide variant search is a download away, not a day. Three production panels, chosen by what you need — phased HGDP + 1000 Genomes (4,091 samples, named carriers; the default), the HPRC pangenome, and the sites-only five-source mega — plus your own cohort, built and published with the same commands. One index answers many PAMs, pruned as results are emitted.
- A score with a threshold you can defend. CRISPR-Bulge replaces CRISTA as the ML scorer, and CFD now penalizes a bulge by its position instead of ignoring it, so a PAM-proximal bulge no longer scores as though it were not there. "Assay down to here" is a stated operating point — the 95 %-recall threshold on a 40-guide held-out benchmark, with its confidence interval and its 90 %/99 % alternatives — rather than a round number.
- A run that ends in a validation plan. Every search writes a self-contained HTML report to
hand to a collaborator or a reviewer: risk card, precision-recall curves, top hits annotated
for function and for cancer-driver genes, per-tier downloads, and a recommended validation
panel.
extract-flanksthen gives the sequence around a site for the reference and for each distinct haplotype observed in the panel (10 by default, all of them on request), so primers for a site that exists only on an ALT haplotype are not ordered off the reference. - An assembled personal genome, searched directly.
assembly-searchtakes a diploid assembly — two haplotype FASTAs — lifts each to hg38 and reconciles them. No variant calling, no VCF. - Grounds for believing a genome-wide number. Every change to the pipeline is checked against a committed brute-force ground truth over a whole chromosome; an independent checker re-derives the indel rows from the VCFs and the reference, on real data, as a release gate; and what the tool still gets wrong is stated, with its measured size, under Known limitations.
Which release brought what, and every fix along the way, is in the CHANGELOG and, for 2.10.0, its release notes.
- Dictionary-less variant-aware search — a compact allele-frequency registry + genotype store ship with the index, so variant off-target search (with allele frequencies, rsIDs, and per-dataset provenance) runs out of the box. (methods)
- Co-occurring off-targets — off-targets that need two nearby variants together on the same chromosome copy (in cis, i.e. the same haplotype), so one individual carries both — SNP+indel (on by default; opt out with
CRISPRME_INDEL_SNP=0) or SNP+SNP — are detected and reported CONFIRMED (phasing proves cis) or PUTATIVE (co-occurrence possible but cis unproven — unphased genotyped panels still name the carriers; sites-only panels likemegagive a conservative min-AF bound with no carriers), with joint AF, and surfaced in the report. Since 2.8.1 an indel row lists only the individuals whose own haplotype has its sequence, with two known limits (§10): an MNV beside the indel on that haplotype, which no store CRISPRme 2.10.0 reads holds (met on HPRC alone of the published panels; a SNP row keeps such a carrier too; CRISPRme+ 2.10.1 reads the MNVs' phase where the dataset's store holds them, see Known limitations), and a second indel on it, which a fake-indel window cannot hold (most often in tandem repeats; see Known limitations); where the phase is unknown, those whose own alleles allow it (PUTATIVE); on an install without SNP genotypes (download --what index --no-genotypes), every carrier of the indel where a SNP makes the site with it (PUTATIVE). Since 2.10.0 a per-sample SNP row does not list an individual whose haplotype holding its SNPs also holds an indel that changes the target (where that indel's phase is unknown, it stays, PUTATIVE;CRISPRME_INDEL_SNP=0turns this off too). Split multi-allelic SNP sites are the exception on an index CRISPRitz 2.9.1 or earlier built, as every one published until the rebuild for 2.10.0 (§8). An indel off-target is searched in a window of 30 reference bases on either side of its indel (CRISPRitz 2.10.0; 25 before and 27 after up to 2.9.1), which holds a target of up to 31 bases, guide, PAM and DNA bulges counted (27 on 2.9.1's, 26 at an MNV): a search whose targets need more says so, and each window's width is read from its index's own indel log, so an index of either release reads right. (methods) - Complementary production indexes — the recommended default is the phased HGDP + 1000 Genomes index of the default SpCas9 NRR PAM (
20-NRR_3_hg38+hg38_HGDP1kGP: 4,091 samples, jointly SHAPEIT5-re-phased → CONFIRMED cis + named per-sample carriers throughout), with the HPRC pangenome and the sites-only five-source mega alternatives. All carry searchable indels genome-wide with SNP+SNP / SNP+indel co-occurrence — see the index comparison table below anddocs/PRECOMPUTED_INDEXES.md. (Per-source retrieval recipes for 1000G 2019/2021, HGDP, gnomAD v4.1, TOPMed and All-of-Us are inpaper/reproducibility/variant-datasets/.) - One index, many PAMs (
--prune-pam) — a PAM-less index stores the raw genomic flank instead of a fixed PAM, and the PAM you pass is applied during the search, so one index answers any 3′ PAM no longer than that flank (a 3-nt flank serves NRG, NGG, NAG, …). Measured genome-wide on HGDP + 1000 Genomes for one guide, a PAM-less index with--prune-pamreturned a byte-identical report to a dedicated NRG index at both a 3-nt and an 8-nt flank. A flank wider than the PAM, in an index built by CRISPRitz 2.9.1 or earlier (index format 1, as every one published until the rebuild for 2.10.0 is), does not index a PAM at a contig's very end (+ strand) or start (− strand): on hg38 at an 8-nt flank, 145 + 101 NGG and 308 + 241 NRG sites, none on a primary chromosome; the search says so when it uses such a flank. An index of format 2, which CRISPRitz 2.10.0 writes, has no such limit. The trade is size — 2.8.1's 3-nt PAM-less variant index is 110 GB against 28 GB for itsNRG_3_hg38+hg38_HGDP1kGP— and pruning happens as results are emitted, so it is not faster than a dedicated index; it is worth it when you expect to search several PAMs over one genome. Since 2.10.0 a search prunes by itself, from the command line or the web form, whenever no installed index serves it unpruned, and a dedicated index serves any PAM its own holds the same way (an NRR index serves NGG, NAG, NGA and NRG). (methods) - Context-aware analysis mode: per-sample on phased indexes by default;
--population-levelto opt out — as of 2.8.0complete-searchauto-selects per-sample (CONFIRMED cis phasing + named carriers + exact joint AF) on a genotyped + PHASED index (e.g. the HGDP + 1000 Genomes default) and population-level (worst-possible representatives per variant window, lossless for detection) otherwise (sites-only / unphased / hybrid / reference-only). Add--population-level(CLI) or pick Population-level in the web form to force the worst-case screen on a phased index; add--per-sampleto force resolution on any genotyped index (on a sites-only index, which has no genotypes, it runs the population-level analysis, with a warning). This is a genotype-resolution dial, not a speed dial: which mode is faster depends on the panel. On the indexes CRISPRitz 2.10.0 builds, which code every allele, per-sample is the faster on a dense panel of many samples such as the default HGDP + 1000 Genomes one (its haplotype pre-check skips the dense windows' raw targets nobody carries), and population-level can be on a small panel such as HPRC (Search speed). The report states which mode was used. (methods) - Lean default output — the report, tables, mismatch/bulge matrix and validation panel are built from the best alignment per locus. The exhaustive alternative-alignments file (
..._all_results_with_alternative_alignments.tsv, the non-best alignments per locus — expensive on large searches) is emitted by mode: off in population-level runs (--population-levelon a genotyped index, or the default on sites-only/unphased indexes), on in per-sample runs (the default on genotyped+phased indexes, or under--per-sample) — on both the CLI and the web; override on the CLI with--alt-alignments/--no-alt-alignments. Each index also self-describes itsdata_type(sites-only / genotyped-unphased / genotyped-phased / hybrid), shown in the web variant-dataset selector. - Cancer-gene annotations: IntOGen by default, COSMIC by licence — off-targets in cancer-driver genes are flagged via IntOGen (CC0, on by default); COSMIC (Cancer Gene Census) is licence-gated and excluded by default — enable it in Settings or with
crisprme.py cosmic-license enable. Alongside ENCODE SCREEN v4, GENCODE and DHS. (methods) - Shareable off-target report — every run auto-generates a self-contained HTML report (summary, calibrated per-scorer risk card, precision-recall curves, recommended validation panel, annotated top hits, per-tier downloads, legend). The panel keys bulges on CRISPR-Bulge at a principled sensitive threshold — the 95%-recall operating point on a 40-guide held-out benchmark (
CB ≥ 1.9×10⁻⁴; selectable to 90 % / 95 % / 99 % recall viaCRISPRME_CB_RECALL_TARGET; that 95% is recall over the benchmark's 287 held-out positives, which include each guide's own on-target — over off-targets only, the population a ranked list contains, the same threshold recovers 94.33%, and 97.57% under the best-CRISPR-Bulge alignment the tables are ranked by: §3.5) — plus a high-CFD rescue for no-/single-bulge sites and all perfect/near-perfect matches, so the shipped panel is the recommended default set. It is selected on scores and edit distance alone: a site is never added to the panel for being in a functional or cancer-driver gene — those are flagged in the annotated top hits for you to add. (methods) - One-command Docker web interface + indexes on demand — no conda, no giant build; pull reference data + prebuilt indexes from the HuggingFace CDN (
crisprme.py download), or build & publish your own dict-less indexes (build-index-only/publish-index --dictless), and manage genomes / indexes / VCFs / annotations / PAMs from the browser Data Manager. (protocol) - Personal-assembly search (CLI + web) —
assembly-searchscans a fully assembled diploid genome (paternal + maternal haplotype FASTAs) directly, lifts each haplotype to hg38, and reconciles them (homozygous- / heterozygous-equivalent + haplotype-non-mappable sites) — no VCF inference. Each individual is stored as one self-containedAssemblies/<individual>/folder + ametadata.json(fetch an HPRC individual, or bring your own as a.zip/.tar.gzbundle);--assembly-individual <name>runs a registered one from the CLI. Available on the website (a "Personal assembly" tab + a Settings card) with a combined report. An optional--gene_annotationadds the nearest gene + signed distance (Gene/Gene_distance_kb) to every hg38-mapped site. (web guide) - Also — merged multi-dataset VCF panels (per-dataset provenance + per-haplotype phasing), PAM-geometry-aware (pamless) indexes, bounded-complexity controls (
--max-total-edits+ a high-variant-density skip), and optional email notifications.
Coming from the original CRISPRme? The baseline below is CRISPRme 2.1.14 — the last
stable release of the original pinellolab/CRISPRme
before CRISPRme+ (still on Bioconda as crisprme=2.1.14). Here are the behavior deltas
that matter most:
| Topic | CRISPRme 2.1.14 (last stable before CRISPRme+) | CRISPRme+ (now) | What to do |
|---|---|---|---|
| Off-target ML score | CFD + CRISTA | CFD + CRISPR-Bulge (OrensteinLab, NAR 2024; MIT — more accurate, esp. on bulges), run in a dedicated cbulge env |
Nothing: install_from_source.sh / the Docker image provision it; or create it later with crisprme.py scorer-env create |
| Analysis mode | single search, always per-sample genotype-resolved (named carriers; no mode flag) | context-aware default — per-sample on genotyped+phased panels (CONFIRMED cis + named carriers + exact joint AF), population-level on sites-only/unphased; --population-level opts out of per-sample, --per-sample forces it |
Add --per-sample to reproduce the old per-sample output (methods) |
| SNP+SNP / SNP+indel co-occurrence | not detected | detected + reported — CONFIRMED (phasing proves cis) / PUTATIVE, with joint AF; on by default | Opt out with CRISPRME_INDEL_SNP=0 (methods) |
| Alternative-alignments TSV | always written | off in population-level runs, on in per-sample runs (per the context-aware default; both CLI and web) | Force either way on the CLI with --alt-alignments / --no-alt-alignments (methods) |
| Variant datasets / default index | build-your-own from --vcf configs (e.g. 1000G + HGDP) |
precomputed, downloadable indexes on HuggingFace; recommended default 20-NRR_3_hg38+hg38_HGDP1kGP (SpCas9 NRR, the default PAM since 2.10.0; phased HGDP + 1000 Genomes, 4,091 samples → CONFIRMED cis + named carriers), with HPRC / sites-only mega alternatives |
crisprme.py download --what index --index-name … (Quickstart step 2) (details) |
| License | AGPL-3.0 for academic/non-commercial use plus a separate commercial license required for commercial use (dual-licensed — AGPL never covered commercial use) | MGB Open Access License 1.0 — free for non-commercial, non-revenue-generating, academic use; commercial use likewise requires a separate commercial license | See §6 License |
| Report | CFD / CRISTA summaries | adds an Observed column (reference / N carrier(s) / observed / putative), CRISPR-Bulge panels, and a shareable HTML report |
Read it in the report (methods) |
Note on the retired flags (CRISPRme+ 2.5.x users only).
--fast/--fullexisted only in the intermediate CRISPRme+ 2.5.x line — never in stock CRISPRme 2.1.14 — and were removed in 2.5.4 (they are not aliases).--per-sampleis the replacement for--full.complete-searchnow prints a WARNING if a saved script passes the retired--fast/--full, so a pre-2.5.4 command no longer silently changes the analysis mode; mode is now the context-aware default unless--population-level/--per-sampleis given.
An update (the one-click app's Update, docker pull, or conda install -n crisprme crisprme=2.10.1) changes CRISPRme, not your data folder: its indexes stay 2.8.1's (index format
1; 2.8.1's install downloads NRG_3_hg38+hg38_HGDP1kGP), which 2.10.1 still searches, with their
limits (the last ALT of a split site alone, fake-indel windows of 25/27, no site within 2 nt of a
contig end or an N run, and HPRC's v2.0). 2.8.1 cannot read 2.10.0's indexes.
- Install 2.10.0's indexes in a data folder of their own:
crisprme.py download --what all --path <new folder>, thencrisprme.py download --what index --index-name 20-NRR_3_hg38+hg38_HGDP1kGP --path <new folder>. The one-click app's Update pulls the new engine only, and an app installed by 2.8.1's installer downloads 2.8.1's index on a first Start:install/says how to move it to 2.10.0's data. - In a data folder 2.8.1 used, a download of an index of 2.10.0 replaces its panel's
Dictionaries, and a search of that panel's indexes of 2.8.1 there is then refused before it
writes anything. Remove that panel's
Dictionaries/dictionaries_<panel>, itsDictionaries/genotypes_<panel>(unless the download installed 2.10.0's store),Genomes/hg38+<panel>andGenomes/hg38+<panel>_INDELS(Troubleshooting §16). - Re-run any variant search made with 2.8.1 whose result matters: the coding of split sites, the indel windows, the index format, the default PAM and HPRC's data all change rows (release notes).
-
Analysis mode. The default (no flag) is context-aware: per-sample on a genotyped+PHASED index (
HGDP1kGP— the default; alsoHPRC) resolving CONFIRMED cis + named carriers + exact joint AF, or population-level otherwise (sites-only/unphased/hybrid/reference-only; lossless for detection, works on any index). Add--population-levelto opt out of per-sample on a phased index (for each window's worst case rather than its carriers' haplotypes); add--per-sampleto force resolution. The two flags are mutually exclusive. It is a genotype-resolution dial, not a speed dial: on the indexes CRISPRitz 2.10.0 builds the per-sample analysis is the faster on a dense panel of many samples such as the default HGDP + 1000 Genomes one, and the population-level one can be on a small panel such as HPRC (see What the default search costs below). -
Index. You only need one; pick by what you're after (full detail in the index table in the Quickstart below):
Index Best for HGDP1kGP(recommended default)most cases — phased HGDP + 1000 Genomes, 4,091 samples → CONFIRMED cis + named carriers throughout HPRCassembly / pangenome variation megaescalate here only for a widest-provenance worst-case screen (sites-only, all co-occurrences PUTATIVE, no carriers)
CRISPRme+ 2.10.1 ships with limits we measured and state plainly. The main ones:
- Above 1 DNA + 1 RNA bulge, a search of the dense immunoglobulin loci can run for hours or
out of memory: keep the default budget there, or
--max-total-edits3 or less. - Population-level searches of HGDP + 1000 Genomes are slower than 2.8.1's in the dense loci: the release's gate timed the README guide's genome-wide one with NRG at 2.2 times 2.8.1's (the per-sample searches, this panel's default, at 0.95 to 1.30 times).
- On HPRC, a carrier whose haplotype holds an MNV in a row's target is listed for a sequence it
does not have. In the README guide's genome-wide search per sample, this happens 1,163 times at
94 sites on indel rows (each at a CFD of 0.085 or less) and 3,334 times at 219 sites on SNP rows.
A target held only through an MNV and another indel or MNV is not reported for its carriers (16
sites on chr22, each at a CFD of 0.0164 or less). CRISPRme+ 2.10.1 reads the MNVs' phase where
the dataset's phased store holds them: HPRC's Dictionaries of 2.10.1 do, and an install of
2.10.0 gets them with a 0.61 GB download step,
crisprme.py download --what indel-genotypes --dataset hg38_HPRC(Troubleshooting §15); so does a store thatbuild-index-onlyof 2.10.1 builds. Such carriers then leave those rows: on HPRC's two genome-wide searches the release's gates measured none left, the real-data check counting 0 of both listings after on both runs — before, the per-sample run had 1,163 indel-row and 3,334 SNP-row listings, the population-level run 558 indel-row listings and no SNP-row count, the check not applying that class to a population-level run. A target held only through an MNV and another indel or MNV stays unreported. - Two indels on one haplotype: a target held only through two indels is not reported for its carriers, and some carriers of a second indel are listed on a row of one indel; most often for guides whose sites lie in tandem repeats (the release gate's check counts 9,059 listings under this limit for three repeat-rich guides genome-wide, 8,693 of them carriers whose own target lacks a SNP the row names, and 3 for the README guide).
- Smaller ones: a target inside a microsatellite split over two rows, a SNP row's carrier left off beside a long indel, unphased calls of two ALTs (in none of 2.10.0's panels), the real-data checker's unchecked columns, and one refusal's advice on the mega, not to be followed (Troubleshooting §12).
What each is, its measured size and who meets it: the
release notes, METHODS §10
and Troubleshooting §12, §14 and §15. The MNVs' phase on HPRC is in
this release; what comes after it (the haplotype scan of the dense regions above 1 + 1 bulges, a
faster population-level analysis of the dense loci, a SNP row's carriers beside a long indel (the
store read as far as their indels need), one row for a target in a microsatellite, and the
checker's and the web app's hardening) is in docs/ROADMAP.md, with no release
named for it yet.
⚠️ Note
The original public CRISPRme web service is no longer available.
All functionalities are now accessible via the command-line interface or the locally hosted web interface. Seedocs/DOCKER_QUICKSTART.mdfor a quick guide on deploying the web interface locally.
Not comfortable with the command line? Run one command once, and it installs a clickable CRISPRme app (into Applications / Start Menu) that manages everything — you never touch the terminal again. Requires Docker Desktop.
macOS / Linux (Terminal):
curl -fsSL https://pinellolab.github.io/crisprme-plus/install.sh | bashWindows (PowerShell):
irm https://pinellolab.github.io/crisprme-plus/install.ps1 | iexThen open CRISPRme (Applications on macOS; Desktop / Start Menu on Windows) — a
small window with three buttons: Start, Update, Stop. Click Start: the
first time it downloads the reference + variant data automatically (~70 GB download, once;
~150 GB on disk once installed — keep ~200 GB free; a reference-only setup is far smaller: ~44 GB
installed, ~65 GB free while it unpacks), then
opens the web interface at http://localhost:8080; every Start after that is instant.
(Memory: give the whole-genome variant-aware search ~64 GB of RAM — on the indexes of
2.10.0 it took 38 GB in all on 8 threads and 63 GB on 16, and more on more threads
(§0) — set that
under Docker Desktop → Settings → Resources → Memory. On Windows with the WSL 2 backend
there is no memory slider; Windows caps the WSL 2 VM at roughly half your RAM, so set
memory= in C:\Users\<you>\.wslconfig, run wsl --shutdown, and verify with
(docker info --format '{{.MemTotal}}') / 1073741824 — see the
Docker Quickstart. Many current
laptops ship with 36–128 GB and can run it; otherwise use a workstation/HPC.
Smaller searches need less: §0 gives what a reference-only search
and a variant-aware search of one chromosome or region took.)
Details: install/. Installed the app with 2.8.1? Its Update pulls the new
engine only: your data folder keeps 2.8.1's indexes, and an app of 2.8.1's installer downloads
2.8.1's index on a first Start. install/ says how to move to
2.10.0's (Upgrading from 2.8.1).
GPU acceleration (optional). The default image
pinellolab/crisprme:latestis GPU-capable: on an NVIDIA host, add--gpus alltodocker runand pass--compute-backend cudato run the CRISPR-Bulge scorer on the GPU; it falls back to CPU automatically when no GPU is present. The amd64 image bundles CUDA; arm64 (Apple Silicon) and Docker-on-Mac are always CPU. The clickable installers auto-add--gpus allwhen Docker exposes a GPU. GPU pays off on large/dense searches; a tiny single-guide run is often faster on CPU due to init overhead. (See the--compute-backend {cpu,cuda,metal}flag.)
New to CRISPRme? Get the point-and-click web interface running in a few commands — just install Docker, then:
Allocate memory first. In Docker Desktop → Settings → Resources → Memory: the genome-wide HGDP + 1000 Genomes variant search shown here (8 threads) took 38 GB in all on the indexes of 2.10.0 (29 GB in its largest process), and more on more threads (63 GB on 16; on 32, the release gates' searches of that panel whose summed memory was measured, the README guide with NRG, TRAC and the ACTGA guide, took 109–119 GB, and other searches may need more), so give Docker 64 GB+ for it (32 GB will OOM); smaller searches need less. On Windows with the WSL 2 backend there is no memory slider — set
memory=inC:\Users\<you>\.wslconfiginstead, thenwsl --shutdown; see the Docker Quickstart. (On Linux/Docker Engine the container uses host memory directly.) See System Requirements.
In zsh, the default shell of macOS, run
setopt interactive_commentsonce in the terminal before you paste the commands of this README: an interactive zsh reads the#of a comment as a word and runs the comment's text. Bash reads them as comments.
# your data folder — ALL shared inputs + per-search Results live here (see docs/DATA_LAYOUT.md)
mkdir -p ~/crisprme && cd ~/crisprme
# 1) fast-download the reference data + reference index (minutes, HuggingFace CDN)
# (this does NOT include the variant index — that is step 2)
docker run --rm -v "${PWD}:/DATA" -w /DATA pinellolab/crisprme:latest crisprme.py download --what all --path /DATA
# 2) grab the prebuilt SpCas9 NRR (NAA, NAG, NGA, NGG; the default PAM) indexes so no
# long index build is needed: the reference index, and the compact variant-aware
# hg38 + HGDP + 1000 Genomes index (the recommended default; phased HGDP + 1000 Genomes,
# 4,091 samples jointly SHAPEIT5-re-phased → CONFIRMED cis + named per-sample carriers
# throughout, including the seven genetic regions of HGDP; the broadest fully-phased panel of
# real observed haplotypes)
docker run --rm -v "${PWD}:/DATA" -w /DATA pinellolab/crisprme:latest crisprme.py download --what index --index-name 20-NRR_3_hg38 --path /DATA
docker run --rm -v "${PWD}:/DATA" -w /DATA pinellolab/crisprme:latest crisprme.py download --what index --index-name 20-NRR_3_hg38+hg38_HGDP1kGP --path /DATA
# ...or the HPRC pangenome index (232 phased assembly-derived genomes incl. CHM13,
# CONFIRMED cis + named carriers, pangenome-specific variation, searchable indels):
docker run --rm -v "${PWD}:/DATA" -w /DATA pinellolab/crisprme:latest crisprme.py download --what index --index-name 20-NRR_3_hg38+hg38_HPRC --path /DATA
# ...or the all-source sites-only "mega" index (5 datasets, per-dataset AF + AF_max,
# searchable indels, SNP+SNP & SNP+indel PUTATIVE co-occurrence):
docker run --rm -v "${PWD}:/DATA" -w /DATA pinellolab/crisprme:latest crisprme.py download --what index --index-name 20-NRR_3_hg38+hg38_mega --path /DATA
# 3) launch the web interface, then open http://127.0.0.1:8080
# (on an NVIDIA host add `--gpus all` here to run the CRISPR-Bulge scorer on the GPU)
docker run --rm -v "${PWD}:/DATA" -w /DATA -p 8080:8080 -it pinellolab/crisprme:latest crisprme.py web-interface
:latestvs a pinned tag. These commands usepinellolab/crisprme:latest— the auto-updating, GPU-capable default image. For a fully reproducible run, pin the exact release instead, e.g.pinellolab/crisprme:v2.10.1.
On HPC with Apptainer/Singularity. Use
apptainer run, which invokes the image entrypoint socrisprme.pyis onPATH, binding your data dir to/DATA— e.g.apptainer run --bind "${PWD}:/DATA" --pwd /DATA docker://pinellolab/crisprme:v2.10.1 crisprme.py --version(addcrisprme.py web-interface/complete-search …the same way). Note thatapptainer exec … crisprme.py …bypasses the entrypoint, socrisprme.pyis not found onPATH— preferapptainer run(or prefixbash -lc). A home it cannot write in (--no-home, or--homeon a read-only folder) is fine: matplotlib's caches then go to a temporary folder (Troubleshooting §1). On a machine other people use, keep the data folder, the output folders and the temporary folder writable by you alone (a umask of 022, orchmod go-w): whoever can write them can change a search and more, as Troubleshooting §7 explains.
The prebuilt indexes (CRISPRme 2.10.0). NRR (NAA, NAG, NGA, NGG) is the default PAM since
2.10.0 (it was NRG = NAG + NGG). Since 2.10.0 the indexes are built by CRISPRitz 2.10.0 in index
format 2, named for their guide length and the side of their PAM (20-NRR_3_hg38: a 20-nt guide,
a 3′ PAM; TTTN-23_3_hg38: a 23-nt guide, a 5′ PAM), and published in their own Hugging Face
repo, lucapinello/crisprme_plus_indices,
which download reads by itself. All variant indexes carry searchable indels genome-wide with
SNP+SNP / SNP+indel co-occurrence; download whichever you need with --what index --index-name <name> (or grab more later from the web Settings). The reference indexes and those of HGDP +
1000 Genomes hold all 455 sequences of hg38, its alt, random and unplaced contigs and chrM
included (as 2.8.1's NRR, NGG and NNN indexes of the panel did; its NRG one held 24), so a variant
search finds every site a reference search finds, but the Cas12a TTTN indexes, which hold 454
(chrUn_KI270539v1, 993 bp, has no TTTN site); those of HPRC and mega hold its 24 chromosomes,
chr1-22, X and Y. An alt contig repeats a region of a primary chromosome (the HLA region, for
one), and no VCF of these panels covers it, so a site there can be reported twice: on the primary
chromosome, and as a reference row on the alt contig. What each download takes (GB = 10⁹ bytes,
each archive as publish-index packs it, measured before the publish; a variant index's first
download of its panel adds the panel's Dictionaries bundle and genotype store, once;
docs/PRECOMPUTED_INDEXES.md lists every archive, and
docs/INDEX_PROVENANCE.md how each was built and checked):
| Index | Reference | HGDP + 1000 Genomes | HPRC | mega |
|---|---|---|---|---|
| SpCas9 NRR (the default) | 20-NRR_3_hg38 20.17 |
20-NRR_3_hg38+hg38_HGDP1kGP 27.84 |
20-NRR_3_hg38+hg38_HPRC 29.55 |
20-NRR_3_hg38+hg38_mega 24.11 |
| SpCas9 NGG | 20-NGG_3_hg38 3.81 |
20-NGG_3_hg38+hg38_HGDP1kGP 5.34 |
||
| SpCas9 NRG | 20-NRG_3_hg38 8.89 |
20-NRG_3_hg38+hg38_HGDP1kGP 12.24 |
||
| General (PAM-less, 8-nt flank) | 20-NNNNNNNN_3_hg38 82.21 |
20-NNNNNNNN_3_hg38+hg38_HGDP1kGP 110.91 |
||
| SaCas9 NNGRRN | 22-NNGRRN_3_hg38 5.41 |
22-NNGRRN_3_hg38+hg38_HGDP1kGP 7.52 |
||
| Cas12a TTTN, 20 nt | TTTN-20_3_hg38 2.83 |
TTTN-20_3_hg38+hg38_HGDP1kGP 4.54 |
||
| Cas12a TTTN, 23 nt | TTTN-23_3_hg38 3.09 |
TTTN-23_3_hg38+hg38_HGDP1kGP 4.83 |
||
| The panel's Dictionaries bundle + genotype store, once | — | 16.42 + 5.87 | 2.44 + 0.56 | 1.95 (no genotypes) |
Index (--index-name) |
Variant sources | Resolution | Best for |
|---|---|---|---|
HGDP + 1000 Genomes — 20-NRR_3_hg38+hg38_HGDP1kGP (recommended default) |
HGDP (925) + 1000 Genomes (3,166), genotyped, jointly SHAPEIT5-re-phased — 4,091 samples | CONFIRMED cis throughout; named per-sample carriers + exact joint AF (including HGDP's seven genetic regions, with correct chrX PAR allele frequencies) | most use cases; the broadest fully-phased panel of real observed haplotypes |
HPRC pangenome — 20-NRR_3_hg38+hg38_HPRC |
HPRC Release 2 Minigraph-Cactus graph v2.1 (hprc-v2.1-mc-grch38; 2.8.1's HPRC indexes: v2.0) — 232 assembly-derived genomes incl. CHM13, phased |
CONFIRMED cis + named carriers; captures pangenome-specific variation | assembly-derived / pangenome variation |
mega (sites-only) — 20-NRR_3_hg38+hg38_mega |
1000G-2021 + HGDP + gnomAD v4.1 + TOPMed + All-of-Us (aggregate) | sites-only — union of allele frequencies, no genotypes; every multi-variant/co-occurring off-target is PUTATIVE with a min-AF bound and no named carriers | a conservative worst-case screen when you must not miss a rare allele from ANY of five databases (escalate here after a genotyped-index run); since 2.10.0 its windows of 220 sequences or more (the immunoglobulin loci, some tandem repeats) are withheld and listed by default (--no-sites-only-density-guard analyses them), and its combinations below the frequency bound are ranked after the others |
Which variant index should I pick? You only need one — if unsure, use the recommended default HGDP + 1000 Genomes (
20-NRR_3_hg38+hg38_HGDP1kGP, downloaded in step 2): phased HGDP + 1000 Genomes, 4,091 samples jointly SHAPEIT5-re-phased → CONFIRMED cis + named per-sample carriers throughout, including HGDP's seven genetic regions and with correct chrX PAR allele frequencies — the broadest fully-phased panel of real observed haplotypes, covering most use cases. Pick HPRC (+hg38_HPRC) for pangenome / assembly-derived variation. Escalate to mega (+hg38_mega) only for a widest-provenance worst-case screen across five databases — it is sites-only, so every co-occurring off-target is PUTATIVE (a worst-case reconstruction that may or may not exist in any real individual) with a min-AF bound and no named carriers; run it after a genotyped-index run when you need maximal allele-frequency breadth. Since 2.10.0 a mega search withholds its windows of 220 sequences or more by default (the sites-only density guard: in the immunoglobulin loci and some tandem repeats, where their rows are combinations of several variants nobody is known to carry; a site there is written from the alignments the guard keeps, and leaves the results where it keeps none; the windows are listed in the dense-region files and noted on the rows there), and the carrier gate ranks its combinations below the frequency bound after the others;--no-sites-only-density-guardanalyses every window, at several times the search time. Grab the others any time from the web Settings or by re-running the download with a different--index-name.
A variant index also fetches its PAM's reference index (20-NRR_3_hg38 for the default) if it is
not installed yet, and its panel's Dictionaries and genotype store once per panel: a second
index of the panel fetches its own archive (and its PAM's reference index, 20-NGG_3_hg38 for
20-NGG_3_hg38+hg38_HGDP1kGP, where that is not installed), not the Dictionaries and the store
again. Download sizes are in
docs/PRECOMPUTED_INDEXES.md.
Other PAMs and guide lengths. Beside NRR the set publishes, on the reference and on HGDP + 1000 Genomes:
Index (--index-name, + +hg38_HGDP1kGP for the variant one) |
PAM | Guide | Serves |
|---|---|---|---|
20-NGG_3_hg38 |
NGG, 3′ | 20 nt | the fast canonical SpCas9 search |
20-NRG_3_hg38 |
NRG (NAG, NGG), 3′ | 20 nt | NRG, NGG, NAG (the default before 2.10.0) |
20-NNNNNNNN_3_hg38 |
PAM-less, 8-nt 3′ flank | 20 nt (21 at 1 + 1 bulge) | any 3′ PAM of up to 8 nt, pruned (SpRY, VRER, St1Cas9, Nme, your own) |
22-NNGRRN_3_hg38 |
NNGRRN, 3′ | 22 nt | SaCas9 (NNGRRT, pruned) |
TTTN-20_3_hg38 |
TTTN, 5′ | 20 nt | Cas12a at 20 nt: 20bp-TTTN-Cas12a.txt, and 20bp-TTTV-Cas12a.txt pruned |
TTTN-23_3_hg38 |
TTTN, 5′ | 23 nt | Cas12a at 23 nt: 23bp-TTTN-Cas12a.txt, and 23bp-TTTV-Cas12a.txt pruned |
NRR is the default because it is the broadest SpCas9 screen of the three: an NRR search also
reports the NAA and NGA sites, which NRG leaves out, as NRG reports the NAG ones NGG leaves
out. It costs more search time than NRG, at about the same memory: genome-wide on the indexes of
2.10.0, 1.57 times NRG's time for ACTGAAATCTGTAAGCAGGC on HGDP + 1000 Genomes per sample at 4
mismatches + 1 + 1 bulge on 32 threads (2 h 19 min against 1 h 29 min; 110.5 against 102.3 GiB
summed over each run's processes), and 1.96 times for the README guide on 16 threads (4 h 16 min
against 2 h 11 min, on a shared node; 58.6 against 57.9 GiB). On chr22 (8 threads) it took 1.31
times NRG's time per sample and, in the largest process, 1.86 times its memory (9.54 against 5.14
GiB; METHODS.md §5). An NRR index also serves an NGG, NAG, NRG or NGA search, and an
NRG one an NGG or NAG search: the search prunes the index to its PAM by itself, and says so,
more slowly than from an index of that PAM (see below).
One index for many PAMs. Each index above is built for one PAM, and serves any PAM its
own holds at every position (an NRR index serves NGG, NAG, NGA, NAA and NRG). A PAM-less
(general) index instead stores the raw genomic flank, so a single index answers any 3′ PAM no
longer than that flank. A dedicated index of a PAM that holds the search's, or a PAM-less one
wider than the search's PAM, is pruned to it during the search (--prune-pam), which a search
does by itself when no installed index serves it unpruned, and says so first.
# from an NRR or the general index: pruned to NGG
crisprme.py complete-search \
--pam ./PAMs/20bp-NGG-SpCas9.txt ...The general index of 2.10.0 is 20-NNNNNNNN_3_hg38 (and +hg38_HGDP1kGP): an 8-nt flank, any 3′
PAM of up to 8 nt. Its search takes 2.7 times a dedicated NGG index's, and 1.9 times the default NRR
index's (genome-wide on the published reference indexes, ACTGAAATCTGTAAGCAGGC at 4 mismatches + 1
DNA + 1 RNA bulge, the engine's search on 32 threads: 24.5 min pruned to NGG against 9.2 min on the
NGG index, and 12.9 min for NRR on the NRR index). NNN_3 (the 3-nt flank of 2.8.1) is not built
again for 2.10.0: the general index serves every search it served, at the same speed (a 3-nt and
an 8-nt PAM-less index cost the same, every position being a site), and a download of 2.8.1's
NNN_3_* says so. A 5′ PAM (Cas12a) needs a dedicated index (the TTTN ones), which
build-index-only builds for any other: these indexes store the flank on the 3′ side of the guide,
so a 5′ search does not use them.
An index also fixes how many bases it stores per site, from the guide length it was built
for and its N (20-NRR_3: N = 3, up to 2 bulges of each type). An index built for a 20-nt
guide with N = 3 also serves a 21-nt guide (the shipped 21-nt SaCas9 PAM files,
21bp-NNGRRT-SaCas9.txt and 21bp-NNNRRT-SaCas9KKH.txt): from the web at up to 1 bulge of each
type, from the command line at any budget the rule allows (up to 1 DNA bulge with up to 2 RNA
bulges, or 2 DNA bulges with none). Its rows are not always those of an index built for 21-nt
guides: they can differ next to a contig end or an N run, and, with bulges, at a few other
sites. The _INDELS index of a variant index searches a fake-indel genome with an N run about
every 65 bases (on chr22: 65 for HGDP + 1000 Genomes, 67 for mega, with CRISPRitz 2.10.0's windows
of 30/30; 57 and 59 with 2.9.1's of 25/27). On chr22's of hg38_mega, with the windows of 25/27, the
21-nt SaCas9 guide at 4 mismatches + 1 DNA + 1 RNA bulge gave 456 rows of 149,688 in the engine's
search of the 20-nt general index that an index built for 21-nt guides does not give, RNA bulges
at the guide's first base (on chr22's reference sequence, the same 2,664,778 rows). For the rows
of a guide length, search an index built for it, which the search takes first where one is
installed. A guide past that needs its own index, which the search builds, under a name of its
own (rule: methods §9).
The older name <PAM>_<N>_<genome> says neither the guide length an index was built for nor
the side of the guide its PAM is on, so two such builds took one name, and the second stopped
on the first. Since 2.10.0 an index is built under a name that carries both, in the order of
the target on the strand (20-NRR_3_hg38, TTTV-23_3_hg38); build-index-only and a search
name what they build so, the variant index (20-NRR_3_hg38+hg38_HGDP1kGP) and its _INDELS
index too, so the indexes of one PAM for the two sides of the guide, or for two guide lengths,
live in one library. CRISPRme reads both forms (search, web, download, complete-test), takes an
index of the new form only for a search of its side, and of one index under both names, the
newer one. An index under the older name (built by an earlier release) is used as before, and
build-index-only keeps one in place that is the index it builds; one for the other side or
another guide length stays, and the new one is built beside it. An earlier release does not
read the new form: it builds its own.
Where the indexes are. The indexes of 2.10.0 are in
lucapinello/crisprme_plus_indices,
which no earlier release reads (CRISPRme+ 2.8.1 refuses an index of format 2, and 2.8.0 aborts
on one). The archives of 2.8.1 (index format 1, the older names: NRR_3_hg38+hg38_HGDP1kGP,
NNN_3_hg38, the 8-nt NNNNNNNN_3_hg38) stay in lucapinello/crisprme-data and
lucapinello/crisprme-data-general-index for 2.8.1; 2.10.0 reads both formats and still fetches
one by its name, saying first which index of 2.10.0 replaces it. Keep an install of an archive of
2.8.1 apart from one of 2.10.0 of the same panel (another --path): each reads its own build of
the panel's Dictionaries. download refuses to put an archive of 2.8.1's Dictionaries over a
bundle of 2.10.0; the other way, where a bundle of 2.10.0 replaces the Dictionaries of installed
indexes of 2.8.1, it warns, naming them, and a search of those indexes is then refused before it
writes anything, saying what to do: search the index of 2.10.0 that replaces it, or keep the old
one in a data folder of its own
(Troubleshooting §16).
Coming from 2.8.1: Upgrading from 2.8.1.
A PAM-less index with --prune-pam gives the dedicated index's report for the same PAM: from
an index of format 2 (CRISPRitz 2.10.0), contig ends included; from one of format 1 (CRISPRitz
2.9.1 and earlier) byte for byte from a flank of the PAM's width, and from a wider one but for
the sites at a contig's very end or start that it does not index (on hg38 at an 8-nt flank,
145 + 101 NGG and 308 + 241 NRG sites, none on a primary chromosome); a wider one of format 1
must also have been built by CRISPRme 2.8.1, and the search warns of an older build (see
methods §9). Since 2.10.0 a search,
on the command line or from the web interface, prunes by itself whenever no installed index
serves it unpruned (--prune-pam and --index-path are needed no more), and the report
names the index that served it. Because nothing is excluded at build time these indexes are
several times larger than a dedicated one, and a pruned search reads the whole index, so it
is slower — choose one when you expect to search a PAM no dedicated index of the set holds,
and a dedicated index when you only ever need one.
Full step-by-step (with variants, more indexes, troubleshooting):
docs/DOCKER_QUICKSTART.md.
Prefer the CLI? After the download steps above (1 & 2), run the variant-aware example search and generate the shareable report — no web UI needed:
# a genome-wide SpCas9 (NRR) search over the hg38 + HGDP + 1000 Genomes jointly re-phased index, up to 4
# mismatches + 1 DNA / 1 RNA bulge (a 6-edit budget), with --per-sample genotype resolution
# (named carriers + CONFIRMED cis + exact joint allele frequency), plus rsIDs
# and functional annotations. (Downloaded the +hg38_HGDP1kGP index in step 2 above.)
echo "CTAACAGTTGCTTTTATCACNNN" > guide.txt
docker run --rm -v "${PWD}:/DATA" -w /DATA pinellolab/crisprme:latest crisprme.py complete-search \
--genome Genomes/hg38 --pam PAMs/20bp-NRR-SpCas9.txt --guide guide.txt \
--vcf list_vcf.txt --samplesID list_samplesID.txt \
--annotation Annotations/dhs+encode_screenv4+gencode+cosmic.hg38.bed.gz \
--gene_annotation Annotations/gencode.protein_coding.bed.gz \
--mm 4 --bDNA 1 --bRNA 1 --per-sample --output my_search --thread 8
# ^ the recommended default search: up to 4 mismatches + 1 DNA and 1 RNA bulge (a 6-edit
# budget, matching the default --max-total-edits 6, so nothing is pruned). This sits in the
# validated single-bulge domain of the CRISPR-Bulge scorer. Raise the caps for a deeper search,
# but also raise --max-total-edits to their sum or alignments over the budget are PRUNED
# (e.g. --mm 6 --bDNA 2 --bRNA 2 is a 10-edit budget → add --max-total-edits 10 to keep all).
# On the indexes CRISPRitz 2.10.0 builds, more than 1 DNA + 1 RNA bulge makes the variant
# search of the dense loci explode (see "What the default search costs"): raise --mm first.
# Uses --per-sample here to resolve per-sample genotypes — CONFIRMED cis phasing throughout
# (the whole HGDP + 1000 Genomes panel is jointly re-phased) + named carrier samples + exact joint
# allele frequency — recommended for genotyped panels / clinical validation. On HGDP1kGP (a
# genotyped+phased index) per-sample is already the default; pass --population-level to switch to
# the worst-possible representatives. --per-sample is a genotype-resolution mode, not a speed
# mode: on HGDP1kGP, a dense panel of many samples, it is the faster one (its haplotype
# pre-check skips the raw targets of dense windows nobody carries), on a small panel such as
# HPRC it can be the slower; on a sites-only index (mega) it cannot resolve carriers and is
# inert.
# COSMIC cancer annotations ship in the bundle but are OFF by default (licence-gated) — enable
# with `crisprme.py cosmic-license enable`; IntOGen cancer-driver flags are on by default.
# build the self-contained, shareable HTML report (report.html + a data/ folder)
docker run --rm -v "${PWD}:/DATA" -w /DATA pinellolab/crisprme:latest crisprme.py generate-report \
--result-dir Results/my_search
# -> open Results/my_search/<jobid>_report.zip, then report.htmldownload --what all/index writes list_vcf.txt and list_samplesID.txt for you,
so the search above works out of the box on a fresh install.
0 System Requirements
1 Installation
1.1 Install CRISPRme via Conda/Mamba
1.1.1 Installing Conda or Mamba
1.1.2 Installing CRISPRme
1.1.3 Updating CRISPRme
1.2 Install CRISPRme via Docker
1.2.1 Installing Docker
1.2.2 Pulling the CRISPRme Docker Image
1.3 Install CRISPRme from source (without Bioconda)
2 Usage
2.1 Directory Structure
2.2 CRISPRme Functions
2.2.1 Complete Search
2.2.2 Complete Test
2.2.3 Off-target sites validation Test
2.2.4 Targets Integration
2.2.5 GNOMAD Converter
2.2.6 Generate Personal Card
2.2.7 Setup Legacy Database
2.2.8 Local Web Interface
2.2.9 Generate Report
2.2.10 Reference-Index and Data-Distribution Commands
2.2.11 Targets Scoring
2.2.12 Extract Flanks
3 Test
3.1 Quick Test
3.2 Detailed Test
3.2.1 Single Chromosome Test
3.2.2 Full Genome Test
4 Citation
5 Contacts
6 License
• Methods & validation — the self-contained technical reference (variant-aware data model, haplotype scanning, worst-case scoring, annotation, report, scoring assumptions & limitations)
• What CRISPRme+ adds over classic CRISPRme and Upgrading from 2.8.1 — everything the "+" line brought over CRISPRme 2.1.x in one list (release by release: the CHANGELOG), and how to move a 2.8.1 install to the current indexes
• Known limitations and roadmap — what 2.10.1 does not do yet, with its measured size, and what is to come after it
Memory scales with the search — pick your tier (measured figures):
| Search | RAM | Disk |
|---|---|---|
| Reference-only (no variant dataset) | grows with --thread: 17.6 GiB genome-wide on 8 threads, the default (below) |
~44 GB (reference-only install; keep ~65 GB free while it unpacks) |
| Variant-aware, one chromosome or region | up to 12.6 GiB on chr22, and 27.3 GiB on the whole of chr14, which holds IGH, with NRR, the default (8 threads; below) | what its genome and indexes take |
Whole-genome, variant-aware (e.g. HGDP + 1000 Genomes (20-NRR_3_hg38+hg38_HGDP1kGP); the web/Quickstart default) |
64 GB: 38 GB in all on 8 threads, the default, 63 GB on 16, and more on more threads (below); far more above 1 DNA + 1 RNA bulge (Troubleshooting §14) | ~150 GB (full variant-aware install; keep ~200 GB free) |
Time. On the indexes of 2.10.0 (the release's gates), the README guide's genome-wide search of
HGDP + 1000 Genomes with NRR at 4 mismatches + 1 DNA + 1 RNA bulge took, per sample, 4 h 33 min on
8 threads, the default (7 h 0 min population-level), on a shared node, and 4 h 16 min to 4 h 32
min on 16 threads (6 h 13 min to 6 h 27 min population-level); the reference-only search below, 45
min on 4 threads, 29 min on 8 and 25 min on 32. In the release's clean install from the Hub,
download --what all took 13 min and the default variant index, with its panel's Dictionaries
and genotype store, 24 min. What the default search costs, in
§2.2.1, says where the time goes.
The variant-aware genome-wide search is the memory-heavy one, and CRISPRitz's search loads the
index one chromosome per thread, so its memory grows with --thread. On the indexes of 2.10.0
the README guide's genome-wide search of HGDP + 1000 Genomes with NRR at 4 mismatches + 1 DNA + 1
RNA bulge, per sample, took 27.3 GiB in its largest process and 35.1 GiB summed over its
processes on 8 threads (the default of --thread; population-level about the same) and 37.2 and
58.6 GiB on 16 (GiB = 2³⁰ bytes). On 32 threads the release gate's genome-wide searches of HGDP +
1000 Genomes at that budget took 68.9 to 85.9 GiB in their largest process (68.9 to 70.7 for the
README and ACTGA guides on the SpCas9 indexes, up to 82.3 for other guides there and for the
general index pruned, up to 85.7 and 85.9 for SaCas9's and Cas12a's guides on theirs) and, where it
was measured, about 102 to 111 GiB summed:
16 GB or 32 GB will OOM a genome-wide variant search — allocate 64 GB+, and keep to 16
threads or fewer within it for the README guide (on 32 threads other guides' largest process took up
to a quarter more: give them more memory or fewer threads). The smaller searches took, at 4
mismatches + 1 DNA + 1 RNA bulge (the peak of the largest process, on the published indexes, the
release's gates):
- Reference-only. Genome-wide,
complete-searchofACTGAAATCTGTAAGCAGGCon20-NRR_3_hg38took 10.5 GiB on 4 threads (the web interface's; 45 min), 17.6 GiB on 8 (the default of--thread; 29 min) and 58.0 GiB on 32 (25 min). - Variant-aware, one chromosome or region, on the indexes of HGDP + 1000 Genomes, 8 threads (METHODS.md §5): on chr22 the README guide took 5.1 GiB with NRG and 9.5 GiB with NRR, the default PAM, per sample and population-level alike, and three repeat-rich guides at once, with NRG, 12.6 GiB; SaCas9's 21-nt guide, which the NNGRRN index serves, 5.4 GiB. The immunoglobulin loci are the densest part of these indexes: the whole of chr14, which holds IGH, took 27.3 GiB with NRR, per sample (56 min). During 2.10.0's development, the integration's gate's searches of the loci alone with NRG, on indexes built with the release's fake-indel windows of 30/30, took 25.0 GiB (IGH, chr14 with every base outside it set to N), 6.2 GiB (IGK) and 3.0 GiB (IGL), and the rebuilt mega's search of chr14 whole, five guides population-level with its density guard on, 20.5 GiB, on the windows of 25/27.
To estimate the cost of a large search up front, see docs/SCALABILITY_ANALYSIS.md.
Which version do I get? Every route below installs CRISPRme+ on Python 3.11. Docker (the Quickstart above, or §1.2) is the simplest: it runs on any OS and ships the CRISPR-Bulge scorer pre-built. Bioconda (§1.1, Linux) has served CRISPRme+ since 2.7.9; a release reaches it once its recipe update is merged after the tag: 2.10.0 within about 72 h of its tag, after the
crispritz2.10.0 recipe it requires. The original CRISPRme 2.1.x line is still on Bioconda ascrisprme=2.1.14. If in doubt, use Docker.Which CRISPRitz goes with it? CRISPRme+ and its search engine CRISPRitz share their major.minor version: CRISPRme 2.10.z runs on CRISPRitz 2.10.z, then 2.11 on 2.11, and so on; patch numbers are independent. CRISPRme X.Y.z requires CRISPRitz X.Y.* (the Bioconda recipe pins
crispritz >=X.Y.0,<X.(Y+1); the Docker image and the source install, the exact CRISPRitz the release was tested with), and a breaking change in either package, such as a new index format, bumps the minor of both, so the versions that go together can be told at a glance. Every route below installs the matching CRISPRitz (crisprme.py --versionandcrispritz.py versionprint them). 2.10.0 is the first release under this rule: CRISPRme goes from 2.8.1 to 2.10.0 to meet CRISPRitz 2.10.0 (RELEASING). On Bioconda, thecrispritzpackage of 2.10 is not installed beside acrisprmeolder than 2.10.0 (run_constrained: crisprme >=2.10.0), and CRISPRme 2.8.1's package (build 1) takes CRISPRitz 2.9 only (crispritz >=2.9.1,<2.10): an update never puts CRISPRitz 2.10, whose indexes are of format 2, beside a CRISPRme that reads index format 1 only.
This section outlines the steps to install CRISPRme, tailored to suit different operating systems. Select the method that best matches your setup:
-
Install CRISPRme via Docker (compatible with all operating systems — recommended)
-
Install CRISPRme from source (§1.3; Linux) — the CRISPRme+ (2.10.0) line on Python 3.11
Bioconda's crisprme package is CRISPRme+ (Python 3.11, Linux), and it installs CRISPRitz from
Bioconda too. Always install it with an explicit version (§1.1.2). Bioconda has no macOS build
of CRISPRitz, so on a Mac use Docker.
This section is organized into three subsections to guide you through the installation and maintenance of CRISPRme:
-
Installing Conda or Mamba:
This subsection provides step-by-step instructions to install either Conda or Mamba. Begin here if you do not have these package managers installed on your machine. -
Installing CRISPRme:
Once you have Conda or Mamba set up, proceed to this subsection for detailed instructions on creating the CRISPRme environment and installing the necessary dependencies. -
Updating CRISPRme:
Learn how to update an existing CRISPRme installation to the latest version, ensuring access to new features and bug fixes.
Before installing CRISPRme, ensure you have Conda installed on your machine. We
recommend Miniforge, which installs both conda
and mamba and is set up for conda-forge (conda itself has used the fast libmamba solver
by default since 23.10).
Step1: Install Conda or Mamba
-
To install
Conda, refer to the official installation guide:
Conda Installation Guide -
To install
Mamba, refer to the official installation guide:
Mamba Installation Guide
Step 2: Configure Bioconda Channels
Configure the Bioconda and conda-forge channels by running the following one-time setup commands:
conda config --add channels bioconda
conda config --add channels conda-forge
conda config --set channel_priority strictNote: Use
conda confighere even if you use Mamba: Mamba 2 (shipped with current Miniforge) has noconfig --addand rejects these commands. Per current Bioconda guidance we do not add thedefaultschannel, andconda-forgeis given the highest priority.
By completing these steps, your system will be fully prepared for installing CRISPRme.
Create a dedicated environment, naming the CRISPRme version and Python 3.11 explicitly, then
set up the CRISPR-Bulge scorer, which runs in its own conda env (cbulge):
conda create -n crisprme crisprme=2.10.1 python=3.11
conda activate crisprme
# CPU build; add --gpu for CUDA
crisprme.py scorer-env create
# compute self-test: must report OK
crisprme.py scorer-env doctorAlways name the version. Given a bare
crisprme, the solver silently falls back to the newest release it can satisfy, which can be years old: in testing, an unsolvable 2.8.0 resolved tocrisprme 2.0.0on Python 3.6. With an explicit version the install fails loudly instead. If conda reports that nothing providescrisprme=2.10.1, the release has not reached Bioconda yet: use Docker or the source build until it does.
Every search scores off-targets with both CFD and CRISPR-Bulge, so complete-search refuses to
start while the scorer env is missing or broken (crisprme.py scorer-env doctor says why), unless
you opt into CFD-only scoring with CRISPRME_SKIP_SCORER_ENV=1.
GNU coreutils come with it. The environment holds conda-forge's GNU coreutils (
sort,cut,pasteand the rest), and a search or a build run with it activated runs those, not the host's. Ubuntu 26.04's own coreutils are uutils' (rust-coreutils), whoseprbroke the results table of a search before 2.10.0 (Troubleshooting §17); 2.10.0 runs nopr, and its other calls give the same bytes with either. Run CRISPRme with the environment activated, as above.
Verify the installation; it prints the installed version, v2.10.1:
crisprme.py --version(A bare crisprme.py prints its list of commands and exits 1; it creates no folder.)
To update an existing Bioconda installation, follow the steps below:
Step 1: Check the Latest Version
See the releases page for the latest version of the tool.
Step 2: Update CRISPRme
Install it into the existing environment, replacing <version> with the version number:
conda install -n crisprme crisprme=<version>
# re-check the scorer env after an update
crisprme.py scorer-env doctorThe original CRISPRme 2.1.x line (Python 3.8; last release crisprme=2.1.14) cannot be
updated in place to CRISPRme+: create a new environment as in §1.1.2.
An update changes the environment, not your data folder: after an update from 2.8.1 its indexes are still 2.8.1's, which 2.10.0 searches with their limits. To search 2.10.0's indexes, install them in a data folder of their own, as Upgrading from 2.8.1 says.
Step 3: Verify the Update
After the update completes, ensure the installation was successful by checking the version:
crisprme.py --versionIf the displayed version matches the one you installed, the update was successful.
This section is organized into two subsections to guide you through the setup of CRISPRme using Docker:
-
Installing Docker:
Provides step-by-step instructions for installing Docker on your system, ensuring compatibility with all operating systems, including Linux, macOS, and Windows. -
Pulling the CRISPRme Docker Image:
Explains how to download the prebuilt CRISPRme Docker image to set up a containerized environment for seamless execution.
Follow the subsections in order if Docker is not yet installed on your machine. If Docker is already installed, skip to the second subsection.
MacOS and Windows users are encouraged to install Docker to use CRISPRme. Linux users may also choose Docker for convenience and compatibility.
Docker provides tailored distributions for different operating systems. Follow the official Docker installation guide specific to your OS:
Apple Silicon (M1/M2/M3) support
The CRISPRme Docker image is now published as a multi-architecture image with a
native linux/arm64 build, so it runs natively on Apple Silicon Macs with no
emulation (no Rosetta / QEMU, no "platform mismatch" warning). Each architecture's
image is built from source: it compiles CRISPRitz v2.10.0 and installs CRISPRme+ from
this repository, so it does not depend on the Bioconda packages. Docker automatically
selects the correct architecture when you pull or run the image, so no special flags
are required.
Docker Desktop memory allocation (important)
CRISPRme's searches are memory intensive. By default Docker Desktop caps the
memory available to containers, which can cause searches to fail with
out-of-memory errors. Before running large analyses, raise the limit in
Docker Desktop → Settings → Resources → Memory: a genome-wide variant search
needs 64 GB+ (on the indexes of 2.10.0 the README guide's took 38 GB in all on 8 threads and
63 GB on 16, and on 32 the release gates' searches of HGDP + 1000 Genomes whose summed memory was
measured, the README guide with NRG, TRAC and the ACTGA guide, took 109–119 GB, and other searches
may need more), and smaller searches need less
(§0). On Windows with the WSL 2 backend there is no memory slider — set memory= in C:\Users\<you>\.wslconfig instead, then wsl --shutdown; see the Docker Quickstart. CRISPRme prints a non-fatal
WARNING: at the start of a complete-search / complete-test run when it
detects less than 32 GB of total memory, reminding you to increase this
allocation. That threshold sits below the 64 GB a genome-wide variant search needs, so a
run that starts without a warning may still not have enough memory.
(You can override the threshold with CRISPRME_MIN_GB or skip the
check entirely with CRISPRME_SKIP_MEM_CHECK=1.)
Linux-Specific Post-Installation Steps
If you're using Linux, additional configuration steps are required:
- Create the Docker Group:
sudo groupadd docker- Add Your User to the Docker Group:
sudo usermod -aG docker $USERRepeat this command for any additional users you want to include in the Docker Group.
- Restart Your Machine
Log out and log back in, or restart your machine to apply the changes.
Testing Docker Installation
Once Docker is installed, verify the setup by opening a terminal window and typing:
docker run hello-worldIf Docker is installed correctly, you should see output like this:
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
3. The Docker daemon created a new container from that image, which runs the executable that produces this output.
4. The Docker daemon streamed this output to the Docker client, which displayed it on your terminal.
For more examples and ideas, visit:
https://docs.docker.com/get-started/
After installing Docker, you can download the prebuilt CRISPRme Docker image by running the following command in a terminal:
docker pull pinellolab/crisprme:latestThis command retrieves the latest pre-built CRISPRme image from Docker Hub and sets
it up on your system, ensuring all required dependencies and configurations are
included. :latest is the auto-updating default image; it runs on CPU out of the
box (fully supported — this is the default scoring path), and a GPU can optionally
accelerate the CRISPR-Bulge scorer on an NVIDIA host (add --gpus all + --compute-backend cuda). For a fully reproducible setup pin the exact release instead, e.g.
docker pull pinellolab/crisprme:v2.10.1.
Once the download is complete, the CRISPRme Docker image will be ready for use. To confirm the image is successfully installed, you can list all available Docker images by typing:
docker imagesLook for an entry similar to the following:
REPOSITORY TAG IMAGE ID CREATED SIZE
pinellolab/crisprme latest <image_id> <timestamp> ~7 GB on Apple Silicon (~16 GB on amd64)
The pull downloads about 5 GB on amd64 and 1.8 GB on Apple Silicon (arm64). docker images
shows what the image takes on disk once unpacked: about 7 GB on Apple Silicon, and about 16 GB
on amd64, whose CRISPR-Bulge scorer env carries the CUDA build of TensorFlow. Both figures
include the download, which the containerd image store of Docker Desktop (and of Docker Engine
from version 29, on a fresh install) keeps beside the unpacked image; on Docker Engine's classic
overlay2 store, the amd64 image takes about 11 GB.
You are now ready to run CRISPRme using Docker.
Smoke-test the image with the brute-force benchmark CI runs (the same self-test as a source install, in its Docker form). In an empty folder:
mkdir crisprme_test && cd crisprme_test
docker run --rm -e CRISPRME_ALLOW_ONDEMAND_BUILD=1 \
-v "${PWD}:/DATA" -w /DATA pinellolab/crisprme:latest \
crisprme.py complete-test --chrom chr22 --vcf_dataset 1000G --thread 8
# expect: 6 passed, 0 failed, 0 skipped
docker run --rm -v "${PWD}:/DATA" -w /DATA pinellolab/crisprme:latest \
crisprme.py validate-test --chrom chr22Pass the variable with -e, as above. Written in front of docker run
(CRISPRME_ALLOW_ONDEMAND_BUILD=1 docker run ...) it is set on your machine only, never in
the container, so complete-test looks for a prebuilt index, finds none, and exits with
status 2, having tested nothing. The run took about 25 minutes at 8 threads on an Apple
Silicon Mac in testing.
Use this to run the CRISPRme+ line (Python 3.11 + Dash 2.x) from a checkout, for development or on a Linux system where you prefer not to use Bioconda. It installs the runtime dependencies into a conda environment, builds CRISPRitz 2.10.0 from source, and installs CRISPRme from the checkout — using the same layout the Bioconda/Docker builds use, so crisprme.py and crispritz.py end up on your PATH and resolve their support files correctly.
Prerequisites: Linux, conda/mamba, git, and internet access. A C++ compiler with OpenMP and every Python dependency are provided by the environment file below (no apt/system packages required), and GNU coreutils too, which the search and the builds run in place of the host's (Ubuntu 26.04's are uutils'; see §1.1.2).
macOS: use Docker (§1.2). The source build is Linux-only. CRISPRitz's index builder (
buildTST) uses GCC's parallel-mode STL (<parallel/algorithm>), which the macOS toolchain (Apple clang, or conda's clang with libc++) does not provide, andenvironment.ymllists tools with no macOS build (e.g.axelon Apple Silicon). The Docker image runs natively on Apple Silicon (linux/arm64).
# 1. clone the release (omit --branch for the development line on main)
git clone --branch v2.10.1 https://github.com/pinellolab/crisprme-plus.git
cd crisprme-plus
# 2. create + activate the runtime environment (pinned deps from environment.yml)
mamba env create -f environment.yml
mamba activate crisprme
# 3. build CRISPRitz 2.10.0 from source and install both tools into the env
bash install_from_source.sh
# 4. verify (both tools are now on your PATH)
crisprme.py --version
command -v crispritz.pyThe install_from_source.sh script compiles the CRISPRitz C++ binaries, then copies crisprme.py/crispritz.py into $CONDA_PREFIX/bin and their support trees into $CONDA_PREFIX/opt/…, and creates the dedicated cbulge conda env for the CRISPR-Bulge off-target scorer (set CRISPRME_SKIP_SCORER_ENV=1 to defer it — create it later with crisprme.py scorer-env create). CRISPRITZ_REF defaults to the v2.10.0 tag; override it with CRISPRITZ_REF=<tag> bash install_from_source.sh to build a different CRISPRitz revision.
Smoke-test the install with the brute-force benchmark CI runs: complete-test's benchmark mode downloads chromosome 22 with its 1000 Genomes variants, builds small test indexes and runs the full pipeline for every registered benchmark, and validate-test then compares the off-targets with the committed brute-force ground truth:
mkdir crisprme_test && cd crisprme_test
CRISPRME_ALLOW_ONDEMAND_BUILD=1 \
crisprme.py complete-test --chrom chr22 --vcf_dataset 1000G --thread 8
# expect: 6 passed, 0 failed, 0 skipped
crisprme.py validate-test --chrom chr22CRISPRME_ALLOW_ONDEMAND_BUILD=1 selects the benchmark mode: without it, complete-test runs the prebuilt-index smoke (§2.2.2), which needs an index you have downloaded and gives validate-test nothing to check. The run took 25 to 35 minutes at 8 threads in testing.
Notes:
- This is exactly the recipe the project
Dockerfileautomates — if you prefer full isolation, build the image instead (Section 1.2). - The
assembly-searchsubcommand lifts coordinates through chain files with thepyliftoverlibrary (included inenvironment.yml); no external liftOver binary is required. - To launch the web interface after installing:
crisprme.py web-interface(serves on port 8080 — open http://localhost:8080;--port 8090serves on another, where 8080 is taken).
CRISPRme is a tool designed for variant- and haplotype-aware CRISPR off-target analysis. It integrates robust functionalities for off-target detection, variant-aware search, and result analysis. The tool also includes a user-friendly graphical interface, which can be deployed locally to streamline its usage.
📄 Preparing inputs? See
docs/INPUT_FORMATS.mdfor PAM/guide file formats, chromosome naming, VCF and annotation requirements, bulge reporting, and how to estimate expensive searches.
CRISPRme operates within a specific directory structure to manage input data and
outputs efficiently. Everything lives inside one user-owned working folder (the CLI
--path, Docker -v $PWD:/DATA, or Apptainer --bind $PWD:/DATA --pwd /DATA). The
subdirectories below are shared inputs reused by every search; each run writes its
own outputs under Results/<job>/. Most of these are created for you by download /
first launch. See docs/DATA_LAYOUT.md for the full reads-vs-writes
map. The main subdirectories:
-
Genomes
- Purpose: Stores reference genomes.
- Structure: Each reference genome resides in its own subdirectory.
- Requirements: The genome must be split into separate files, each representing a single chromosome.
-
VCFs
- Purpose: Contains variant data in VCF format.
- Structure: Similar to the Genomes directory, each dataset has a dedicated subdirectory with VCF files split by chromosome.
- Requirements: Files must be compressed using
bgzip(with a.gzextension).
-
samplesIDs
- Purpose: Lists the sample identifiers corresponding to the VCF datasets.
- Structure: Tab-separated files, one for each VCF dataset, specifying the sample IDs.
-
Annotations
- Purpose: Provides genome annotation data.
- Format: Annotation files must be in BED format.
-
PAMs
- Purpose: Specifies the Protospacer Adjacent Motif (PAM) sequences for off-target search.
- Format: Text files containing PAM sequences.
-
genome_library
- Purpose: Holds the built/downloaded search indexes (
20-NRR_3_hg38,20-NRR_3_hg38+hg38_HGDP1kGP, …) — the largest, most load-bearing directory, wheredownload --what index/build-index-onlyplace their output.
- Purpose: Holds the built/downloaded search indexes (
-
Dictionaries
- Purpose: The variant registry / genotype /
log_indelstiers that variant- and indel-aware post-analysis depends on (fetched alongside a variant index).
- Purpose: The variant registry / genotype /
-
Assemblies
- Purpose: Per-individual personal assemblies used by
assembly-search(one folder per individual;download --what assemblypopulates it).
- Purpose: Per-individual personal assemblies used by
The directory organization required by CRISPRme is illustrated below:
Running the examples. Each example below is the bare
crisprme.py <command> …. To run it in Docker, prefix it withdocker run --rm -v "${PWD}:/DATA" -w /DATA -i pinellolab/crisprme:latest(add-p 8080:8080forweb-interface; on an NVIDIA host add--gpus allto run the CRISPR-Bulge scorer on the GPU). Pin:v2.10.1instead of:latestfor reproducibility. From a source / Conda install, run it as-is inside the activatedcrisprmeenvironment.
This section provides a comprehensive overview of CRISPRme's core functions, detailing each feature, the required input data and formats, and the resulting outputs. The following is a summary of CRISPRme's key features:
-
Complete Search (
complete-search)
Executes a genome-wide off-targets search across both reference and variant datasets (if specified), conducts Cutting Frequency Determination (CFD) and CRISPR-Bulge analyses (if applicable), and identifies candidate targets. -
Assembly Search (
assembly-search)
Searches a personal / HPRC diploid assembly (paternal + maternal haplotype FASTAs) directly for off-targets, lifting each haplotype to hg38 and reconciling them — no VCF inference. See the assembly-search web guide. -
Generate Report (
generate-report)
Builds a self-contained, easily shareable off-target assessment report for a completed run — a single slim ZIP bundling an offlinereport.html(embedded plots, the top-1000 off-target table, a recommended validation panel) and the per-tier curated TSVs, kept small and focused for sharing. Add--report-fullto also bundle the heavy data (completeintegrated_results.tsv.gz, raw co-occurrence dump, high-variant-density BED). It runs automatically at the end of everycomplete-search, and can be re-run standalone on anyResults/<jobid>folder. -
Complete Test (
complete-test)
Tests CRISPRme pipeline on a small input dataset or the full genome, enabling users to validate the tool's functionality before performing large-scale analyses. -
Off-target sites validation Test (
validate-test)
Validates off-target sites generated by the Complete Test workflow by comparing CRISPRme predictions against brute-force ground-truth alignments derived from 1000 Genomes variant data. -
Targets Integration (
targets-integration)
Combines in silico predicted targets with experimental data to create a finalized target panel. -
Targets Scoring (
targets-scoring)
Scores a supplied list of off-target sites (e.g. Cas-OFFinder output) with the CRISPRme+ CFD + CRISPR-Bulge calculations and an optional per-site variant carrier overlay — no genome search. -
Extract Flanks (
extract-flanks)
Writes the genomic sequence around each off-target of a shortlist — the reference flank and one flank per distinct observed haplotype (the--max-haplotypesmost carried, 10 by default;--max-haplotypes 0writes every one), with the samples carrying each and the protospacer marked — so a site can be turned into a validation oligo order. The window is anchored on the target's two ends and parametric (3 nt beyond the protospacer and 6 beyond the PAM by default: a 32-mer for a 20-nt spacer), with named presets, a--filterover the table's own columns, and a mode that writes the REF and ALT sequences back as columns of your own table. -
GNOMAD Converter (
gnomAD-converter)
Transforms GNOMAD VCFs (vcf.bgzformat) into a format compatible with CRISPRme. The function supports VCFs from GNOMAD v3.1, v4.0, and v4.1, including joint VCFs. -
Generate Personal Card (
generate-personal-card)
Generates a personalized summary for a specific sample, identifying all private off-targets unique to that individual. -
Setup Legacy Database (
setup)
Initializes the CRISPRme legacy database by downloading reference genomes, variant datasets, PAM definition files, and all associated resources originally distributed through the CRISPRme web server. The downloaded resources can be reused across analyses, eliminating the need for repeated downloads and simplifying environment setup. -
Web Interface (
web-interface)
Launches CRISPRme's interactive web interface, allowing users to manage and execute tasks directly via a local browser.
The Complete Search function performs an exhaustive variant- and haplotype-aware off-target analysis, leveraging the provided reference genome and variant datasets to deliver comprehensive results. This feature integrates all critical stages of the CRISPRme pipeline, encompassing off-target identification, functional annotation, and detailed reporting.
Quickstart (batteries install). After the Docker
quickstart download, a variant-aware search is a
single command — download --what index already wrote the list_vcf.txt /
list_samplesID.txt the search reads, and the guide is auto-padded to the PAM:
# 20-nt spacer + NNN for the PAM positions
printf '%s\n' CTAACAGTTGCTTTTATCACNNN > my_guide.txt
docker run --rm -v "${PWD}:/DATA" -w /DATA pinellolab/crisprme:latest \
crisprme.py complete-search \
--genome Genomes/hg38 --pam PAMs/20bp-NRR-SpCas9.txt \
--guide my_guide.txt --vcf list_vcf.txt --samplesID list_samplesID.txt \
--annotation Annotations/dhs+encode_screenv4+gencode+cosmic.hg38.bed.gz \
--gene_annotation Annotations/gencode.protein_coding.bed.gz \
--mm 4 --bDNA 1 --bRNA 1 --output my_search --thread 4
# ^ the recommended default: 4 mismatches + 1 DNA + 1 RNA bulge = a 6-edit budget, matching
# the default --max-total-edits 6, so nothing (incl. SNP+indel co-occurrences) is pruned.
# Raise the per-type caps for a deeper search, but raise --max-total-edits to their sum too
# (more than 1 DNA + 1 RNA bulge: see "What the default search costs" below).
# shareable report: crisprme.py generate-report --result-dir Results/my_searchWhat the default search costs. On the indexes CRISPRitz 2.10.0 builds, which code every
allele of a split site, the immunoglobulin loci (IGL on chr22, IGH on chr14, IGK on chr2) hold
most of a variant search's raw targets: on chr22 the README guide (NRG) at the default budget
gives 766,427 SNP raw targets, 98.6% of them in IGL, and 5,891,413 indel raw targets with
CRISPRitz 2.10.0's fake-indel windows of 30/30 (4,487,567, 99.9% of them in IGL, with the
windows of 25/27 of its development). The bulges drive it: before the steps below, the README
guide's per-sample search of chr22 took 4 min at 4 + 0 + 0, 8 min with one bulge of either type
and 96 min at 4 + 1 + 1 (measured during development, 16 threads, on a loaded node). The post-analysis
now skips the raw targets no sample's genotypes can produce (the exact haplotype pre-check),
skips the overlaid indel targets no carrier of their indel can have, and runs each chromosome in
pieces over the --thread workers, with the same results: on 16 threads the default search of
chr22 took 8 to 11 min per sample (98 min without these steps, on the same node), about what one
bulge costs (8 min at 4 + 1 + 0 or 4 + 0 + 1), and 23 to 32 min population-level (121 min
without these steps). On HGDP + 1000 Genomes, a dense panel of 4,091 samples, per sample is thus
the faster mode; on a small panel such as HPRC (232 samples) the same search of chr22 took 14 to
17 min per sample against 9 to 12 min population-level. These times were measured during
2.10.0's development, on windows of 25/27; the release's windows of 30/30 make the indel search
write about 30% more raw targets. On 30/30, the integration's gate, 8 threads a search with many
searches at once on a node of 256 hardware threads, took 10 min per sample (12 with NRR, the
default PAM) and 31 min population-level for the README guide (NRG) on chr22, 14 and 9 min on
HPRC, and, with mega beside HGDP + 1000 Genomes (NRR), 17 min per sample against 39 min
population-level: since the sites-only density guard (below) withholds mega's densest windows,
per sample is the faster beside mega too (before the guard, 96 to 107 min per sample, 54 to 62
min of it the report, against 49 to 55).
Genome-wide, on the rebuilt indexes, the default search (the README guide, NRR) took 4 h 16 min to
4 h 32 min per sample and 6 h 13 min to 6 h 27 min population-level on 16 threads (the estimate made
from its parts before the rebuild was 1.5 to 4 h per sample), and 4 h 33 min and 7 h 0 min on 8
threads, the default (on a shared node). Against 2.8.1, on 32 threads, a
per-sample search of HGDP + 1000 Genomes took 0.95 to 1.30 times 2.8.1's time and one of HPRC 0.90
(0.96 population-level; HPRC v2.1's data against 2.8.1's v2.0: 0.86 % more records, and alleles
gained and lost), but the README guide's population-level search of HGDP + 1000 Genomes with
NRG took 2.2 times 2.8.1's: 2 h 29 min against 1 h 8 min. Its searches took about 2.8.1's time;
its post-analysis, which reads no haplotype and so skips none of the dense windows (the
immunoglobulin loci's and others'), did not; a faster one is planned for a later release
(METHODS.md says how).
Above 1 DNA + 1 RNA bulge the variant search itself explodes in those loci (IGL alone, at the
default --max-total-edits of 6: 5.1 million SNP raw targets at 4 + 2 + 1, 33.7 million at
4 + 2 + 2, where the indel search, on windows of 25/27, wrote 204 million and needed 157 GB of
memory; with the cap raised to the budget's sum, 7.9 and 93.8 million SNP raw targets), and
complete-search warns, unless --max-total-edits 3 or less bounds the alignments (6 + 2 + 2 at
a cap of 3 wrote fewer raw targets there than the default). For a wider search, raise --mm
first. A later release of CRISPRme+ is planned to search, in those regions, the samples' own
haplotypes, indels included, in place of the variant genome's combinations, per sample (the
haplotype scan; CRISPRitz 2.10.0 already holds what it needs, and the indexes of 2.10.0 serve it
as they are).
See METHODS.md
§5.
The example below shows every argument (a classic setup with a custom VCF config file and base-editing options); see the CLI guide for each one.
Usage Example for the Complete Search function:
crisprme.py complete-search \
--genome Genomes/hg38 \
--vcf vcf_config.1000G.HGDP.txt \
--guide sg1617.txt \
--pam PAMs/20bp-NRR-SpCas9.txt \
--annotation Annotations/dhs+encode_screenv4+gencode+cosmic.hg38.bed.gz \
--gene_annotation Annotations/gencode.protein_coding.bed.gz \
--samplesID samplesIDs.1000G.HGDP.txt \
--be-window 4,8 \
--be-base A,G \
--mm 4 \
--bDNA 1 \
--bRNA 1 \
--merge 3 \
--sorting-criteria-scoring mm+bulges \
--sorting-criteria mm,bulges \
--output sg1617-NRR-1000G-HGDP \
--thread 8(Each argument is documented under Input Arguments below.)
Below is a detailed list of the input arguments required or optionally used by the Complete Search function. Each parameter is explained to ensure clarity in its purpose and usage:
General Parameters
-
--help
Displays the help message with usage details and exits. Useful for quickly referencing all available options. -
--output(Required)
Specifies the name of the output directory where all results from the analysis will be saved. This directory will be created within theResultsdirectory. The web interface opens the results of a search named with letters, digits,.,_and-only, beginning with a letter or digit; its History lists one named otherwise and says why it does not open it. -
--thread(Optional - Default: 8)
Defines the number of CPU threads to use for parallel computation. Increasing the number of threads can speed up analysis on systems with multiple cores. -
--debug(Optional)
Runs the tool in debug mode.
Input Data Parameters
-
--genome(Required)
Path to the directory containing the reference genome in FASTA format. Each chromosome must be in a separate file named after it (e.g.,chr1.fa,chr2.fa, etc.), whose header line is the name alone (>chr1).python PostProcess/genome_layout.py --split <folder>lays out a folder so, and a search or index build that finds otherwise says so. -
--vcf(Optional)
Path to text config file listing the directories containing VCF files to be integrated into the analysis. When provided, CRISPRme conducts variant- and haplotype-aware searches. If not specified, the tool searches only on the reference genome. -
--guide
Path to a text file containing one or more guide RNA sequences (one per line) to search for in the input genome and variants. This argument cannot be used together with--sequence. -
--sequence
Path to a FASTA file listing guide RNA sequences. This argument is an alternative to--guideand cannot be used simultaneously. -
--pam(Required)
Path to a text file specifying the PAM sequence(s) required for the search. The file should define the PAM format (e.g.,NGGfor SpCas9).
Annotation Parameters (Optional)
-
--annotation
Path to a BED file containing genomic annotations, such as regulatory regions (e.g., DNase hypersensitive sites, enhancers, promoters). These annotations provide functional context for identified off-targets. -
--gene_annotation
Path to a BED file of gene information (e.g. GENCODE protein-coding annotations). Used for a nearest-feature lookup (not an overlap): it adds the closest gene and its signed distance to every scored off-target — reported asAnnotation_closest_gene_name,Annotation_closest_gene_IDandAnnotation_closest_gene_distance_(kb)in the full results (curated report tables showGene+Gene_distance_kb; distance0.0= overlapping, negative = the other side of the feature). Available for bothcomplete-searchandassembly-search(where sites with no hg38 coordinate get no closest gene). Independent of--annotation; needs BEDOPS (closest-features/sort-bed).
Base Editing Parameters (Optional)
-
--be-window
Specifies the editing window for base editors, defined as start and stop positions relative to the guide RNA (1-based, comma-separated). This defines the region of interest for base-editing analysis. -
--be-base
Defines the target nucleotide(s) for base editing. This is only used when base editing functionality is needed.
Sample-Specific Parameters (Optional)
--samplesID
Path to a text config file listing sample identifiers (one per line) corresponding to VCF datasets. This enables sample-specific off-target analyses. Optional: without it a variant search usessamplesIDs/<dataset>.samplesID.txtfor each dataset that has one (an index download installs it), and with none the search still runs and names carriers, with empty by-sample and population tables.
Search and Merging Parameters
-
--mm(Required)
Maximum number of mismatches allowed during off-target identification. -
--bDNA(Optional, default1)
Maximum allowable DNA bulge size. If omitted (together with--bRNA), it defaults to 1 (one DNA bulge), bounded by the bulge depth the installed index supports — the recommended single-bulge default (the CRISPR-Bulge ML scorer's validated domain). Pass it explicitly for a deeper search; on the indexes CRISPRitz 2.10.0 builds, more than 1 DNA + 1 RNA bulge makes the variant search of the dense loci explode andcomplete-searchwarns (see What the default search costs), so raise--mmfirst. If no index the search can use holds bulges (in the working directory'sgenome_library/or at--index-path; a reference index that can be built from the--genomefolder counts), the search stays bulge-free and prints aWARNINGthat says so. -
--bRNA(Optional, default1)
Maximum allowable RNA bulge size. See--bDNA— defaults to one RNA bulge when neither is given. -
--max-total-edits(Optional, default6)
Cap on the combined number of edits (mismatches + DNA/RNA bulges) considered per candidate off-target, and — when--bDNA/--bRNAare omitted — the budget the per-type bulge caps are derived from. Lower values speed up dense-variant searches; raise it to recover targets with many simultaneous edits. On an index that codes every allele (CRISPRitz 2.10.0), more than 1 DNA + 1 RNA bulge makes the variant search of the dense loci explode unless this cap is 3 or less:complete-searchwarns, keeps the warning in the run's.Params.txt, and the run'slog_verbose.txthas it (a web search's too; see What the default search costs). A positive value is required: set it tomm + bDNA + bRNA(the sum of the per-type caps) to keep every requested-depth alignment; negative values are rejected. (This is a different knob from theCRISPRME_IUPAC_CAPenvironment variable, where-1disables the per-window greedy IUPAC cap: a window spelling more than 2 to the powerCRISPRME_IUPAC_CAPsequences, 2¹⁰ by default, is reported by its greedy worst-case alignment, except by a--per-samplesearch of a genotyped index, which reports its carriers' own haplotypes and its reference row, as for any window (on an index without the dict-less tiers too since 2.10.0); see METHODS.md §5.)
NOTE: for a variant-created off-target you must also pass--vcf(or use a precomputed variant index); a reference-only search will not surface it regardless of this value. -
--max-degeneracy(Optional, off by default)
The most ambiguous columns a reported SNP variant row may rest on, unless its carriers hold its variants together on one phased haplotype: columns of the variant genome where the reference base would be a mismatch, or break the PAM, and the row's allele fits. Rows resting on two or more are rarely carried by anyone (on chr22 of HGDP + 1000 Genomes a real phased haplotype carries 5.6% of the alignments resting on two, 0.02% of those resting on four or more; METHODS.md §5). A worst-case alignment (population-level, or a dense window's) is cut back to the strongest within the cap; any other row resting on more without such carriers is left out.complete-searchsays per chromosome how many were cut back and left out, and the report states the cap. Variant searches only. It saves no time per sample (it acts after the genotypes are read). In a population-level search, whose rows no phased carrier confirms, a K below 4 leaves out off-targets real people carry (CONFIRMED rows of the IGH locus rest on up to 4 such columns): use K >= 4 there. With the cap, a population-level search skips before expanding them the raw targets every row of which would rest on more than K columns (the K-skip), and writes what the cap alone writes (the README guide's search of chr22 at K = 4: 8 to 10 min, against 16 to 18 min with the K-skip off and 23 to 32 min without the cap, on 16 threads, on the fake-indel windows of 25/27 of 2.10.0's development; on the release's 30/30, 9, 23 and 31 min in the integration's gate, 8 threads a search with many searches at once). -
--no-haplotype-precheck(Optional)
Turn off the exact haplotype pre-check of a per-sample search, its carriers-first twin on the indel side (which runs in either analysis mode) and the K-skip above; the notes each chromosome ends with inlog_verbose.txtsay which of them is off. Before a raw target of the variant genome is expanded into the haplotypes its carriers have, it is tested against the samples' genotypes, and skipped (its reference row is still written) when no sample, free to take at each variant column the reference base or any ALT it carries there, reaches the mismatch budget and the PAM. The results are the same either way (it never skips a target a row comes from); off, a dense region's raw targets are each expanded, as up to 2.8.1.CRISPRME_HAPLOTYPE_PRECHECKset to 0, false, no or off (in any case) does the same. (The post-analysis runs each chromosome in pieces over the--threadworkers;CRISPRME_POSTPROC_PIECES=0, read the same way, runs it as one process a chromosome, as up to 2.8.1; the files are the same.) -
--sites-only-density-guard <bits>/--no-sites-only-density-guard(Optional, on by default at 20 bits; 1 to 64)
The sites-only density guard (since 2.10.0). A sites-only dataset (themegapanel) has no genotypes to tell which combinations of a window's alleles anyone carries, and with every allele coded its windows in the immunoglobulin loci and some tandem repeats spell 220 sequences and more: they match nearly any guide, as combinations of ten variants and more, and their candidates cost most of a mega search's time. The guard withholds, from the SNP and the indel post-analysis of a sites-only dataset, every candidate whose window spells 2bits sequences or more, and lists the regions they lie in (*.sites_only_density_guard.bed, merged into the report'ssites_only_density_guard.bed; the report's inputs card says how many) and the windows themselves in the dense-region list (*.sites_only_density_guard.high_variant_density_regions.bed, the columns of the post-analysis's own,greedy=withheld; the SNP side one line a window, its four-allele positions too, the indel side one line a region,withheld-region, which notes only a row no window covers). The reference rows there, and every row of a genotyped dataset, are reported as always, and keep the noteHigh_variant_density_regiongives a row in a dense window, which says the guard withheld a sites-only dataset's alignments of that window; the run'slog_verbose.txtsays per chromosome what it withheld.--no-sites-only-density-guardanalyses every candidate. Measured at 4 mismatches and 1 + 1 bulges, a search of the mega rebuilt for 2.10.0 with the guard took 1.35 to 1.46 (chr22) and 1.53 to 1.73 (chr14) times the mega 2.8.1 published, in several measurements side by side on shared nodes during 2.10.0's development; unguarded, 4.4 to 4.9 times on chr22, and the chr14 search was projected at 12 to 16 h. Genome-wide, the release's timing gate measured the README guide's population-level search with NRR on the rebuilt mega at 1.21 times 2.10.0's search of 2.8.1's mega index (NRR_3_hg38+hg38_mega) and 1.18 times 2.8.1's own search of it (1 h 40 min against 1 h 22 min and 1 h 24 min, 32 threads). See METHODS §5. -
--per-sample(Optional)
Force per-sample genotype resolution into observed haplotypes for the SNP post-analysis. Reports each observed haplotype with CONFIRMED cis phasing, named carrier samples, and exact joint allele frequency, which come from the index's dict-less tiers. On an index without them (built without--samplesID, as the benchmarkcomplete-testbuilds its own) it names the carrier samples only, with theAFof the classic per-sample dictionaries (an indel's, of the index's indel log), which CRISPRitzadd-variantscopied from the VCF (see the MAF column below);complete-searchand the report's Search mode row say so (a population-level search's too, of what--per-samplegives there). (Up to 2.8.1 a dense window there could still be reported by its greedy worst-case alignment, whose listed carriers need not carry every variant in it; since 2.10.0 it gives the haplotypes its carriers have.) Rebuild it withbuild-index-only --samplesID, or use a prebuilt index. On a genotyped+PHASED index (HGDP + 1000 Genomes (the default), or HPRC) this is already the context-aware default; on a sites-only index (mega) it cannot resolve carriers (no genotypes) andcomplete-searchwarns. Its post-analysis skips the raw targets no sample can have (see--no-haplotype-precheck). To opt out of per-sample on a phased index use--population-level, which runs one worst-possible representative per variant window (exact worst-case CFD, dataset-level allele frequencies), lossless for detection; on the indexes CRISPRitz 2.10.0 builds it is the slower on a dense panel of many samples such as HGDP + 1000 Genomes, and can be the faster on a small panel such as HPRC (see What the default search costs). It replaces the removed--fullflag;--per-sampleis a genotype-resolution dial, not a speed dial (see METHODS §5). -
--no-prioritize-observed/--prioritize-observed/--gate-min-expected <E>(Optional)
The carrier gate (since 2.10.0). A population-level row of a genotyped dataset takes, per variant window, the alleles that match the guide best and lists every carrier of any of them, so two or more of them can sit on no one haplotype. By default the search checks each row's variants against the dataset's own phased genotypes (and its phased indel genotypes) and writes their tier to..._carrier_gate.tsv: A (two or more variants one phased haplotype carries together, or that reach the row's CFD without the variants that change neither it, nor the alignment's mismatches, nor its PAM — an allele at a PAM base the search's PAM leaves free, a mismatch for a mismatch scored alike; of the alignments the gate reads a CFD of, which the one ranked by CRISPR-Bulge score is not), B (one variant), C1 (two or more variants, each in the panel, that no haplotype of it carries together and none reaches the row's CFD without; or variants, a single one too, every haplotype carrying which has an indel in the target), C2 (a variant not in the panel: it cannot say). The report ranks a C1 row after every other row in the views ranked by the score of the alignment that is C1: a row whose highest-CFD alignment is C1 leaves the top-1000 by CFD, the CFD plots, the validation panel and the risk card's CFD bands, and one whose highest-CRISPR-Bulge alignment is C1 leaves the views ranked by that score, for a table of their own after the top-1000 (the panel's totals, as the summary matrix, count every row), and stay in the integrated results, which the gate does not change. A, B and C2 rows keep their place, and theObservedcolumn gives the tier's factual label (a row of one variant reads its carriers, unless every haplotype carrying it has an indel in the target).--no-prioritize-observedturns the gate off.--prioritize-observedchecks a sites-only dataset's rows (themegapanel) against the phased HGDP + 1000 Genomes genotypes (the genotype oracle: seedownload --what genotype-oracle; an installed index ofhg38_HGDP1kGP(20-NRR_3_hg38+hg38_HGDP1kGP) brings it too). In a search of a sites-only dataset a C2 row — one no panel can check — whose variants' frequencies fail the safeguards' bound (their product under 1e-06, or the rarest under 0.001; onmegaa SNP'sAF_maxas its registry holds it, a count over the nominal allele number of the sources that carry it, and an indel'sAF_max, also for a variant that a genotyped dataset searched beside it lists) is ranked after the others as a C1 row is, labelled... (below the 1e-06 / 0.001 bound, ranked after the others), and dropped from nothing; without the oracle every row of two or more variants of the sites-only dataset is checked against the bound alone (not checked against phased haplotypes (no panel)). In a per-sample search beside a genotyped dataset the gate reads the rows that name no carrier, the sites-only dataset's.--gate-min-expected(default 3) is the number of panel haplotypes expected to carry a combination if its variants were independent below which the gate calls a combination none carries "too rare to tell" (ranked after the others all the same); 0 turns that distinction off. A per-sample search of genotyped datasets alone needs no gate: its rows name their cis carriers (beside a sites-only dataset it reads that dataset's rows, above). See METHODS §5. -
--compute-backend {cpu,cuda,metal}(Optional)
ML-scorer compute device:cpu(default) |cuda(NVIDIA/Linux GPU) |metal(Apple Silicon, self-tests and falls back to CPU).complete-searchrefuses to start while the cbulge scorer env or its weights are missing or broken: fix it withcrisprme.py scorer-env create(diagnose withcrisprme.py scorer-env doctor), or setCRISPRME_SKIP_SCORER_ENV=1to run CFD-only (the CRISPR-Bulge scores read-1, and its risk score0). In Docker, the defaultpinellolab/crisprme:latestimage is GPU-capable — add--gpus alltodocker runon an NVIDIA host and pass--compute-backend cuda; it falls back to CPU when no GPU is present. See GPU acceleration for details.
Scratch space (
$CRISPRME_TMPDIR). A genome-wide run needs tens of GB of temporary scratch. On HPC nodes and in containers/tmpis often a small RAM-backedtmpfs, which can make a run fail with aNo space left/ temp-file error. SetCRISPRME_TMPDIRto a roomy, writable directory on your data disk and CRISPRme routes all temp there (its own + thesort-bed/bcftoolschildren):export CRISPRME_TMPDIR=/big/disk/crisprme_tmp(or, in Docker,-e CRISPRME_TMPDIR=/DATA/crisprme_tmp). It is created if missing. See Troubleshooting for this and other environment issues (disk, memory,/tmp, GPU, degenerate-PAM+bulges).
-
--alt-alignments/--no-alt-alignments(Optional)
Emit (or skip) the exhaustive alternative-alignments file (..._all_results_with_alternative_alignments.tsv— the non-best alignments at each locus). The default follows the analysis mode: off for the default population-level run (the report is built from the best alignment per locus, so this is a large, slow-to-build companion that nothing in the report reads), on under--per-sample. (assembly-searchreconciles haplotypes fromintegrated_results.tsvonly, so it does not need this file either.) Suppressing it does not change the report or any reported number. -
--merge(Optional - Default: 3)
Defines the window size (in base pairs) used to merge closely spaced off-targets. Pivot targets are selected based on the highest score (e.g., CFD, CRISPR-Bulge) or criteria defined by the--sorting-criteria. Since 2.10.0 the alignments that start inside one insertion (at its anchor, where such a row now starts) are placed together: they join the one site within this window and chain no two sites, and a target's alignments go with its alignment that starts on a reference base. So two written rows can lie within this window of each other, one of them an insertion's row beside a site it does not chain. See METHODS §4. -
--sorting-criteria-scoring(Optional - Default:mm+bulges,mm)
Specifies sorting criteria for merging when using CFD/CRISPR-Bulge scores. Options include:- mm: Number of mismatches.
- bulges: Total bulge size.
- mm+bulges: Combined mismatches and bulges.
-
--sorting-criteria(Optional - Default:mm+bulges,mm)
Sorting criteria used when CFD/CRISPR-Bulge scores are unavailable. Options are similar to--sorting-criteria-scoringbut tailored for simpler analyses. -
--keep-intermediates(Optional)
Keep the bulky pre-integration working files. By default, once the finalized*.integrated_results.tsvand the report are produced,complete-searchremoves the intermediate tables it no longer needs — the merged non-best*.altMerge.txt, the raw*_all_results_with_alternative_alignments.tsvand*_observed_haplotypes_raw.tsv(the compressed.zipof each is kept), and the per-chromosome*.population_summary.tsv— reclaiming on the order of ~15 GB on a genome-wide run. It also removes the sorted-annotation temp folders it made,crisprme_annot_*(for--annotation/--gene_annotation) andcrisprme_pannot_*(for--personal_annotation), in$CRISPRME_TMPDIRif set, else the working directory, once the run ends, even if it fails (a run stopped by Ctrl-C or a signal leaves them, since the pipeline may still be reading them); this flag keeps them too. Always kept (regardless of this flag):*.integrated_results.tsvand its.zip, the*.bestMerge.txtbest-alignments table (the web results page greps it live for the per-position cluster drill-down, so it must persist for the job to stay browsable), the*_report.zip, the alternative-alignments.zip, the per-chromosome co-occurrence / high-variant-density sidecars (so a latergenerate-report --report-fullcan rebuild those bundles), the per-guide/per-sample summaries,imgs/, and the SQLite.<job>.dbweb results-page index. Pass--keep-intermediatesto retain everything (e.g. for debugging or custom downstream parsing).
Note 1: Ensure compatibility between input files and genome builds (e.g., hg38 or hg19) to avoid alignment issues.
Note 2: Optional arguments can be omitted when not applicable, but required arguments must always be specified.
The Complete Search function generates a comprehensive suite of reports, detailing the identified and prioritized targets, along with statistical and graphical summaries. These outputs are essential for interpreting the search results and understanding the impact of genetic diversity on CRISPR off-target.
Output Off-targets Files Description
-
*.integrated_results.tsv-
Contents: A detailed file containing the top targets (
*.bestMerge.txt) enriched with annotations from the input files. Includes:- Gene proximity of off-targets —
Gene_distance_kbplus aGene_regioncolumn locating each off-target relative to the nearest protein-coding gene (CDS,5'UTR,3'UTR,exon,intron, orintergenic;intergeniciffGene_distance_kb > 0) - Overlaps with regulatory elements
- Gene proximity of off-targets —
-
Purpose: Integrates functional genomic context into the prioritization of off-targets.
-
-
*.all_results_with_alternative_alignments.tsv-
Contents: Comprehensive listing of all identified targets, including alternative alignments. Annotated with:
- Gene proximity
- Overlaps with regulatory elements
-
Purpose: Facilitates a full exploration of CRISPRme's off-target predictions and their functional relevance.
-
Note: emitted by analysis mode — off in population-level runs (
--population-levelon genotyped indexes, or the default on sites-only/unphased indexes), on in per-sample runs (the default on genotyped+phased indexes, or under--per-sample); force either way with--alt-alignments/--no-alt-alignments. Nothing in the report reads it.
-
Co-occurrence companion outputs (the default-on SNP+SNP / SNP+indel co-occurrence feature; both are bundled into the report ZIP):
2a. *.indel_snp_cooc.tsv
- **Contents**: Off-targets requiring **both** a nearby SNP **and** an
indel in the same protospacer window — chrom, indel pos/ref/alt, off-target start,
strand, SNP positions + rsIDs, phase (`CONFIRMED`/`PUTATIVE`), joint AF, cis-carrier
count (of every carrier), and carrier samples (the first 50 by name). The indel
post-analysis writes the file before the merge picks each cluster's alignments, one
line per engine alignment, required SNP set and phase (an alignment that needs no SNP
writes no line). The SNPs are the alts the alignment's rows require (the guide's own
base at a protospacer position, or a base that creates the PAM), and the carriers are
those rows': individuals whose own haplotype holds the indel and those SNP alts
(PUTATIVE: phase unknown, or no genotypes). A population-level run, which writes no
alternative alignments, can have lines with no row in its tables.
- **Purpose**: Surfaces SNP+indel co-occurring off-targets, which the classic
two-independent-passes search could not see.
2b. *.snp_snp_cooc.tsv
- **Contents**: One row per off-target requiring **≥2** nearby SNP alt alleles
together — Chromosome, Position, Direction, crRNA, DNA, SNP positions, rsIDs, Phase,
`MinAF_bound`, N carriers, and carriers.
- **Purpose**: Surfaces SNP+SNP co-occurring off-targets.
Both companions are joinable to the `bestMerge` tables by
`(Chromosome, Position, Direction, crRNA, DNA)`.
Guide-Specific Summary Files
These files summarize off-target statistics per guide sequence based on different sorting criteria.
-
*.summary_by_guide.<guide-sequence>_CFD.txt-
Contents: Summarizes off-target counts per guide using the CFD score as the primary sorting criterion (data derived from
*.integrated_results.tsv). Includes counts of:- Targets by bulge type (DNA, RNA).
- Mismatch number and bulge size.
- Targets in the reference genome, variant genome, and those caused by PAM creation due to variants.
-
Purpose: Provides insight into the distribution and characteristics of off-targets prioritized by CFD score.
-
-
*.summary_by_guide.<guide-sequence>_CRISPR-Bulge.txt-
Contents: Summarizes off-target counts per guide using the CRISPR-Bulge score as the primary sorting criterion (data derived from
*.integrated_results.tsv). Includes counts of:- Targets by bulge type (DNA, RNA).
- Mismatch number and bulge size.
- Targets in the reference genome, variant genome, and those caused by PAM creation due to variants.
-
Purpose: Provides insight into the distribution and characteristics of off-targets prioritized by CRISPR-Bulge score.
-
-
*.summary_by_guide.<guide-sequence>_fewest.txt-
Contents: Summarizes off-target counts per guide using the fewest mismatches and bulges as the sorting criterion.
-
Purpose: Highlights off-targets that are closest to perfect matches, providing an alternative prioritization method.
-
Sample-Specific Summary Files
These files focus on off-targets unique to individual samples and their populations.
-
*.summary_by_samples.<guide-sequence>_CFD.txt-
Contents: Counts of private off-targets per sample, sorted by CFD score. Reports targets:
- Private to the sample.
- Found in the population or superpopulation.
- Resulting from PAM creation due to a variant.
-
Purpose: Quantifies sample-specific off-targets and their broader population impact.
-
-
*.summary_by_samples.<guide-sequence>_CRISPR-Bulge.txt- Contents: Similar to the CFD-based sample summary but uses the CRISPR-Bulge score for sorting.
-
*.summary_by_samples.<guide-sequence>_fewest.txt- Contents: Summarizes private off-targets using the fewest mismatches and bulges as the sorting criterion.
Graphical Output
-
imgsdirectory-
Contents: Contains visual representations of the top 1000 targets based on CFD score, CRISPR-Bulge score, and Fewest mismatches and bulges. Images include:
- Bar plots showing the distribution of targets across populations and bulge types.
- Graphical summaries illustrating the impact of genetic variants on mismatches, bulge size, and scores.
-
Purpose: Facilitates easy interpretation and presentation of CRISPRme results.
-
The Complete Test module verifies the correct installation and functionality
of CRISPRme by running the built-in example guide against a prebuilt index that
you have already downloaded (or built); its benchmark mode is described under Two
modes below. By default it does not build an index or
auto-download all the data for you: CRISPRme never auto-builds an index, so if no
prebuilt index is present, complete-test prints guidance to download one (e.g.
crisprme.py download --what index --index-name 20-NRR_3_hg38+hg38_HGDP1kGP) and
exits with status 2, having run nothing.
Once an index is available, complete-test runs the example search end-to-end
and produces the same set of outputs as Complete Search, confirming that the
installed tool works as expected. It searches the example guide (up to 2 mismatches
plus one DNA and one RNA bulge) against a variant index in genome_library/ (else a
reference one), in the analysis mode Complete Search picks for that index (per-sample on a
phased genotyped index such as 20-NRR_3_hg38+hg38_HGDP1kGP). Of several it takes a 3′ index
of a 3-nt PAM first (NGG, NRG, NRR), then NNN, then any other PAM, and an all-N index
wider than 3 nt last. It searches each in its own geometry: an all-N index wider than 3 nt
(the published general index, 20-NNNNNNNN_3, or 2.8.1's NNNNNNNN_3) for NRR, the default PAM, with --prune-pam, and any other for its own PAM, with
the example guide padded for it, on the side of the guide its name (the 2.10.0 form), the
header of its .bin files (index format 2) or its .pam_build records (the 3′ side without
any). With another nuclease's PAM the example guide may have no off-target in
the genome, which passes as an empty result.
With --chrom (e.g. --chrom chr22) it searches that chromosome only. It runs from a per-run view
of the working directory in which that chromosome is the only one: a hidden .crisprme-test-view-*
folder of symlinks, removed when the run ends. So its result tables hold exactly the off-targets the
whole-genome test reports on that chromosome (the shareable report's top-1000 view then ranks that
chromosome alone, so it can list sites the whole-genome report ranks below its top 1000), for a
fraction of the cost: with 20-NRR_3_hg38+hg38_HGDP1kGP, --chrom chr22 peaked at 9.2 GiB of RAM
and took about 3 minutes at 16 threads (4.9 GiB and about 3 minutes with
20-NRG_3_hg38+hg38_HGDP1kGP; the release's gates, on a shared node). A chromosome that holds none
of the example guide's off-targets, as chrM and most contigs of 2.8.1's reference-only
NRG_3_hg38 do, passes with an empty result, which Complete Search ends without an
integrated_results.tsv. A chromosome that the genome or the index does not have is refused in one
line naming those it has. Without --chrom it searches every chromosome of the index's genome;
with a variant index such as 20-NRR_3_hg38+hg38_HGDP1kGP that is a genome-wide variant search,
which needs the memory given in §0 (64 GB or more).
This module is suited for:
-
Initial Installation Verification: Test whether CRISPRme has been installed correctly and is functioning as expected before running actual analyses.
-
System Configuration Testing: Validate the compatibility of CRISPRme with different system configurations (e.g., varying thread counts, datasets).
-
Dataset Evaluation: Confirm that the variant-aware index you downloaded (e.g. the default
20-NRR_3_hg38+hg38_HGDP1kGP) searches correctly end-to-end.
Usage Example for the Complete Test function (run after downloading a prebuilt
index, e.g. crisprme.py download --what index --index-name 20-NRR_3_hg38+hg38_HGDP1kGP;
with no option at all, complete-test prints its help):
crisprme.py complete-test \
--chrom chr22 \
--thread 4Leave out --chrom to test the whole genome.
Below is a detailed list of the input arguments required by the Complete Test function, including detailed explanations and default behaviors:
General Parameters
-
--help
Displays the help message with details about the available options and exits the program. -
--thread(Optional - Default: 4)
Specifies the number of threads to use for the computation, allowing for parallel processing. -
--debug(Optional)
Runs the tool in debug mode.
Input Data Parameters (Optional)
--chrom
Specifies the chromosome to test. The chromosome identifier must be prefixed with chr (e.g., chr22). The prebuilt-index smoke searches only that chromosome of the index's genome, and refuses one that the genome or the index does not have; the benchmark mode (see Two modes below) downloads and tests that chromosome. Default behavior: the entire genome.
Note:
complete-test's default smoke requires a prebuilt index to already be present. CRISPRme never auto-builds an index; download one first withcrisprme.py download --what index --index-name 20-NRR_3_hg38+hg38_HGDP1kGP. If no index is found,complete-testprints this guidance and exits with status 2, having run nothing; an index whose genome is not there gets the command that downloads the genome, and status 2 too.
Two modes. By default
complete-testruns the prebuilt-index smoke above — the example guide against whichever prebuilt index you downloaded (recommended: the default20-NRR_3_hg38+hg38_HGDP1kGP). WithCRISPRME_ALLOW_ONDEMAND_BUILD=1set it runs the benchmark mode instead: it downloads the chromosome and the raw--vcf_datasetVCFs (1000G[default],HGDPor1000G+HGDP), builds small test indexes on the fly and runs every registered benchmark. That is what the brute-forcevalidate-test(§2.2.3) checks, for a 1000 Genomes run only.--vcf_dataseton its own does not select this mode. The self-test, as CI runs it:CRISPRME_ALLOW_ONDEMAND_BUILD=1 \ crisprme.py complete-test --chrom chr22 --vcf_dataset 1000G crisprme.py validate-test --chrom chr22It fits in 16 GB of RAM (measured peak 3.66 GB, in the variant enrichment that every benchmark needs).
CRISPRME_SKIP_HEAVY=1oncomplete-testleaves out the bulge-2 benchmarks, which saves time on a slow machine, not memory, andvalidate-testthen ends2 passed, 0 failed, 4 skipped.
The results generated by the Complete Test function are saved in a subdirectory
within the Results directory, named crisprme-test-out (the benchmark mode writes one
crisprme-test-out_<benchmark> folder per benchmark). To run a mode again in the same
folder, delete its folders first: complete-test names every one that is there in one line
and exits with status 2, having run nothing. The smoke's folder does not stop the benchmark
mode, nor the benchmark mode's folders the smoke.
The output folder contains the same set of files produced by the Complete Search functionality, including:
-
Detailed target reports that prioritize off-target candidates based on various criteria.
-
Summaries categorized by guides and samples.
-
Graphical representations of results, such as bar plots and impact assessments of genetic variants on target metrics.
For a detailed description of the contents of these files, please refer to the corresponding subsection in Complete Search.
Finally, the off-target sites generated by the benchmark mode can be validated using the Off-Target Sites Validation Test functionality, which compares CRISPRme predictions against brute-force ground-truth results (the prebuilt-index smoke leaves nothing for it to check). For additional details on this validation step, refer to the Off-Target Sites Validation Test section in the documentation.
The Validate Test functionality provides a systematic validation of off-target sites generated by the Complete Test workflow in CRISPRme. This module evaluates the correctness and completeness of CRISPRme’s variant-aware off-target predictions by comparing them against results obtained through a brute-force search and alignment strategy, serving as a ground-truth reference.
The validation step is designed to ensure robustness and reliability of the pipeline, particularly when working with large-scale population variant data.
⚠️ Important Requirements
complete-testmust have been run beforehand, in its benchmark mode and in the same folder (see §2.2.2):CRISPRME_ALLOW_ONDEMAND_BUILD=1 crisprme.py complete-test --chrom chr22 --vcf_dataset 1000G. Anywhere else, including after the prebuilt-index smoke,validate-testfinds nothing to check, says so in one line and exits 1- Validation is supported only when
complete-testwas run using 1000 Genomes Project variant data
Usage Example for the Off-Target Sites Validation Test function:
crisprme.py validate-test \
--chrom chr22Give validate-test the same --chrom as the benchmark-mode complete-test run: the
target reports it reads are named after it, so after a --chrom chr22 run,
validate-test without --chrom finds none and exits 1.
Below is a detailed list of the input arguments supported by the Off-Target Sites Validation Test function, including their purpose and default behavior:
General Parameters
-
--help
Displays the help message with details about the available options and exits the program. -
--debug(Optional)
Runs the tool in debug mode.
Validation Parameters
--chrom(Optional)
Restricts validation to a specific chromosome (e.g., chr22); use the--chromthe benchmark-modecomplete-testran with. If not provided, the whole-genome target reports of acomplete-testrun without--chromare validated.
The Off-Target Sites Validation Test functionality does not generate new result files. Instead, it performs an in-place validation of the off-target sites produced by the Complete Test workflow and reports the outcome directly through standard output and error streams.
At completion, the Off-Target Sites Validation Test produces a validation summary that includes:
- Confirmation of a successful validation when the CRISPRme and brute-force off-target sites match exactly.
- Detailed diagnostics in case of discrepancies, including:
- Total number of off-target sites in each set
- Number of sites missing from CRISPRme predictions
- Number of extra sites detected only by CRISPRme
- Example mismatched sites to aid debugging
The Targets Integration function enables the seamless combination of computationally predicted off-targets identified by CRISPRme with experimentally validated off-targets, such as those obtained from GUIDE-seq, CIRCLE-seq, or other high-throughput methods. This integration enhances the interpretability and reliability of CRISPRme’s results by merging empirical data with in silico predictions.
This module supports integration with user-provided datasets in BED format,
enabling flexibility in validation sources. Targets Integration
Usage Example for the Targets Integration function:
Note: the
--outputfolder must already exist —targets-integrationerrors out if it does not. Create it first withmkdir -p.
mkdir -p integrated_targets_dir
crisprme.py targets-integration \
--targets results.integrated_results.tsv \
--empirical_data empirical_data.bed \
--output integrated_targets_dirBelow is a detailed list of the input arguments required by the Target Integration function, including detailed explanations and default behaviors:
General Parameters
--help
Displays the help message with details about the available options and exits the program.
Input Data Parameters
-
--targets(Required)
Specifies the file containing targets identified and processed from a CRISPRme search. This file should include predicted off-target data such as mismatch counts, bulge sizes, and scores (e.g., CFD, CRISPR-Bulge). -
--empirical_data(Required)
Path to aBEDfile containing empirically validated off-targets. This file typically includes genomic coordinates and additional metadata from experiments such as GUIDE-seq or CIRCLE-seq. Ensure that theBEDfile format adheres to standard conventions for compatibility. -
--output(Required)
Name of the directory where the resulting integrated targets file will be saved.
The Targets Integration module generates output files that merge
computationally predicted targets from CRISPRme with experimentally validated
off-targets provided in the BED file. The integrated data is stored in the
specified output directory and includes the integrated_results.tsv. This
tab-separated file contains the combined list of off-target sites. Each entry
represents a merged record from CRISPRme predictions and empirical data, where
overlaps are identified based on genomic coordinates.
The GNOMAD Converter function is a utility designed to preprocess and convert GNOMAD VCF files into a format compatible with CRISPRme for off-target analysis. This tool facilitates the inclusion of population-level genetic variation data from GNOMAD into CRISPRme.
The converter currently supports VCF files from the following GNOMAD versions:
- v3.1
- v4.0
- v4.1, including joint VCF files (exomes + genomes).
Since individual sample data are not available in GNOMAD VCFs, the tool treats each GNOMAD population as a pseudo-individual sample. This supports population-based statistical analyses in CRISPRme (such as identifying population-specific off-targets), but is not suitable for applications requiring individual-level granularity.
Note 1: For studies requiring sample-specific statistics, GNOMAD is not recommended due to its population-level nature.
Note 2: The GNOMAD Converter function is particularly useful for creating GNOMAD-compatible datasets formatted for CRISPRme's population-aware off-target analysis.
To ensure a smooth conversion process, sample ID files compatible with GNOMAD VCFs must be provided. These files are available for download from the CRISPRme GitHub repository:
The conversion process preserves all variant information necessary for CRISPRme analyses, including allele frequencies and genotypes (if applicable).
Usage Example for the GNOMAD Converter function:
crisprme.py gnomAD-converter \
--gnomAD_VCFdir gnomad_vcf_dir \
--samplesID samplesIDs.gnomad.v41.txt \
--keep \
--threads 4Below is a detailed list of the input arguments required by the GNOMAD Converter function, including detailed explanations and default behaviors:
General Parameters
-
--help
Displays the help message with details about the available options and exits the program. -
--threads(Optional - Default: 8)
Specifies the number of threads to use for the conversion, allowing for parallel processing. -
--debug(Optional)
Runs the tool in debug mode.
Input Data Parameters
-
--gnomAD_VCFdir(Required)
Specifies the directory containing the gnomAD VCF files to be processed and converted into a format compatible with CRISPRme. -
--samplesID(Required)
Path to a text file containing the sample IDs used during the conversion process (the per-population sample lists linked above). -
--joint(Optional)
Use this flag if GNOMAD VCFs being processed are joint VCFs, such as GNOMAD v4.1 joint variant files. Default Behavior: Assumes the input VCFs are not joint. -
--keep(Optional)
Use this flag to retain all variants during the conversion, regardless of the FILTER field value. Default behavior: Excludes variants that do not have aPASSvalue in the FILTER field. -
--multiallelic(Optional)
Joins the SNP records of one genomic position into a single line listing their ALTs, and its indel records into another (bcftools norm -m+). The converter writes unphased genotypes, so a population with two joined ALTs gets one such as1/2. CRISPRme reads each ALT of such a line with its own carriers, without phase, and gives each ALT the line's first ID (rs1ofrs1;rs2, as CRISPRitzadd-variantswrites it). Default behavior: Keeps one ALT per record, with its own ID, as the published panels are built (recommended).
The output of the GNOMAD Converter function consists of converted VCF files formatted to be compatible with CRISPRme. These files are stored in the same directory as the input VCF files. The conversion process ensures that the output adheres to CRISPRme's input specifications for population-level analysis. Below are details about the generated data:
File Naming Conventions
-
Multiallelic Variant Merging (
--multiallelic)
If multiallelic entries were generated by merging variants at the same position, the filename will include a tag such as*.multiallelic.*,*.biallelic.*otherwise. -
Joint Variant Files (
--joint)
If joint VCFs were processed, the filenames will be labeled accordingly, for example,*.joint.*.
Content of the Converted VCFs
-
Population Representation
The pseudo-individual sample columns (one per GNOMAD population) are written into each output VCF, so CRISPRme can run its population-based statistical analysis. -
Variant Quality
If the--keepflag is used, all variants from the input VCF are included, regardless of their quality as indicated in the FILTER field. Without the--keepflag, only variants with aPASSin the FILTER field are retained. -
Allele Representation
By default, the converter preserves biallelic representation, creating one row per variant. If the--multiallelicflag is used, the SNPs of one position are merged into one multiallelic entry, and its indels into another. -
Compatible Structure
The output files are structured to align with CRISPRme's population-aware off-target analysis, ensuring seamless integration into the tool's pipeline.
The Generate Personal Card functionality creates a sample-specific report, referred to as personal card. This report details all off-targets identified by CRISPRme for a given sample's unique genomic sequence. The report accounts for private variants (genetic differences specific to the sample not shared with other populations or individuals) and their potential impact on off-target editing outcomes.
This feature is particularly useful in scenarios where personalized gene-editing strategies are required, such as analyzing how private genetic variations influence the efficacy and safety of CRISPR-based interventions. The personal card provides the following key insights:
-
Identification of off-target sequences present exclusively in the sample due to private variants. This allows researchers to evaluate potential risks or opportunities unique to the individual’s genome.
-
Detailed information for each input guide, showing how private variants affect off-target sequences.
This functionality is a critical tool for advancing personalized medicine and precision genome editing, enabling researchers and clinicians to tailor CRISPR-based solutions to an individual’s unique genetic makeup.
Usage Example for the Generate Personal Card function:
crisprme.py generate-personal-card \
--result_dir Results/sg1617.4.1.1 \
--guide_seq CTAACAGTTGCTTTTATCACNNN \
--sample_id NA21129Below is a detailed list of the input arguments required by the Generate Personal Card function, including detailed explanations and default behaviors:
General Parameters
-
--help
Displays the help message with details about the available options and exits the program. -
--debug(Optional)
Runs the tool in debug mode.
Input Data Parameters
-
--result_dir(Required)
Specifies the directory containing the CRISPRme search results. The tool extracts the relevant targets from the reports available in this directory. Ensure this path includes all necessary output files generated by CRISPRme during the analysis (*.integrated_results.*). -
--guide_seq(Required)
The sgRNA sequence for which the sample-specific targets will be extracted. This argument ensures that the generated personal card is tailored to a specific guide of interest, enabling targeted analysis. -
--sample_id(Required)
The identifier of the sample for which the personal card will be created. This ID corresponds to the unique genetic profile being analyzed. Ensure the sample ID matches the format used in the input data to avoid discrepancies.
The Generate Personal Card functionality produces sample-specific outputs, allowing researchers to assess how private genetic variants influence CRISPR off-target activity.
Note 1: All output files include the sample ID in their file names for easy
identification and traceability (e.g., *.<sample_id>.*).
Note 2: Outputs are tailored to the specified guide sequence and sample ID, ensuring precise and personalized reporting.
Output Off-targets Files description
*.<sample_id>.<guide_seq>.private_targets.tsv
A detailed table reporting all off-target sequences specific to the sample. Extracted from the .integrated_results. file within the input directory. The report is generated in the results directory specified via--result_dir.
Graphical Output
imgsdirectory
The function generates plots illustrating the effect of private genetic variants on the sample-specific targets. Displays changes in the CFD and
CRISPR-Bulge scores, and number of Mismatches and Bulges highlighting off-target risk influenced by genetic variants.
The Setup Legacy Database functionality initializes the CRISPRme legacy database by downloading all reference genomes, variant datasets, PAM definition files, and associated resources originally distributed through the CRISPRme web server.
This functionality provides a convenient way to reproduce the original CRISPRme environment and ensures that all required resources are available locally before running analyses. Once downloaded, the resources can be reused across multiple analyses without requiring additional downloads, reducing setup time and improving reproducibility.
This feature is particularly useful when deploying CRISPRme on new systems, setting up shared computational environments, or preparing offline analysis workflows. The setup process provides the following key benefits:
- Automated download and organization of all required reference resources, eliminating the need for manual retrieval and configuration.
- Support for downloading either the complete database or chromosome-specific resources, allowing users to reduce storage requirements when working on targeted analyses.
- Reuse of downloaded resources across multiple CRISPRme runs, avoiding redundant downloads and ensuring consistent analysis environments.
This functionality serves as the foundation for CRISPRme analyses by providing all reference data and auxiliary resources required by downstream workflows.
Usage Example for the Setup Legacy Database function:
crisprme.py setup \
--path CRISPRme_databaseBelow is a detailed list of the input arguments supported by the Setup Legacy Database function, including detailed explanations and default behaviors:
General Parameters
--help
Displays the help message with details about the available options and exits the program.--debug(Optional)
Runs the tool in debug mode.
Database Configuration Parameters
--path(Optional)
Specifies the directory where the CRISPRme legacy database and all associated resources will be downloaded and installed. If not provided, the current working directory is used.--chrom(Optional)
Downloads resources associated with a specific chromosome only (for example, chr22). This option can significantly reduce download time and storage requirements when testing or performing chromosome-restricted analyses. By default, resources for all chromosomes are downloaded.--force(Optional)
Forces the download of all resources even if an existing CRISPRme database is already detected in the specified installation directory. This option is useful when repairing incomplete installations or refreshing previously downloaded data.
The Setup Legacy Database functionality creates a local CRISPRme database containing all resources required for downstream analyses.
Note 1: The exact directory structure depends on the resources available from the CRISPRme legacy repository and the selected download options.
Note 2: Downloaded resources are preserved and can be reused across multiple CRISPRme analyses without requiring additional setup steps.
Downloaded Resources
- Reference genome files
Genome assemblies required by CRISPRme for off-target identification and genomic coordinate annotation. - Variant datasets
Population-scale variant collections used to perform variant-aware off-target searches and population analyses. - PAM definition files
Configuration files describing PAM sequences and nuclease-specific targeting rules supported by CRISPRme. - Auxiliary resources
Additional metadata, indexes, and support files required by CRISPRme workflows and analysis modules.
Output Directory
- Installation directory specified by
--path
Contains the complete CRISPRme legacy database organized in a structure compatible with all CRISPRme analysis workflows.
The Web Interface module offers a user-friendly, locally hosted graphical user interface (GUI) for CRISPRme. This interface enables users to execute CRISPRme workflows and explore results interactively through a web browser, without requiring any external web service. This interface provides a complete interactive environment for running CRISPRme analyses locally.
The GUI allows users to submit CRISPRme jobs directly through the web interface. Users can upload input files, configure parameters, and monitor progress with ease.
The interface provides an intuitive way to explore the output files generated by CRISPRme. Users can filter targets by criteria such as mismatch count, bulge size, or scores (e.g., CFD or CRISPR-Bulge). The interface includes dynamic plots and charts. Results are presented in a structured, easy-to-navigate format, linking data to relevant genomic annotations. The web interface runs as a local server, ensuring data privacy and fast response times. Users can access it via their preferred web browser, with compatibility confirmed for: Google Chrome, Mozilla Firefox, and Safari. All functionalities are self-contained, eliminating the need for an internet connection. This is particularly useful for secure environments or systems without reliable internet access.
Usage example for the Web Interface function:
crisprme.py web-interface🌐 Accessing the interface from another machine (SSH tunnel). The server binds IPv4
0.0.0.0:8080. When forwarding it over SSH from a remote host, use the explicit IPv4 address as the forward target —localhostmay resolve to IPv6 (::1) and be refused:ssh -N -L 8080:127.0.0.1:8080 user@remote-host # then open http://localhost:8080
Below is a detailed list of the input arguments required by the Web Interface function:
-
--help
Displays the help message and exits. -
--debug(Optional)
Launches the local server in debug mode. This mode enables verbose logging, which is useful for troubleshooting and diagnosing issues during setup or operation. It provides detailed error messages and runtime information in the console.
This function does not generate output data in the form of files or reports. Instead, it serves to launch a local graphical user interface, which allows users to interactively explore and run CRISPRme analyses. All results are displayed dynamically within the web interface itself, offering an interactive experience for viewing CRISPRme data and outputs (see Section 2.2.1 for details).
The Generate Report function (generate-report) builds a self-contained,
easily shareable off-target assessment report for a completed CRISPRme run. It
produces a single ZIP (<jobid>_report.zip) in which report.html is the only
top-level file — open it — while every bundled data file sits under a data/
subfolder. report.html is fully offline (plots embedded as base64 PNGs, the
top-1000 table + CSS inline, no external dependencies), and every bundled file it
mentions links to it under data/ (one the ZIP does not hold, it says where it is).
It is a portable digest of the full interactive website result, aimed at sharing
off-target predictions (for example, to design a targeted-NGS / rhAMP-Seq
confirmation panel).
The report is SLIM by default. It bundles the human-facing layer — the
top-1000 tables (both scorers), the ~100-site validation panel, the non-empty
per-tier curated CFD/edit-distance TSVs, and the co-occurrence companion tables —
which keeps the shareable ZIP small (single-digit MB on a typical run) and focused
on what a collaborator needs to seed a confirmation panel. The bulky, redundant
layers — the complete integrated_results.tsv (gzipped), the raw SNP+SNP
co-occurrence dump, the variant-created per-tier table, and the high-variant-density
BED — are omitted by default; pass --report-full to additionally bundle
them (gzipped) for a fully self-contained archive. The omitted data is never lost:
it stays in the result folder, the variant-created sites as the rows of the integrated
results whose Not_found_in_REF is y (and complete-search keeps the per-chromosome
sidecars so --report-full can rebuild those bundles even after an intermediate
cleanup). On the web interface, tick "Include the full report" under Report
options on the submission page for the same effect.
This report is generated automatically at the end of every complete-search
run, so most users never call it directly. Run it standalone only to
(re)generate the ZIP for an existing result folder.
Usage Example for the Generate Report function:
crisprme.py generate-report \
--result-dir Results/my-jobUnzip and open report.html (the only file at the top level; everything else
is under data/). Reading top to bottom:
-
1. Summary — run parameters and an off-target-by-mismatch/bulge matrix. The Analysis inputs & criteria box's Variants included line states the genotyped panel size (e.g. 4,091 individuals for HGDP + 1000 Genomes,
20-NRR_3_hg38+hg38_HGDP1kGP) and the number of SNPs and indels searched. -
⚠ Red banner ("no unambiguous on-target") — appears when a guide has more than one perfect (0-mismatch / 0-bulge) match: there is then no a-priori on-target, so every perfect-match site is listed, flagged
Perfect_match = Yes, and forced to the top of the validation panel. (One perfect match = a normal amber "presumed on-target" note instead.) -
2. Recommended validation panel — CFD / CRISPR-Bulge / edit-distance threshold tables plus a hybrid worst-case ~100-site panel (
data/panel_top100.tsv) to seed a targeted-NGS / rhAMP-Seq confirmation assay. Among equally-severe candidates the panel prioritizes sites observed in ≥1 real individual (see theObservedcolumn) — real haplotypes are preferred over worst-case reconstructions — without ever displacing a strictly-worse site, so worst-case coverage is kept. -
Observedcolumn — whether an off-target is supported by at least one real individual:Value Meaning When shown referencePresent in the reference genome — carried by essentially every individual Reference off-targets N carrier(s)A variant site carried by N named individuals Genotyped panel (never on a sites-only panel like mega, which has no carrier roster)observedA single variant with non-zero allele frequency — carried by ≥1 individual by definition, even where the carrier cannot be named Any variant-aware run, incl. sites-only panels putativeA multi-variant combination whose cis co-occurrence cannot be confirmed Any variant-aware run Under
--per-samplethe carrier list is the exact cis carriers, soputativecleanly marks reconstructions no one actually carries. (In a population-level run a multi-variant SNP list is the union of each variant's carriers; where the carrier gate ran (--no-prioritize-observedabove) the column gives its tier instead:together on N of H <panel> haplotypes,the same CFD on N of H <panel> haplotypes, which carry <variants>,not together on any of H <panel> haplotypes (expected E),not checked: K of N variants not in <panel>; without it,(>=1 of K vars, poss. chimera). A row of one variant reads its carriers, unless the gate found that every haplotype carrying it has an indel in the target, which it says. An indel (or MNV) row is resolved per carrier in either mode and readsN carrier(s): CONFIRMED where each carrier is placed on its phased haplotype, PUTATIVE where the phase is unknown (an unphased call; an MNV where the store has no MNV file, as 2.10.0's has none). On an install without SNP genotypes (download --what index --no-genotypes), a row an indel and a SNP make together lists every carrier of the indel, with or without the SNP; its phase is inindel_snp_cooc.tsv.) On a sites-only panel (e.g.mega) the panel tie-break is inert but the column is still shown (valuesobserved/putative); it is dropped only for a reference-only run. -
Gene_regioncolumn — where the off-target sits relative to the nearest protein-coding gene:CDS,5'UTR,3'UTR,exon,intron, orintergenic. It is coherent withGene_distance_kb—intergeniciff the distance is> 0. Present in the curated report table, all download TSVs, and the rawintegrated_results.tsv. -
MAF column — the allele frequency of the variant behind a variant off-target; on a row of several variants, the lowest of their frequencies. An indel's frequency is the
AFof the index's indel log, which CRISPRitzadd-variantscopied from the VCF'sINFO/AFwhen the index was built, as rounded there (the allele-frequency registry holds SNPs only). A variant whose allele frequency is 0 or missing (e.g. an allele that no individual of the panel carries) has no frequency: the row's minimum leaves it out, and the MAF is blank when no variant of the row has one. No floor is applied, so a value below1e-05is the frequency itself. On an index without the dict-less tiers (built without--samplesID, as the benchmarkcomplete-testbuilds its own) a SNP's frequency is theAFof the classic per-sample dictionaries, whichadd-variantsalso copied from the VCF, as rounded there: the self-test's 1000 Genomes VCF gives two decimals, so a rare variant reads 0, its MAF is blank, and a multi-variant row's minimum leaves it out. The report of a search there says so, in either mode (methods).add-variantsup to CRISPRitz 2.9.1 looks forAFin the VCF's first record only and reads every record's at that place inINFO, so a record that has it elsewhere gets none: its indel has no frequency on any index such a CRISPRitz built, nor its SNP on one without the tiers. Of the indexes published until the rebuild for 2.10.0 this affects only HPRC's chrY (a known limit: §8); CRISPRitz 2.10.0 finds each record'sAFby its key. 2.8.1's mega archives (NRG_3_hg38+hg38_megaandNRR_3_hg38+hg38_mega, inlucapinello/crisprme-data) were built from VCFs with noINFO/AF, so none of their indels has a frequency there, and the report'sindel_af.tsvgives their per-dataset ones. 2.10.0's mega (20-NRR_3_hg38+hg38_mega), rebuilt byseq_script/merge_panels/mega_rebuild.sh, setsINFO/AFtoAF_maxin its build input, so its indel rows show the global frequency as its SNP rows do (andindel_af.tsvtheir per-dataset ones). -
Key off-target table columns — in the per-site table (and every download TSV):
- Chromosome / Position / Direction (
+/-) — where the off-target is and on which strand. - crRNA vs DNA (aligned) — the guide and the genomic sequence aligned;
-marks a bulge. Three columns, which read top to bottom as the alignment of the site:Aligned_spacer+PAM(the guide),Aligned_protospacer+PAM_REF(the reference sequence there) andAligned_protospacer+PAM(the variant sequence, the reference one on a row no variant creates). Reading the last two side by side shows which base a variant changes, and gives the sequence to order oligos against for a validation assay. A variant-created site absent from the reference has no reference alignment: itsAligned_protospacer+PAM_REFis-. A reference-only search (no--vcf) has one alignment per row, so it drops the_REFcolumn instead of repeating it. - Mismatches, Bulge_type (
DNA/RNA/-) and Bulge_Size — the alignment's edit make-up. - Variant / rsID — the variant(s) that create a variant off-target (
chrom;pos;ref;alt, plus rsID when known); empty for reference off-targets. - Samples — the named carrier individuals (populated under
--per-sampleon a genotyped index). - CFD — the primary specificity score. Designed for ≤3–4 mismatches; it declines non-linearly as mismatches grow, so do not compare CFD across searches that used different thresholds or variant datasets.
- CRISPR-Bulge score — a complementary deep-learning activity score (Yaish & Orenstein,
NAR 2024) on its own scale (bands 0.5 / 0.2 / 0.1). It was trained on off-targets
with at most one bulge, so any site that needs ≥ 2 bulges is out-of-domain and shows
-(N/A) — read CFD for those sites (a-means "not scored", not "no risk"). Written with 6 significant digits (0.00019,2.35e-39,0for a true zero), the same text the search's own tables carry: this score's sensitive operating point is1.9e-4and most sites of a genome-wide run score far below it, so a fixed-decimal column could not say which side of the threshold a site is on. CFD, which is calibrated and uses the whole 0–1 range, keeps its 4 decimals. For the same reason the report's CRISPR-Bulge score panels use a log10 y-axis with that operating point drawn on it (CFD's panels stay linear 0–1); a log axis cannot show 0, so the sites whose score underflows to exactly 0 are drawn in a shaded band at the bottom of the axis, one decade below the smallest non-zero score and named in the legend, never dropped.
- Chromosome / Position / Direction (
-
Off-target risk summary (top of the report). The top of the report replaces the legacy
100/(100+Σ)aggregated specificity score with a per-scorer risk card: for CFD and for CRISPR-Bulge separately (never blended), the count of ≤1-gap off-target sites in each score band and a calibrated expected number of true off-targets with a 90% range, plus a qualitative note that a deployed guide's own off-target propensity (unknown, not given a specific multiplier) can shift the count further. The estimates come from an isotonic calibration fit on all 46 benchmark guides at once — leave-one-guide-out is the validation (band errors, overdispersion, coverage), not the fit — on 359 experimentally confirmed off-targets across those 46 guides (external-benchmark AUPR 0.168 [0.13–0.24] CFD / 0.613 [0.56–0.70] CRISPR-Bulge; only CRISPR-Bulge's is held out, on the 287 positives of the 40 guides outside its training set, CFD having no training set). Coverage of the 90% range, checked per held-out benchmark guide, is 89.1% to 100% across the displayed bands (lowest: CFD 0.2–0.5) and is not a guarantee for a clinically novel guide. A "How to read this" pop-up explains the two scorers and shows the precision-recall curves. Full method, the four benchmark studies, and provenance (Zenodo 10.5281/zenodo.10902445) indocs/offtarget_risk_summary_METHODS.md. -
data/observed_haplotypes.tsv— for every site reached by two or more distinct observed variant haplotypes, this companion lists each haplotype with its variants, rsIDs, mm/bulges, both scores, origin, allele frequency and named carriers. The main table shows one representative per site (highest score, ties → most carriers); this companion is where you see the full set of real haplotypes a dense/multi-haplotype site contributes (it serves the CFD- and the CRISPR-Bulge-ranked views alike). -
--per-samplereports only off-targets a real individual carries, on an index with the dict-less tiers. In a high-variant-density window CRISPRme does not fabricate a synthetic cross-sample "worst-case" haplotype under--per-sample; it reports the real observed haplotypes (exact carriers) and flags the dense region inhigh_variant_density_regions.bed(one line a dense window since 2.10.0, with the samples carrying an ALT there). A population-level run (--population-level, or the default on a sites-only/unphased index) still reports the conservative worst-case representative, as it should for a screen, and its carrier gate ranks one no haplotype carries after the others (--no-prioritize-observed). Since 2.10.0 the same holds on an index without the tiers (one built without--samplesID, such as the one the benchmarkcomplete-testbuilds): up to 2.8.1 a dense window there could still be reported by its greedy worst-case alignment, whose listed carriers need not carry every variant in it.
-
--result-dir(Required unless--integrated-resultsis given)
A CRISPRme result folder (Results/<jobid>). The integrated-results TSV,.Params.txt,.version.txtand the default output location are resolved from here. -
--integrated-results(Optional)
An explicitintegrated_resultsTSV (.tsvor.tsv.gz) to report on, instead of resolving it from--result-dir. -
--samplesID-dir(Optional)
Directory of samplesID files used for the superpopulation breakdown plot; auto-detected near the install when omitted. -
--output(Optional)
Output ZIP path. Defaults to<result-dir>/<jobid>_report.zip. -
--report-full(Optional)
Build the full (non-slim) report. In addition to the default human-facing layer, bundles the bulky redundant data — the completeintegrated_results.tsv.gz, the rawsnp_snp_cooc.tsv.gz, thevariant_createdper-tier table, and thehigh_variant_density_regions.bed.gz— so the ZIP is a fully self-contained archive. Omit it for the compact shareable default.complete-searchaccepts the same--report-fullto make its auto-generated report full; the web submission page exposes it as the Report options → "Include the full report" checkbox.
Bulge-enabled searches build a CRISPRitz index of the reference genome. complete-search does this automatically on the first run and reuses it afterward, but four commands let you control it explicitly — build-index-only, download, publish-index, and scorer-env — useful for batch jobs, shared clusters, and skipping the build via prebuilt indexes.
build-index-only — build the reusable reference index (into genome_library/<guide>-<PAM>_<bulges+1>_<genome>, <PAM>-<guide>_… for a PAM on the 5′ side of the guide) without running a search. Pass the same --genome/--pam/--bDNA/--bRNA you will search with:
crisprme.py build-index-only --genome Genomes/hg38 --pam PAMs/20bp-NRR-SpCas9.txt --bDNA 2 --bRNA 2 --thread 16 --path /data/crisprmeThis writes genome_library/20-NRR_3_hg38 (the guide length, 20, then the PAM of the 3′ side; the folder number is max(bDNA,bRNA)+1, so 2 bulges → _3_), the index 2.10.0 ships precomputed on HuggingFace, in lucapinello/crisprme_plus_indices (NRR_3_hg38 in 2.8.1's repo, lucapinello/crisprme-data). An NRR_3_hg38 already in place (a download of 2.8.1's) is kept as this index, and nothing is built.
Add --vcf (a VCF dataset directory, e.g. VCFs/hg38_HGDP1kGP, or a config file listing one VCF folder name under VCFs/ — the same --vcf form complete-search accepts) to also pre-build the variant-aware index (genome enrichment + SNP/indel indexes). Add --samplesID (a listing file, one samplesID filename per line under samplesIDs/; a combined panel lists each per-db samplesID file) to make it self-complete: with --samplesID the build ALSO emits the dict-less Tier-0 registry + Tier-1 genotype tiers and, for a merged panel, writes the combined samplesIDs/<vcf>.samplesID.txt list. Without --samplesID you get a dicts-only index (no fast post-analysis).
crisprme.py build-index-only --genome Genomes/hg38 --pam PAMs/20bp-NRR-SpCas9.txt --bDNA 2 --bRNA 2 --vcf VCFs/hg38_HGDP1kGP --samplesID samplesIDs.config.txt --path /data/crisprmeAn enrichment of the dataset already in place is reused. One of CRISPRitz 2.9.1's fake-indel windows (25/27, as every CRISPRme 2.8.1 build) is said, with how to enrich the dataset with 2.10.0's: by removing all that comes from that enrichment, which the warning names by absolute path (a 2.9.1 enrichment differs in its SNPs too), and building again. A dataset is not enriched anew beside the tiers or indexes of an earlier enrichment whose records tell other windows (its indel logs, an INDELS index of it, or a variant index of it in index format 1, which only CRISPRitz 2.9.1 and earlier build; with all of those gone, nothing tells them), nor is an index built from an enrichment whose fake-indel genome its indel logs do not describe (a download beside an enrichment made here; a search checks it before it puts the SNP codes on that genome): the build, or the search, stops and names what to remove. A sites-only dataset such as hg38_mega is not enriched anew beside the fake-indel windows its indel logs or INDELS indexes record, whatever their width: an enrichment of VCFs that name no sample holds no window, so its windows come from its enriched-genome kit, whose indels a synthetic sample carries (built so by seq_script/merge_panels/mega_rebuild.sh, the mega's recipe of 2.10.0; up to 2.8.1 its fake-indel half by mega_build_indels.sh), and every message points to that kit, to its archive and kit of CRISPRme 2.10.0, or to that recipe, not to build-index-only (METHODS §4).
To build a different PAM (NGG, NNGRRT, TTTN, …) on the shipped re-phased HGDP+1kGP, phased HPRC or sites-only mega variant data — reusing the published enriched genome (fast) or the source VCFs — see Building a new-PAM index for a published dataset.
complete-search --index-path <dir> — reuse a prebuilt/staged index library instead of building one under the working directory. A missing matching reference index is a hard error (rather than a silent rebuild), which is what you want on a read-only shared mount; a search with no bulges needs none, as it scans the genome. A variant index is read from that library first, with its _INDELS index beside it, then from the working directory's genome_library/; a search builds no index in that library. The dataset's Dictionaries/, samplesIDs/ and Genomes/ stay in the working directory (links are fine).
download — fetch reference data from a HuggingFace dataset repository over HF's CDN (typically much faster than the FTP/UCSC sources). --what selects the component: genome, annotations, pams, samples, index (with --index-name), assembly (with --sample <HPRC id>), vcf (with --dataset — the raw source VCFs of a variant panel, kept bgzipped under VCFs/<dataset>/; the default repo, lucapinello/crisprme-data, hosts hg38_HGDP1kGP, hg38_HPRC and hg38_mega, the inputs of 2.8.1's archives, which you need only to build an index yourself. HGDP + 1000 Genomes' and the mega's are 2.10.0's inputs as they are, but its hg38_HPRC is HPRC's graph v2.0: the normalised v2.1 VCFs that 2.10.0's HPRC index was built from are build-inputs/hg38_HPRC/ of lucapinello/crisprme_plus_indices, which no download fetches (hf download lucapinello/crisprme_plus_indices --repo-type dataset --include "build-inputs/hg38_HPRC/*" --local-dir .; to build from them, put the VCFs and their .tbi under VCFs/hg38_HPRC/)), build-inputs (with --dataset: the pre-enriched genome kit that lets build-index-only skip enrichment for a new PAM; 2.10.0's, from lucapinello/crisprme_plus_indices, for hg38_HGDP1kGP, hg38_HPRC and hg38_mega), genotype-oracle (the phased genotypes and indel genotypes of a panel, by default HGDP + 1000 Genomes (--panel HGDP1kGP), into Dictionaries/, without its index: what complete-search --prioritize-observed checks a sites-only dataset's rows against; an installed index of the panel already holds them), indel-genotypes (2.10.1, with --dataset: the MNVs of an installed panel's phased indel genotype store, for an index downloaded with CRISPRme 2.10.0, whose store has none; crisprme.py download --what indel-genotypes --dataset hg38_HPRC fetches the panel's indel_genotypes_<dataset> companion and installs it whole where it is the store installed with an MNV file added for each chromosome, and refuses any other build, installing nothing; Troubleshooting §15), or all (genome + annotations + PAMs + samples; on hg38 all also fetches the default 20-NRR_3_hg38 reference index (2.8.1's NRR_3_hg38 where that cannot be fetched) so a reference scan works with no on-demand build; the PAM files include the default 20bp-NRR-SpCas9.txt, which CRISPRme ships where the data repo has none). For --what index, --no-genotypes skips the big separate Tier-1 genotype store; the Tier-0 registry it keeps still corrects allele frequencies and rsIDs, but per-individual Samples and CONFIRMED cis phasing require the genotype tier: without it a search runs the population-level analysis (each variant site's worst case, with no carriers but those of an indel, which the index itself holds), and --per-sample falls back to it with a warning — omit --no-genotypes for full dict-less variant-aware output. The genome, annotations, PAM files, sample lists and VCFs come from lucapinello/crisprme-data, as does an archive of 2.8.1 fetched by its own name (one of an 8-nt flank from lucapinello/crisprme-data-general-index); an index named for its guide length and side (2.10.0's), with its panel's Dictionaries bundle and genotype store, and the build-inputs kits come from lucapinello/crisprme_plus_indices (genotype-oracle looks there first, then in lucapinello/crisprme-data). --hf-repo or CRISPRME_HF_REPO overrides the repo:
crisprme.py download --what all --path /data/crisprme
crisprme.py download --what index --index-name 20-NRR_3_hg38 --path /data/crisprme
# recommended default (SpCas9 NRR; phased HGDP + 1000 Genomes, 4,091 samples)
crisprme.py download --what index --index-name 20-NRR_3_hg38+hg38_HGDP1kGP --path /data/crisprme
# the diploid assembly of an HPRC individual (for assembly-search)
crisprme.py download --what assembly --sample HG01255 --path /data/crisprme
# the phased HGDP + 1000 Genomes genotypes (complete-search --prioritize-observed on the mega panel)
crisprme.py download --what genotype-oracle --path /data/crisprmepublish-index — upload a locally built index to a HuggingFace dataset repository so other machines can skip the build (needs an HF write token via --token or HF_TOKEN). Add --dictless for a variant index to drop the ~152 GB per-sample SNP dicts (the registry + genotype tiers replace them; indel logs kept), upload the genotype store as a separate companion, and bundle the samplesID lists so the index is self-complete. With the genotype store, the index's phased indel genotypes are uploaded on their own too (indel_genotypes_<vcf>.tar.gz), for download --what genotype-oracle. Since 2.10.0 an index of index format 2 goes to lucapinello/crisprme_plus_indices by itself (never to a repo 2.8.1 reads), and a variant one leaves its panel's Dictionaries and samplesID lists out of its archive: they go once per panel into the Dictionaries bundle (dictionaries-bundle_<vcf>.tar.gz), as the genotype store does into its companion, uploaded only where the repo does not hold them already, the same (another build there is refused; --replace-companions replaces it). download then fetches them once per panel. --stage-only <folder> (2.10.1) packs everything a publish would upload into <folder>/indexes/, with the SHA-256 of each archive in <folder>/staged.sha256, and uploads nothing (no token needed): it prints the commands that publish the folder in one Hub commit with indexes/SHA256SUMS. One commit narrows the risk that a download meets an index of one build and a bundle of another to the downloads in flight at that moment (such a download fails once, and works when run again: Troubleshooting §15):
crisprme.py publish-index --index genome_library/20-NRR_3_hg38
crisprme.py publish-index --index genome_library/20-NRR_3_hg38+hg38_HGDP1kGP --dictlessAn index is published under its folder's name: one built since 2.10.0 under the name that says its guide length and side, which download --index-name takes as it is.
scorer-env {create,check,update,list,doctor} — manages the dedicated cbulge conda env the CRISPR-Bulge scorer runs in (created automatically by install_from_source.sh unless deferred with CRISPRME_SKIP_SCORER_ENV=1):
crisprme.py scorer-env create
crisprme.py scorer-env doctorThe ML off-target scorer is CRISPR-Bulge (Yaish & Orenstein, NAR 2024) — a TensorFlow 2.13.x GRU ensemble — running isolated in the cbulge env so its heavy pins never touch the main environment. CFD remains the primary score. If the cbulge env or its weights are missing or broken, complete-search stops before it searches, naming the fix (crisprme.py scorer-env create), unless CRISPRME_SKIP_SCORER_ENV=1 is set, which runs it CFD-only; targets-scoring and searches started from the web interface do not check first, and complete CFD-only. A CFD-only run has the CRISPR-Bulge column at -1 and says so (a search in its log_verbose.txt, targets-scoring on stdout). GPU acceleration: the default image pinellolab/crisprme:latest is GPU-capable — on an NVIDIA host add --gpus all to docker run and pass --compute-backend cuda to run the CRISPR-Bulge scorer on the GPU; it falls back to CPU automatically when no GPU is present. The amd64 image bundles CUDA; arm64 (Apple Silicon) and Docker-on-Mac are always CPU. The clickable installers auto-add --gpus all when Docker exposes a GPU. GPU pays off on large/dense searches; a tiny single-guide run is often faster on CPU due to init overhead. The env is architecture-aware: it installs the same TensorFlow 2.13.1 per-arch — conda tensorflow-cpu/CUDA on x86-64, tensorflow-macos on Apple Silicon, and the PyPI tensorflow==2.13.1 aarch64 wheel on Linux ARM (validated x86-64 vs aarch64 agreement to max |Δ| = 3.6e-7, zero threshold-band changes). The amd64 and arm64 images give the same CFD columns, and CRISPR-Bulge scores that can differ in about the sixth significant digit (on 2.10.0's self-test, by less than 2 × 10⁻⁵ relative; one tie of 632 rows showed its other alignment): compare them across machines with a tolerance (Troubleshooting §5). On networks that block conda.anaconda.org, point the env solve at a mirror with CONDA_CHANNEL_BASE=https://prefix.dev (or CRISPRME_CONDA_CHANNEL_BASE; the Docker build accepts --build-arg CONDA_CHANNEL_BASE=…).
See the companion data-setup guide (docs/crisprme_data_setup_051826.md, Sections 2d and 3.5) for the end-to-end workflow.
The Targets Scoring function scores a user-supplied list of candidate
off-target sites — for example Cas-OFFinder output, or any table of aligned
guide/off-target pairs — without running a genome search. Each site is
annotated with the same two scores a normal CRISPRme+ report uses: the CFD
score and the CRISPR-Bulge ML score (the exact same calculations, so results
are directly comparable to a full CRISPRme+ analysis). This is useful for scoring
sites nominated by another tool — e.g. non-canonical-PAM hits — with CRISPRme+'s
calculations when building a dedicated index is not warranted. Bulge-containing
sites are scored with CFD's position-aware bulge penalty (as of v2.8.0; a
PAM-proximal bulge is penalized, not ignored) — supply the aligned pair in the
in-place convention (crRNA and off-target the same length, each bulge a - at its
position). CFD still cannot rank bulges; use the CRISPR-Bulge column for those
(see docs/offtarget_risk_summary_METHODS.md §3).
With --index-path pointing at an installed variant index, each site also gets a
variant carrier overlay: the variants overlapping its protospacer+PAM window, each
with its allele frequency and carrier count over the panel (how many individuals carry
it), the highest frequency and carrier count among them, and the highest allele frequency
in each population dataset (read from the index's Dictionaries/registry_<vcf> tier). A
sites-only index (mega) has no genotypes: its registry stores 0 carriers, so the carrier
count reads 0 there.
Usage example (Cas-OFFinder output, with the carrier overlay):
crisprme.py targets-scoring \
--targets casoffinder_output.txt \
--casoffinder \
--index-path /path/to/index_install \
--output scored_sites.tsvFor a generic TSV instead of Cas-OFFinder output, map the columns explicitly:
crisprme.py targets-scoring \
--targets sites.tsv \
--columns guide=crRNA,dna=DNA,chrom=Chr,pos=Pos,strand=Strand,mm=Mismatches \
--output scored_sites.tsv--targets(Required) — the input site list (Cas-OFFinder output or a TSV).--output(Required) — output path (.tsv, or.xlsxwith--xlsx).--casoffinder— parse the input as Cas-OFFinder output (schema auto-detected); omit and use--columnsfor a generic TSV.--columns— generic-TSV column map, e.g.guide=crRNA,dna=DNA,chrom=Chr,pos=Pos,strand=Strand,mm=Mismatches(at leastguideanddnaare required).--index-path— an installed variant index; adds the per-site carrier overlay.--device— CRISPR-Bulge scorer compute device:cpu(default) |gpu/auto(auto-pickcuda→metal→cpu) |cuda(NVIDIA/Linux GPU) |metal(Apple Silicon); same vocabulary ascomplete-search --compute-backend, and it falls back to CPU when the requested accelerator is unavailable.--xlsx— write an.xlsxworkbook instead of TSV.--pam-length— PAM length in bp (default3).--position-base—0- or1-based input positions (default0for Cas-OFFinder,1for a generic TSV).
Note: pure scoring (CFD + CRISPR-Bulge) needs no index; the carrier overlay requires an installed variant index via
--index-path. Mismatch-only sites are scored exactly; bulge rows must follow CRISPRme's alignment convention (bulge columns as-).
Once a shortlist of off-targets is in hand, validating one in the lab means ordering oligos — amplicon primers, an ssODN, a probe — and for that you need the sequence around the site, not just its coordinates. Extract Flanks writes it.
For a site in a variant region that is not one sequence. The reference has one; each
distinct haplotype observed in the panel the search read has another; and the haplotype
that carries the variant making the off-target is usually not the reference one.
Ordering primers off the reference for a site that exists only on an ALT haplotype is how
a validation assay quietly measures the wrong locus. So, per input row, extract-flanks
writes:
- the reference flank, and
- one flank per distinct observed haplotype, deduplicated by sequence, each with the
samples (and the haplotype side, where the VCF is phased) that carry it — the
--max-haplotypesmost carried of them, 10 by default, every one at--max-haplotypes 0, withn_haplotypesalways the row's true total.
A site with no variant in its window gives one entry. A site whose haplotypes all read
alike gives one entry. In every entry the target's own coordinates are marked — the
offset and the length of the protospacer+PAM inside that flank — so nobody has to count
bases, and an indel that shifts the site shows up as a shifted offset rather than as a
miscount. The entry also says whether that haplotype actually reads the row's
protospacer (target_found), which is the fastest way to see which sequence carries the
off-target and which merely shares its locus.
It never invents a haplotype. A sample whose genotype is unphased, has a missing allele,
or whose records overlap in the window (the VCF gives no sequence there) is reported,
under unresolved, with the reason and the records at fault. A target near a contig end
is truncated, and says so. An input it cannot resolve is named exactly, never guessed.
Note — "observed haplotype" here is a stricter rule than the search's. The search's own enumerator (
PostProcess/observed_haplotypes.py, which fills the report'sObservedcolumn) is sensitivity-first: an UNPHASED individual is never dropped — its whole alt collection in the window is collapsed into one putative variant set, so the site is never missed.extract-flanksis sequence-first: it writes the bases you will order oligos against, and for that same individual the VCF does not say which of its alleles sit on one copy, so there is no one sequence to write; it is listed underunresolvedwith the records at fault. On a phased panel (HGDP+1000G, the 1000 Genomes phased releases) the two agree. On an unphased one they will not: the report may name carriers of a putative haplotype that the flank TSV reports as unresolved, and that difference is this rule, not a bug in either. Phase your VCFs if you need the sequence of such a sample.
Haplotypes are written by the same code as scripts/check_indel_rows.py, the independent
check of CRISPRme's indel rows (scripts/variant_haplotypes.py): two readers of one VCF
that disagreed would be two different answers to "what does this individual hold here?",
and one of them would send your oligos to the wrong sequence.
A window is the target plus a padding at each of its two ends, and the paddings are named for what each one sits beside, in the guide's orientation:
--upstream N— N bases beyond the protospacer's outer end (default 3)--downstream M— M bases beyond the PAM's outer end (default 6)--window W— the symmetric form, which is--upstream W --downstream W
For a 20-nt spacer with a 3-nt PAM the defaults give a 32-mer: 3 + 23 + 6, with the
protospacer+PAM at target_offset 3. The anchored form is the default because it is the
general one — its meaning does not depend on how long the target is, while a symmetric
window is only the case where the two paddings happen to be equal — and because a short
oligo read straight off the site has no primer slack to absorb a padding error. For
amplicon-scale context, ask for it: --window 200, or --preset amplicon. Nothing has
to be inferred: every line of every output carries window_spec, pad_upstream,
pad_downstream and its own emitted flank_len.
A preset is a name for a set of these flags, so that an assay with its own geometry
is a line of configuration rather than a change to CRISPRme. extract-flanks --help
lists the presets this install has; they come from PostProcess/flank_presets.conf,
then $CRISPRME_FLANK_PRESETS, then each --preset-file (the later overriding the
earlier by name), and a flag on the command line always beats the preset — including
the preset's other form of the window, since the two forms are one window: a preset's
window = 200 is 200 beyond each end, so --preset my-assay --window 200 is 200 at both
ends and --preset amplicon --upstream 5 is 5 and 200. Only one source saying both
things at once is refused — both forms on the command line, or both in one section:
# PostProcess/flank_presets.conf, or your own file passed with --preset-file
[my-assay]
upstream = 3
downstream = 6
filter = CRISPR_Bulge >= CB_SENSITIVE and CRISPR_Bulge_ref >= CB_SENSITIVE
description = my 32-mer validation oligo, ALT and REF both above the sensitive cutStrand and PAM side are read, never assumed. On a minus-strand row the genomic order
reverses, so the bases beyond the PAM are at the genomic left; and on a 5′ PAM
(Cas12a, TTTV: PAM then protospacer) the target's two ends swap, so the same two
numbers land on the opposite genomic sides from the 3′ case. Which it is comes from
the run's own records — the PAM file its --pam names (whose signed length carries the
side), else the Pam of its Params.txt with the side read off the table's
Aligned_spacer+PAM run of Ns — or from --pam-file / --pam-motif --pam-side. If
none of them answers and the two paddings differ, the command refuses rather
than guess SpCas9; a symmetric --window does not need the answer and is not refused.
Usage example — the report's top-1000 download, read with the run's own inputs:
crisprme.py extract-flanks \
--results Results/my_job \
--targets my_job_report/data/top1000.tsv \
--out flanks/top1000This writes flanks/top1000.fa (one record per sequence) and flanks/top1000.tsv (one
line per sequence, joining back to the input by row_id, the table's line number, and by
rank where the table has one). With --results the reference genome, the VCF datasets,
the samples list and the PAM come from the run's own records (.command_line.txt,
.Params.txt, .sampleID.txt). A run made with --index-path does not need its VCFs at
search time, so they are often gone by then; point at them with --vcf-dir:
crisprme.py extract-flanks \
--results Results/my_job \
--targets my_job_report/data/top1000.tsv \
--vcf-dir VCFs/hg38_HGDP1kGP \
--window 200 \
--out flanks/top1000Note: index your VCFs first —
tabix -p vcf <file>.vcf.gz, one.tbibeside each. Without an index every VCF has to be read once, end to end, to find out which contigs it holds and where: on a 23-file HGDP+1000G set that is over 25 minutes and several GB of memory before the first flank is written, and nothing is printed while it happens. With the indexes it is a seek, and the run starts in seconds.
A worked line of the TSV of that --window 200 run reads: row 17 of the input,
chr8:127736231-127736252 (+), haplotype hap1, flank chr8:127736031-127736452,
flank_len 423, target_offset 200, target_len 23, target_found yes,
n_carriers 312, variants chr8_127736240_A_AT. Cut 423 bases out of the FASTA record
crisprme_row17_hap1, and the protospacer+PAM is bases 200–222 of it; the 200 bases on
either side are where the primers go. (At the default --upstream 3 --downstream 6 the
same entry is flank_len 32, target_offset 3, target_len 23 — the 32-mer — over a
31-coordinate reference interval, and its ref entry is flank_len 31, target_len 22:
see below for why they differ.)
The numbers of that line are worth reading twice, because they are the miscount this
command exists to prevent. chr8_127736240_A_AT is a 1 bp insertion, inside the
target. The flank is cut on the reference, so its interval
(chr8:127736031-127736452) is 422 coordinates — but a carrier of the insertion holds
423 bases between them, which is what flank_len says for hap1. The 23-base
protospacer covers only 22 reference coordinates (127736231-127736252), and it reads
on that haplotype exactly (target_found yes, target_len 23). The ref entry of the
same row is the same interval with flank_len 422, target_len 22 and
target_found no: the reference does not hold this site. Counting 23 bases from the
reference, or taking the flank's length from its coordinates, would be off by one on
every carrier — and by an indel's whole length on a bigger one.
The ref entry of a row is the sequence every sample without a variant in that
window carries — where there were samples to check, and its notes say which case it
is. On a contig no VCF covers (chrY, an _alt, a _random, a chrUn: 46 of them under
a 23-file HGDP+1000G set on one real 1,000-row shortlist) nothing was read, and the note
is no-vcf-covers-this-contig; under --reference-only it is reference-only; with a
sites-only VCF (no sample columns) it is no-genotyped-vcf-for-this-contig. The
sequence is the same in all four cases; what differs is what was checked, so only
reference-of-every-sample-without-a-variant-here is evidence that the site is
invariant across the panel.
--annotate-table writes the input table back out with the sequences added as
columns, so a results table becomes an oligo order without a join. Every original column
is copied verbatim, in its own order; the added ones are flank_ref (the reference
sequence over the window), flank_alt (the primary ALT sequence), flank_alt_count
(how many distinct ALT sequences that row has), the length and the target's offset
and length inside each of the two, flank_window / flank_orientation /
flank_strand, flank_notes, and flank_row_id — the key back into <prefix>.tsv and
<prefix>.fa. This works on the report's top-N download and on an
integrated_results.tsv alike.
How many distinct ALT sequences a site has depends on the window, strongly. On the 1,000-site shortlist of one genome-wide HGDP + 1000 Genomes run (4,091 samples): at
--window 200, 940 of 1,000 sites had at least one ALT flank distinct from the reference and 939 had more than one (median 22 per site, max 4,263); at the default 32-mer, 803 had at least one and 546 had more than one (median 2, max 837). A short window collapses many distinct 400 bp haplotypes onto one 32-mer — but it does not make the multi-sequence case rare: more than half the sites still have more than one distinct ALT 32-mer, so a plan that assumes one ALT sequence per site is wrong on about half of them. Any such figure is only meaningful with the window it was measured at, which is whywindow_specis on every line.
A row can have several distinct ALT haplotypes, and a column is one cell wide, so:
the count is a column of its own and the sequences themselves stay in the companion
FASTA/TSV, reached by flank_row_id — the ten most useful of them per row by
default, and every one at --max-haplotypes 0. The cap is on those two files, not
only on the cell: --max-haplotypes (default 10) is how many are written (the
"sequences written" column of METHODS § 7.1), while flank_alt_count is always the
true total and flank_notes says how many the cap left out. On the 1,000-row
shortlist above it binds on 11 rows at the 32-mer and on most of them at
--window 200, so a plan that needs every ALT oligo should pass
--max-haplotypes 0. None is crammed into a cell unless you ask — --alt-list adds
one more column holding the ones written, |-delimited. The primary ALT is
hap1: the first in the order the command already uses — the
sequences that hold the off-target first, then by how many haplotypes carry them.
The list is positional: element k is hapK of <prefix>.tsv and the first
element is flank_alt.
hap1is not the highest-scoring haplotype. The order is by string-identity with the row's displayed protospacer and then by carrier count — nothing in it reads a score, and a variant that makes the site a better target stops the haplotype spelling that exact string and so demotes it. On the 187-site panel this was measured on, the haplotype carrying the row's reported score ishap1on 66 of the 81 ALT-origin rows and not on 8 (at chr2:174719314, 0.195 againstflank_alt's 0.0032); on the remaining 7 no haplotype in the window reproduces the row's score at all, so those are unknown rather than agreeing. To order one oligo per site by score, join on the score instead of takingflank_alt;--alt-listand the FASTA carry every haplotype written.
A haplotype can delete the whole window. At a 32-mer it happens (one entry of 4,017 on a 1,000-row shortlist; none of the 10,354 of that shortlist at
--window 200, because a 423 bp window does not fit inside those deletions): that genome holds no bases between the flank's two coordinates. Such an entry keeps its TSV line —flank_len 0, its carriers, and the notewindow-deleted-on-this-haplotype— but it writes no FASTA record (a header with no bases is not a sequence, and it shifts every record after it for anyone pairing names with sequences by position), itsfasta_idis blank, and in the--alt-listcell its element is the placeholder(window-deleted)so that element k is stillhapK.flank_altcarries the same placeholder if the primary ALT is the deleted one, so an emptyflank_altkeeps its one meaning: this row has no ALT entry at all. The row'sflank_notesnames the haplotypes affected.
Your table comes back line for line, and the join key is the input's own data line number. CRISPRme reads a results table as plain tab-separated text, one row per physical line: a double quote in a cell is a double quote, not a quoting character. (A table exported from a spreadsheet with a line break inside a cell is therefore not a table — the stray line comes back as a row of its own, noted, and every real row keeps its own sequence. If the reader and the writer ever disagreed on how many data lines the file has, the annotated table is refused rather than written, because a sequence on the wrong row looks exactly like a sequence on the right one.)
--filter chooses which rows get flanks at all, as an expression over the table's own
columns. A name with a character a Python name cannot hold is written with underscores
(CRISPR-Bulge is CRISPR_Bulge) or as col("CRISPR-Bulge"); CB_SENSITIVE is the
CRISPR-Bulge sensitive operating point, taken from cb_operating_point rather than
written as a number, so a filter written today still means "the sensitive threshold"
after a re-fit or under a different CRISPRME_CB_RECALL_TARGET. The worked example —
the pair only where both the ALT and the REF alignment score at or above it:
crisprme.py extract-flanks \
--results Results/my_job \
--targets my_job_report/data/top1000.tsv \
--vcf-dir VCFs/hg38_HGDP1kGP \
--upstream 3 --downstream 6 \
--filter 'CRISPR_Bulge >= CB_SENSITIVE and CRISPR_Bulge_ref >= CB_SENSITIVE' \
--annotate-table flanks/top1000_with_32mers.tsv \
--out flanks/top1000One rule, so there is nothing subtle to get wrong: a row is kept when the expression is
true and every cell it read as a number had one. A missing cell (blank, NA,
-, .) is not zero, and a row selected on a number nobody measured is a site put into
an assay for no reason — a negated test would otherwise let exactly those rows through.
How many such rows there were is printed rather than left to be noticed. Compared with a
string, though, a cell is its own text, because the same characters are data in
another column: Strand == "-" selects the minus-strand rows, Strand in ("+", "-") is
true on every row, and Gene_region == "-" the intergenic ones — none of those is a
missing value, while CRISPR_Bulge >= CB_SENSITIVE still skips (and counts) the rows
whose score column holds -. Evaluation
short-circuits, so has("CRISPR-Bulge") asks about presence without reading the value:
not has("X") or X > 1 keeps a row with no X. A row the filter did not keep still
keeps its line in the annotated table, with the added cells empty and flank_notes filtered-out, so your table comes back the length it went in; --filter-drop asks for
the shortened form instead.
A 32-mer assumes protospacer+PAM is 23 bases of genome. That holds for a mismatch-only site but not where the alignment carries a bulge: a DNA bulge is a genomic base with no partner in the guide, so the footprint is one base longer per bulge, and an RNA bulge is a guide base with no genomic partner, one base shorter. This is not a corner case to shrug at — bulge-carrying sites are exactly the class CRISPR-Bulge under-detects, so they are over-represented in anything you fill in from a sensitive threshold.
By default (--length-policy anchored) the paddings are kept and the total varies:
the bases beyond the target are the bases you asked for, and the sequence is genomically
true. --length-policy fixed-total instead holds the reference interval at
upstream + spacer+PAM + downstream and takes the difference out of the padding (beyond
the PAM first, never below zero), for an assay that needs one length. Either way the
row says its own: flank_len (what was emitted), target_span_ref (the reference
coordinates the target covers), nominal_target_len, bulge_type (none, DNA:1,
RNA:1, DNA:1,RNA:1), pad_upstream / pad_downstream as applied, and the greppable
notes target-span-not-nominal:<span>/<nominal> and, under fixed-total,
padding-moved-to-hold-the-total:<±n>. An indel inside the window also changes a
carrier's own length — that is what that genome really holds, and flank_len says so —
so a fixed total fixes the reference interval, not every carrier's base count.
--targets— a results table: the report's top-N download (curated columns) or anintegrated_results.tsv(.tsv,.tsv.gzor.zip).--results— a CRISPRme results folder. Its own records give the reference, the VCFs, the samples list and the PAM, and — unless--targetsnames another table — its integrated table is the input. Give both to read a shortlist with the run's own inputs. (One of--targets/--resultsis required.)--out(Required) — the prefix of the two files written:<prefix>.faand<prefix>.tsv.--upstream— bases beyond the protospacer's outer end, in the guide's orientation (default3).--downstream— bases beyond the PAM's outer end (default6). With the default--upstream, a 32-mer for a 20-nt spacer with a 3-nt PAM.--window— the symmetric form: the same as--upstream W --downstream W.200is a 423 bp interval for a 23 bp protospacer+PAM: it covers a 250–300 bp NGS amplicon with room to place primers 50–150 bp away from the cut, and the short end of a 400–700 bp Sanger/TIDE amplicon. Giving both forms in one place — both on the command line, or both in one preset section — is refused, not resolved. The flank is cut on the reference, so every haplotype of a site covers one genomic interval and the entries line up; an indel inside the window then makes one haplotype's flank longer or shorter, which is what that genome really holds (flank_lensays so).--preset— a named window configuration;--helplists the ones this install has. A flag given on the command line always wins over the preset, including over the preset's other form of the window (--preset my-assay --window 200,--preset amplicon --upstream 5).--preset-file— an INI file of presets (repeatable), also read from$CRISPRME_FLANK_PRESETS. A section[name]with any ofupstream,downstream,window,length_policy,orientation,max_haplotypes,filter,description. An unknown key is an error, not a shrug.--length-policy—anchored(default: keep the paddings, let the total vary) orfixed-total(hold the reference interval atupstream + spacer+PAM + downstream). See Bulges, above.--orientation—guide(default: the protospacer reads 5′→3′ as the guide does, which is what an oligo order wants) orgenome(the reference's plus strand, whatever the row's strand). Coordinates are genomic either way; theorientationandemitted_strandcolumns say which was used.--annotate-table— also write the input table back out with the sequences as columns (see above). It is never written in place: a path of its own is required, and a column name it would overwrite is refused.--alt-list— add one more column holding the row's ALT sequences,|-delimited. It holds the ones written:flank_alt_countis always the true total andflank_notessays how many--max-haplotypesleft out, so pass--max-haplotypes 0to have every one in the cell. Element k ishapK; a haplotype that deletes the whole window is the placeholder(window-deleted), never an empty element.--filter— an expression over the table's own columns; only the rows it keeps get flanks.CB_SENSITIVEis the CRISPR-Bulge sensitive operating point by name. A cell read as a number is missing where it holdsNA,-,.or nothing; compared with a string it is its own text, soStrand == "-"is a selection and not a gap.--filter-drop— leave the rows the filter did not keep out of--annotate-table.--pam-file— the CRISPRme PAM file the search used; its signed length carries the PAM's side. Default: the run's own--pam, else thePamof itsParams.txtwith the side read off the table'sAligned_spacer+PAM.--pam-motif/--pam-side— the motif (NGG,NRG,TTTV, …) and3primeor5prime, where the run's records cannot say. SpCas9 is never assumed: an asymmetric window on a run whose PAM side cannot be read is refused.--reference— the reference genome: a folder of per-chromosome FASTAs, or one FASTA. Default: the run's--genome.--vcf/--vcf-dir— the phased VCF(s) the run's index was built from (repeatable). Default: the dataset folder(s) the run's--vcflist names, where they are still there.--samples— a samplesID file (repeatable). Default: the run's.sampleID.txt.--block— which alignment of an integrated row to take the site from:highest_CFD(default),fewest_mm+borhighest_CRISPR_BULGE. (A curated download has one projection and ignores this.)--max-haplotypes— how many haplotypes to write per row beside the reference (default10;0writes every one). How many a row has depends strongly on the window: a 400 bp one over a panel of thousands holds dozens of distinct haplotypes, nearly all differing from each other far from the target, while a 32-mer spans too little to hold many. The ones that hold the off-target come first, then by carrier count — an order that reads no score, so the cap can drop a higher-scoring haplotype before a lower-scoring one. Then_haplotypescolumn always gives the true total (and so doesflank_alt_count) and the notes say how many were left out.--anonymise(--anonymize) — write no sample identity anywhere: thecarrierscolumn is blank and only the counts are kept. FASTA record names never carry a sample identity, flag or no flag.--include-filtered— also write the records whoseFILTERis outsidePASSand.. By default they are left out, as the search left them out — so the flank matches the row's own alignment — and counted in thenotescolumn (filtered-records-in-window:N), so a low-quality call in your amplicon window is never silently missing. With the flag their bases are in the sequence you will order oligos against, so they are marked twice over: the note becomesfiltered-records-written:N, and each such record carries itsFILTERin thevariantscolumn, behind a|(chr8_127736240_A_AT|LowQual). APASSrecord is written as before, with no suffix.--max-rows— stop after N rows of the table. A genome-wide integrated table has millions of rows; this command is meant for a shortlist.--reference-only— read no VCF: the reference flank alone.
Note: on a large panel the TSV's
carrierscolumn can be long (a common haplotype on a 4,000-sample panel has thousands of carriers):--anonymisekeeps the counts and drops the names, which also shrinks the file. The FASTA is unaffected — it carries only the sequences and their counts.
Note: by default every flank is written as the guide reads it — the protospacer 5′→3′, so the sequence can be ordered as an oligo directly, and a minus-strand row's padding is on the same side of the protospacer as a plus-strand row's.
--orientation genomewrites the reference's plus strand instead. Which was used is on every line (orientation,emitted_strand), andprotospacer_on_strandalways gives the target read on the row's own strand, to check against the row's alignment. Coordinates are always genomic:flank_start/flank_endare 1-based inclusive on the plus strand (as a genome browser reads them) whatever the orientation, andtarget_offsetis 0-based into the sequence as emitted, as a Python slice reads it.
--max-haplotypes above orders by whether the haplotype holds the off-target, then by
carrier count — an order that reads no score, so the cap can drop a higher-scoring
haplotype before a lower-scoring one. Every other per-site product has the same shape for
the same reason: integrated_results keeps one representative per axis, the
observed-haplotypes companion keys on the variant set, extract-flanks on carrier count.
The observed-haplotypes companion comes closest — it carries both scores per
haplotype — but it is gated to sites with two or more distinct haplotypes, so a site
with a single observed ALT haplotype gets no row there at all, and it carries no
never-blank status, no per-site roll-up computed before a cap, and no reconciliation
against the site's own reported alignment. "Give me every ALT above a threshold, with a
reason wherever there is no number" could not be asked of any of them.
scripts/haplotype_scores.py writes that file — one row per site × haplotype ×
alignment frame, each with its score and a never-blank score_status:
python3 scripts/haplotype_scores.py \
--results Results/<your-job> \
--out <your-job>.haplotype_scores.tsvInside the container the tree lives under /opt/conda/opt/crisprme, so the same run is
python3 /opt/conda/opt/crisprme/scripts/haplotype_scores.py --results ….
It reads the scores the pipeline already wrote, so it cannot disagree with the report;
the caveat ships as a column (alignment_frame=candidate_frame — the haplotype's bases in
the candidate's alignment shape). Useful flags:
--targets <curated table>— restrict the file to a curated shortlist and reconcile each site's own reported haplotype against the ones written (row_reported_alignment_found). Sites the source does not hold are counted and named rather than silently absent. Without it the whole run is written, which a genome-wide search will not fit in memory.--max-haplotypes N— cap rows per site. Counters are computed before the cap, so a capped file still reports the true totals, andrank_score_axissays which score the rank used: CRISPR-Bulge-bearing rows rank first, then CFD-only — the two scales are never compared.--anonymise— counts without sample identities.--strict— exit non-zero when a site's reported alignment is on none of its haplotypes (default: warn, exit 0).
Carriers are reported, never ranked on: a heterozygous carrier is as orderable as a
homozygous one. carriers_homozygous/heterozygous read unknown when the source does
not record which allele — which these sidecars do not, so for zygosity use
extract-flanks, whose SAMPLE:slot form carries it.
This section covers CRISPRme testing. This ensures that the software is correctly installed, configured, and ready for use. This section covers two testing options tailored to user needs:
-
Quick Test
A lightweight test to verify the installation and basic functionality. -
Detailed Test
A comprehensive pipeline test, replicating a full-scale CRISPRme analysis.
For persistent issues, refer to the CRISPRme GitHub Issues Page or contact the maintainers.
The Quick Test provides a simple and efficient way to confirm that CRISPRme is correctly installed and operational on your system. It ensures that the software is accessible, dependencies are properly configured, and the version matches the expected release.
Step 1: Verify CRISPRme Installation
Open a terminal and execute the following command to check the software version:
crisprme.py --versionIf the output displays the correct software version (e.g., v2.10.1), CRISPRme
is successfully installed and ready for use.
Step 2: Access CRISPRme Help Menu
To explore the functionalities and input parameters of CRISPRme, use the
--help flag:
crisprme.py --helpThe help menu provides detailed descriptions of CRISPRme's features and usage instructions, enabling users to familiarize themselves with available options and workflows.
Why Perform the Quick Test?
The Quick Test is highly recommended:
-
Immediately after installation to ensure the setup is correct.
-
Before running full-scale analyses to verify dependencies and environment configurations.
If the Quick Test completes without errors, you can confidently proceed to detailed analyses using CRISPRme’s powerful tools and features.
For a more comprehensive validation of CRISPRme’s functionality, this detailed test offers a full-scale test of the main CRISPRme pipeline, specifically its Complete Search module. This test provides two distinct options for testing: a quicker, focused test on a single chromosome and a more detailed, exhaustive test across the entire genome:
-
Single Chromosome Test
complete-test --chrom chr22against a prebuilt index you have downloaded, which searches the example guide RNA on chromosome 22 only; orcomplete-test's benchmark mode, which downloads chromosome 22 with its 1000 Genomes variants, builds small test indexes and runs the registered benchmarks, so thatvalidate-testcan compare the off-targets with the committed brute-force ground truth. The benchmark mode needs no prebuilt index, and it is what CI runs. -
Full Genome Test
This test checks CRISPRme's ability to search for potential off-targets across the entire human genome using a prebuilt index you have downloaded: without--chrom, the prebuilt-index smoke searches the example guide RNA over every chromosome of the index's genome. With a variant index such as20-NRR_3_hg38+hg38_HGDP1kGPit is a genome-wide variant search and needs the memory given in §0 (64 GB or more).
After the benchmark mode's Single Chromosome Test, the Off-Target Sites Validation Test
(validate-test) compares CRISPRme-predicted off-targets against brute-force
ground-truth alignments derived from 1000 Genomes variant data, providing a
rigorous correctness check of the pipeline. It applies to that test only: a test
against a prebuilt index, on one chromosome or the whole genome, leaves it nothing to
check.
Why Perform the Detailed Test?
The Detailed Test is ideal for users who wish to:
- Fully assess CRISPRme’s performance across the genome.
- Perform a more comprehensive check on CRISPRme’s ability to handle large-scale data and complex analyses.
- Validate CRISPRme’s off-target predictions against brute-force results using the Validate Test functionality.
Successful completion of the detailed test, optionally followed by the Validate Test, confirms the full functionality of CRISPRme, ensuring it is ready to handle large datasets and complex genetic analysis tasks.
To run the quicker test on chromosome 22 against a prebuilt index you have already
downloaded (e.g. 20-NRR_3_hg38+hg38_HGDP1kGP), execute the following command:
crisprme.py complete-test --chrom chr22 --thread 4It searches chromosome 22 alone and reports the off-targets the
Full Genome Test reports there. With 20-NRR_3_hg38+hg38_HGDP1kGP it
peaked at 9.2 GiB of RAM and took about 3 minutes at 16 threads (4.9 GiB and about 3 minutes with
20-NRG_3_hg38+hg38_HGDP1kGP; the release's gates, on a shared node).
validate-test does not apply to it, as to any run of the prebuilt-index smoke.
As CI runs it, the single-chromosome test is complete-test's benchmark mode followed by
validate-test: it downloads chromosome 22 with its 1000 Genomes variants, builds small
test indexes, runs every registered benchmark, and validate-test compares the off-targets
with the committed brute-force ground truth. Run it from an empty folder; it fits in 16 GB
of RAM and took 25 to 35 minutes at 8 threads in testing:
CRISPRME_ALLOW_ONDEMAND_BUILD=1 \
crisprme.py complete-test --chrom chr22 --vcf_dataset 1000G --thread 8
# expect: 6 passed, 0 failed, 0 skipped
crisprme.py validate-test --chrom chr22To run the detailed test across the entire genome against a prebuilt index you
have already downloaded, execute the following command (with no option at all,
complete-test prints its help instead). Without --chrom it searches every chromosome
of the index's genome; with a variant index such as 20-NRR_3_hg38+hg38_HGDP1kGP it is a
genome-wide variant search, so give it the 64 GB or more of RAM that
§0 gives for one:
crisprme.py complete-test --thread 4validate-test does not apply to this test: it checks the benchmark mode's output only
(§3.2.1), so after this test it finds nothing to check,
says so in one line and exits 1.
If you use CRISPRme in your research, please cite our paper:
Cancellieri S, Zeng J, Lin LY, Tognon M, Nguyen MA, Lin J, Bombieri N, Maitland SA, Ciuculescu MF, Katta V, Tsai SQ, Armant M, Wolfe SA, Giugno R, Bauer DE, Pinello L. Human genetic diversity alters off-target outcomes of therapeutic gene editing. Nat Genet. 2023 Jan;55(1):34-43. doi: 10.1038/s41588-022-01257-y. Epub 2022 Dec 15. PMID: 36522432; PMCID: PMC10272994.
-
Luca Pinello
lpinello@mgh.harvard.edu -
Rosalba Giugno
rosalba.giugno@univr.it -
Daniel Bauer
bauer@bloodgroup.tch.harvard.edu
CRISPRme+ is licensed under the MGB Open Access License 1.0 (MGBOA 1.0) (full terms), which permits its use only for non-commercial, non-revenue-generating, academic purposes.
Draft summary — for guidance only. The description below states the intended commercial-licensing model; the binding terms are those of the separate commercial license agreement. Licensing is administered with Mass General Brigham Innovation (which manages the underlying intellectual property). This text is not legal advice and is subject to their review.
Any commercial or for-profit use requires a separate commercial license. The requirement is triggered by the commercial use of CRISPRme itself or of any result, report, or other output it produces — for example in a clinical trial, diagnostic, product, or drug-development program — regardless of who ran the software. In particular, having an academic or non-profit party run CRISPRme on your behalf does not confer commercial rights: the free academic license grants no commercial rights to the outputs.
The model is meant to be fair and to keep CRISPRme widely usable:
| Scenario | Needs a commercial license? |
|---|---|
| Academic / non-profit user, for their own non-commercial, non-revenue-generating research and teaching | No — free under MGBOA 1.0 (no fee, no time limit) |
| Commercial / for-profit use of CRISPRme or of a result it produces (clinical trial, diagnostic, product, drug-development program) | Yes — covers running CRISPRme and the commercial use of what it produces. A result generated under a valid commercial license may then be used and transferred with the associated program (e.g. after an acquisition or out-licensing) with no repeat fee merely to use it |
| Service provider / CRO running CRISPRme to produce results for third parties | Yes — a commercial (service-provider) license |
No warranty. CRISPRme and its outputs are provided "AS IS", without warranty of any kind; predictions are computational, may contain false positives and false negatives, and are not a substitute for experimental validation. Outputs may change as the software, its methods, or the underlying data are updated or improved. To the maximum extent permitted by law, the authors, contributors, and their institutions accept no liability for any use of, or reliance on, CRISPRme or its outputs. (The same disclaimer appears in every generated report.)
For a commercial license or any licensing question, please contact Luca Pinello at lpinello@mgh.harvard.edu.

