SpCas9 only cuts DNA next to a PAM (protospacer-adjacent motif) with sequence 5′-NGG-3′. It then checks whether the adjacent 20 nucleotides match the 20-nt guide RNA (sgRNA):
5'-[20-nt protospacer]-[N G G]-3' (PAM)
mismatches = Σ (protospacer[j] ≠ sgRNA[j]), j = 0..19
cut site = 3 bp upstream of the PAM (blunt double-strand break)
A site with 0 mismatches is the on-target site; sites within your mismatch-tolerance slider are recognised off-targets — a real risk of CRISPR therapies. Once bound, Cas9's HNH and RuvC domains each cut one strand, producing a blunt double-strand break (DSB).
The cell then repairs the DSB by one of two pathways:
- NHEJ (non-homologous end joining) — fast, available in any cell-cycle phase, but error-prone: it inserts or deletes a random number of bases. If the indel length is not a multiple of 3, the reading frame shifts and the gene is usually knocked out.
- HDR (homology-directed repair) — precise, copies a donor template, but only works when a donor is supplied and a sister chromatid is available (S/G2 phase) — never in G1. This is how a specific point mutation is corrected rather than just disrupted.
This simulator models both steps end to end: PAM scanning with adjustable mismatch tolerance, a real double-strand break at the computed cut site, and a repair-pathway choice that depends on the cell-cycle phase and donor-template controls you set.