CRISPR Trace Analysis is an R Shiny application for estimating CRISPR/Cas9 (in this release SpCas9 only) editing efficiency and indel distributions from Sanger sequencing chromatograms (.ab1 files).
The application compares wild-type (WT) and CRISPR-edited sequencing traces, compensates for local differences in capillary electrophoresis, and estimates the relative contributions of different insertion and deletion sizes using non-negative least squares (NNLS) deconvolution.
CRISPR Trace Analysis estimates CRISPR editing efficiency by aligning WT and edited Sanger chromatograms and fitting WT-derived indel models to the four-channel fluorescence signals downstream of the predicted cleavage site using non-negative least squares (NNLS).
CRISPR Trace Analysis was developed to provide a freely available, open-source alternative for analysing Sanger sequencing traces of CRISPR-edited samples. Existing tools for estimating genome-editing efficiency often do not provide access to their source code, limiting transparency and independent verification of their underlying methods.
This project aims to make the analysis process more transparent, reproducible, and accessible by providing an openly available implementation that researchers can inspect, evaluate, adapt, and extend to suit their needs.
- AB1 chromatogram analysis: Load WT and CRISPR-edited Sanger sequencing files.
- gRNA recognition: Identify the guide RNA in the WT sequence, including reverse-complement matching, and estimate the SpCas9 cleavage site.
- Optional reference sequence: Supply a reference DNA sequence to validate the gRNA and recover the cleavage-site position when the WT read is truncated.
- Flexible alignment: Align WT and CRISPR traces using sequential peak pairing, smooth-spline warping, and pre-cut signal correlation optimization.
- Amplitude normalization: Normalize CRISPR trace intensities against the pre-cut region.
- NNLS-based indel estimation: Deconvolve the edited trace into a configurable range of insertion/deletion size models.
- Editing efficiency estimation: Calculate the estimated non-WT fraction from the fitted indel distribution.
- Interactive trace visualization: Compare WT and CRISPR traces, inspect individual indel models, and reconstruct mixtures of selected indel components.
- Four-channel analysis: Inspect A, C, G, and T fluorescence signals alongside the corresponding modeled traces.
- Sequence alignment display: Examine artificial WT-to-indel model alignments, with deletions, unknown inserted bases, and the modeled cut position highlighted.
- Quality and alignment diagnostics: Report pre-cut, near-cut, and post-cut correlations, alignment parameters, peak anchors, and the model's coefficient of determination ((R^2)).
- Data export: Download estimated indel frequencies as a CSV file.
- Load sequencing data — Import WT and CRISPR-edited
.ab1files and provide the gRNA sequence. - Identify the target — Locate the gRNA, determine its orientation, and calculate the expected cleavage position. An optional reference sequence supports validation and recovery when the WT trace does not fully cover the target.
- Extract the analysis window — Select a configurable region upstream and downstream of the cleavage site.
- Align the chromatograms — Match sequential peak positions and fit a smooth spline to account for local differences in electrophoretic mobility. Optimize the residual offset using the pre-cut signal.
- Normalize signal amplitudes — Match the average signal intensity in the pre-cut region.
- Model indels — Generate WT-derived trace models with configurable downstream shifts corresponding to different indel sizes.
- Estimate indel frequencies — Fit the modeled signals to the CRISPR trace using NNLS and normalize the resulting coefficients to obtain relative fractions.
- Inspect and export results — Review the indel spectrum, compare four-channel traces, inspect alignment diagnostics, and export the estimated frequencies.
The alignment procedure uses a common starting position identified through sequence alignment. Subsequent WT and CRISPR peaks are paired sequentially, assuming that corresponding peak indices represent successive sequencing products.
A smooth spline maps WT trace coordinates onto CRISPR trace coordinates, compensating for local differences in peak spacing. A residual integer offset is then optimized against the pre-cut region, where the sequence is expected to remain unchanged.
This approach aims to preserve the correspondence between sequencing products while accounting for local mobility differences. Correlations before, near, and after the cleavage site provide diagnostic measures of alignment quality.
The application constructs a set of candidate chromatogram models by shifting the WT fluorescence signal downstream of the cleavage site. The shifts correspond to candidate indel sizes, including a zero-shift WT model.
The model coefficients are estimated by solving a non-negative least-squares optimization problem:
where:
-
$$(\mathbf{y})$$ is the aligned CRISPR trace, including all four fluorescence channels. -
$$(\mathbf{X})$$ contains the candidate WT-derived indel models -
$$(\beta)$$ is the vector of non-negative coefficients describing the contribution of each model to the observed signal. -
$$(\hat{\beta})$$ is the estimated coefficient vector that minimizes the squared difference between the observed signal and the reconstructed signal.
The coefficients are normalized to estimate the relative contribution of each modeled indel class. The editing efficiency is estimated as:
The fit quality is summarized using (R^2).
Important: The indel models are simplified, WT-derived signal-shift models. Inserted nucleotide identities are not reconstructed, and the estimated fractions are model-dependent rather than direct measurements of individual alleles. The results should therefore be interpreted as estimates of the indel-size distribution, not as definitive sequence-level identification or quantification of every edited allele.
- R — Numerical analysis and signal processing
- Shiny — Interactive web interface
- sangerseqR — Sanger sequencing chromatogram processing
- Biostrings — DNA sequence handling, alignment, and reverse-complement matching
- nnls — Non-negative least-squares deconvolution
CRISPR Trace Analysis Copyright © 2026 Sigurd Krieger
This project is licensed under the PolyForm Noncommercial License 1.0.0.
You may use, modify, and redistribute this software for noncommercial purposes, subject to the terms of the license.
Commercial use is not permitted without separate permission from the copyright holder.
The software is provided "AS IS", without warranty of any kind. To the extent permitted by applicable law, the copyright holder shall not be liable for any damages arising from the use of this software.
The complete license terms are available at: https://polyformproject.org/licenses/noncommercial/1.0.0