- Published on
- 35 min read
Understanding CRISPR amplicon sequencing reads: what your FASTQ files actually tell you
- Authors

- Name
- BioTech Bench
Table of contents
- What you'll learn
- Getting a real dataset to follow along
- Anatomy of a FASTQ record
- First check: how many reads, and how good are they?
- FastQC on a real amplicon run: most of the red is fine
- What's actually in the reads
- Trimming and merging read pairs with fastp
- Seeing the edit in the raw reads
- Sequencing error or real edit? Ask the untreated control
- A pre-analysis checklist
- Limitations: what this kind of checking can't tell you
- What I do with my own runs
- Resources
The email from the sequencing core always looks the same. "Your run is complete. Data available at the link below for 30 days." You click it, download a zip, and find a folder of files called things like Sample7_S7_L001_R1_001.fastq.gz. Two per sample. Some of them are 20 MB, one of them is 600 KB, and you have no idea whether that's a problem.
Let me guess what happens next. You either paste the files straight into a CRISPR analysis tool and take whatever percentage comes out, or you open one in a text editor, see four lines of gibberish repeated a hundred thousand times, and close it again. I've done both. The first one is worse, because the tool will give you a number, and the number will look exactly as confident whether your library was perfect or half primer dimer.
This post is the step in between. Before you quantify anything, you want to know what's actually in those files: how good the reads are, whether they're the amplicon you designed, whether one of your samples quietly failed, and whether you can see your edit with your own eyes. That takes about fifteen minutes and a handful of free and open-source command-line tools, and it'll change how much you trust whatever number comes next.
What you'll learn
- How to read a FASTQ record, including how to decode the quality line into actual error probabilities
- How to spot a failed sample in the first two minutes, using read counts and the insert-size distribution
- How to read a FastQC report on amplicon data without panicking at a wall of red crosses (most of them are supposed to be there)
- How to trim and merge paired-end reads with
fastp, and which numbers in its report actually matter - How to see your CRISPR edit directly in the raw reads, and why searching for your guide on only one strand silently loses half your data
- Why your untreated control is the most important sample on the plate, illustrated by a control that isn't as clean as you'd hope
Getting a real dataset to follow along
I didn't want to write this post with simulated reads. Simulated data has perfect quality scores and no surprises, which defeats the entire point of a post about checking data quality. So instead we'll use a public amplicon sequencing run from Foss et al. (2023) in Nature Biomedical Engineering. They delivered Cas9 ribonucleoprotein (RNP) into primary human T cells using a cell-penetrating peptide method they call PERC, compared it with electroporation, and deposited all the amplicon sequencing in the NCBI Sequence Read Archive under BioProject PRJNA923785.
Here's why this dataset is a good teacher. Their EMX1 experiment targets the classic GAGTCCGAGCAGAAGAAGAA protospacer, the same EMX1 guide we used in the CRISPResso2 tutorial, so what you learn here carries straight over. It includes a genuinely untreated control. And it includes one sample that clearly didn't work, which is exactly the kind of thing you need to learn to catch. It was sequenced on an Illumina MiSeq with 2×301 bp reads, the most common setup for CRISPR amplicon work.
We'll use four samples:
| Run | Donor | Condition | What it teaches |
|---|---|---|---|
| SRR24402764 | 1 | Non-treated (no RNP) | The baseline |
| SRR24402766 | 1 | Cas9 RNP delivered by PERC | A moderately edited sample |
| SRR24402765 | 1 | Cas9 RNP by electroporation | A heavily edited sample |
| SRR24402885 | 3 | Cas9 RNP by electroporation | A sample that failed |
First, install the tools. I'm using FastQC for the quality report, fastp for trimming and merging, seqkit for quick FASTQ statistics, and jq for reading one value out of a JSON file. All four are free and live on Bioconda. One version note: Bioconda recently started serving a rewritten FastQC 0.13 with different command-line flags, so I pin the long-standing 0.12.1, which is what most cluster installs and tutorials still use.
conda create -n amplicon-qc -c conda-forge -c bioconda fastqc=0.12.1 fastp seqkit jq -y
conda activate amplicon-qc
The European Nucleotide Archive (ENA) mirrors every SRA run as ready-made .fastq.gz files, so you don't need the SRA toolkit. This loop asks ENA where each run's files live and downloads them over HTTPS:
mkdir -p data
for RUN in SRR24402764 SRR24402766 SRR24402765 SRR24402885; do
for u in $(curl -fsS "https://www.ebi.ac.uk/ena/portal/api/filereport?accession=$RUN&result=read_run&fields=fastq_ftp&format=tsv" | tail -n 1 | cut -f2 | tr ';' ' '); do
curl -fsS -o "data/$(basename "$u")" "https://$u"
done
done
ls -lh data/ | awk 'NR > 1 { print $5, $9 }'
16M SRR24402764_1.fastq.gz
20M SRR24402764_2.fastq.gz
15M SRR24402765_1.fastq.gz
18M SRR24402765_2.fastq.gz
15M SRR24402766_1.fastq.gz
18M SRR24402766_2.fastq.gz
546K SRR24402885_1.fastq.gz
632K SRR24402885_2.fastq.gz
There's the first clue already, and we haven't looked inside a single file. Three samples are 15–20 MB per read file, and one is around 600 KB. A thirty-fold difference in file size between samples on the same run is something you should notice before anything else. Hold that thought.
Anatomy of a FASTQ record
A FASTQ file is plain text. Every read takes exactly four lines, and the file is just those four lines repeated once per read. Let's look at the first read pair of the untreated control:
zcat data/SRR24402764_1.fastq.gz | head -n 4
@SRR24402764.1 1/1
TTTGCCCACCCTAGTCATTGGAGGTGACATCGATGTCCTCCCCATTGGCCTGCTTCGTGGCAATGCGCCACCGGTTGATGTGATGGGAGCCCTTCTTCTTCTGCTCGGACTCAGGCCCTTCCTCCTCCAGCTTCTGCCGTTTGTACTTTGTCCTCCGGTTCTGGAACCACACCTTCACCTGGGCCAGGGAGGGAGGGGCACAGATGAGAAACTAGATCGGAAGAGCACACGTCTGAACTCCAGTCACAACTTGCCATCTCGTATGCCGTCTTCTGCTTGAAAAAAAAAACATATACAAAAA
+
-ACBCGGGGGGGGGGGGGGGGGGGGFGGGGGE@GDEFGFDGGGGGG,,CFGFCEGF7F8,@,6CEC+CC@FF@7CF+,C,E,,B,,,9,76BFFEGFDFGGGFGGGGE7FGGGCFFFCFGGGGFEFGGFFGGGGGGGGGEFGGGGGGGGGGGGGGGGCDGGGGFGGGGGFGG>FGGGGFGGFGGGGGFFC>DDDDFF=49=@2;DEDFFGBFFEBF<CFFF>EGGFFFGFF;F((4?@FFF;@@43;E@BE<CEFF94:<???BF419?>:BDB<<<AFBFF>?>F371(3.4)+0*)124
zcat data/SRR24402764_2.fastq.gz | head -n 4
@SRR24402764.1 1/2
CGTTTCTCATCTGTGCCCCTCCCTCCCTGGCCCAGGTGAAGGTGTGGTTCCAGAACCGGAGGACAAAGTACAAACGGCAGAAGCTGGAGGAGGAAGGGCCTGAGTCCGAGCAGAAGAAGAAGGGCTCCCATCACATCAACCGGTGGCGCATTGCCACGAAGCAGGCCAATGGGGAGGACATCGATGTCACCTCCAATGACTAGGGTGGGCAACAGATCGGAAGAGCGTCGTGTAGGGAAAGAGGGGGGGGGGTTGGGTGGAACGCGTGGGTCAGCGTGTGAGTCAGAACAAAAAACCAAAA
+
-CCCCGGGGGGFGG9FFGGGGGGGGGGGGGGGGGGGGGGGGGGGGGDGFGGGFGGGFGEGGGGGGGC<FFGGGGGGGGGGGGGGGGGGGFDGGDGDEGGDEFGGGGGGGGGGGGFDGGGFF8ECECG>88,@DFGF?FFEFGG=CE8BG=EDFCDFGD59@AF<CB>@F)3=C58E*/<A*7CFACEEEC><DFFBEEEFEFB@FFDFEF4;2=@@);<?<@<94*.)(((-(,17(((.,.**((-/9D))--(-(/*1()(((2(4((((***,(-(()***1*97)))).080)055)
Line by line:
- The header, starting with
@. Files downloaded from SRA have their headers rewritten to@<run>.<read number>, plus1or2for the mate. The files from your own core will instead carry the original Illumina header, something like@instrument:run:flowcell:lane:tile:x:y 1:N:0:barcode. That format tells you which instrument, lane and tile each read came from, which is occasionally handy when one tile had a bubble. The only rule that matters day to day is that read n in the R1 file and read n in the R2 file are the two ends of the same DNA molecule. Never sort or filter one file without the other. - The sequence, 301 bases here.
- A
+separator. Historically it could repeat the header. In practice it's always just+. - The quality string, one character per base, same length as the sequence.
Notice something about these two reads before we move on. Read 1 starts with TTTGCCCACCCTAGTCATTGG… and read 2 starts with CGTTTCTCATCTGTGCCCC…. Those are the two PCR primers, one at each end of the amplicon. And at about base 214 of read 1, you can see AGATCGGAAGAGC, the start of the Illumina adapter, followed by a run of increasingly odd bases that end in AAAAAAAAAA. The sequencer read straight off the end of our amplicon and into the adapter, then into nothing. We'll come back to why.
Decoding the quality line
Each quality character encodes a Phred score, Q, which is the sequencer's estimate of how likely that base call is wrong: Q = −10 × log10(error probability). So Q10 means a 1 in 10 chance of error, Q20 means 1 in 100, Q30 means 1 in 1,000. To fit a number into one character, Illumina adds 33 to Q and writes the ASCII character with that code (this is called Phred+33 encoding). You can decode it yourself with a bit of awk:
zcat data/SRR24402764_1.fastq.gz | sed -n '4p' | cut -c1-12 |
awk 'BEGIN { for (i = 33; i <= 126; i++) ord[sprintf("%c", i)] = i }
{ for (i = 1; i <= length($0); i++) { c = substr($0, i, 1); printf "%s=Q%d ", c, ord[c] - 33 }; print "" }'
-=Q12 A=Q32 C=Q34 B=Q33 C=Q34 G=Q38 G=Q38 G=Q38 G=Q38 G=Q38 G=Q38 G=Q38
The very first base is -, Q12: about a 6% chance of being wrong. The first base of a read is often lower quality, because the instrument is still calibrating on the first cycle. After that the read jumps to G, Q38, and stays there. On this run, Q38 (G) is the top score; the ceiling depends on the instrument and software version. So when you see a long run of Gs or Fs in a MiSeq quality string, that's good news. Runs of #, ( or , are not.
This is the whole reason we're not using simulated data. Simulated reads usually have a quality line of solid Is, which hides the most important property of real reads: quality falls off along the read, and it falls off faster on read 2. Which brings us to the first real check.
First check: how many reads, and how good are they?
seqkit gives you per-file statistics in seconds. The -a flag adds quality columns, and I cut the output down to the columns I actually look at: number of reads, average length, the percentage of bases at Q20 and Q30 or better, and the mean quality.
seqkit stats -T -a data/*.fastq.gz | cut -f1,4,7,15,16,17 | column -t
file num_seqs avg_len Q20(%) Q30(%) AvgQual
data/SRR24402764_1.fastq.gz 111893 301.0 90 79 20.20
data/SRR24402764_2.fastq.gz 111893 301.0 76 62 15.80
data/SRR24402765_1.fastq.gz 100663 301.0 88 77 19.19
data/SRR24402765_2.fastq.gz 100663 301.0 75 61 15.87
data/SRR24402766_1.fastq.gz 101235 301.0 89 78 19.63
data/SRR24402766_2.fastq.gz 101235 301.0 76 61 15.91
data/SRR24402885_1.fastq.gz 3154 301.0 74 64 16.07
data/SRR24402885_2.fastq.gz 3154 301.0 63 51 14.03
Three things jump out.
One sample has about thirty times fewer reads than the others. SRR24402885 has 3,154 read pairs. The paper's methods say they sequenced to at least 10,000 reads per sample, so this one fell short of the authors' own target. With 3,154 reads, every 1% of editing is about 30 reads, and as we'll see, many of those reads aren't even the amplicon. In the amplicon NGS design post I suggested 10,000 to 30,000 reads per sample for a knockout check, and those need to be reads of your amplicon, not primer dimers.
Read 2 is always worse than read 1. For the good samples, 77–79% of read 1 bases are Q30 or better, versus 61–62% for read 2. That isn't a problem with this run. It's how Illumina paired-end chemistry works: read 2 is sequenced only after read 1, the index reads and a turnaround step that regenerates the opposite strand, and by then some strands in each cluster have been lost or damaged, so the signal is weaker. If your core's read 2 looks noticeably worse than read 1, that's normal. If your read 1 looks like this read 2, that's worth an email.
The failed sample is also lower quality (64% Q30 on read 1 against 77–79% for the others). Short, junky inserts tend to cluster and sequence badly, so poor quality and low read count often travel together. That's another hint about what went wrong, which we'll confirm shortly.
FastQC on a real amplicon run: most of the red is fine
FastQC is the tool everyone runs first, and it produces a report with a traffic-light verdict for each of its analysis modules. Run it on all eight files at once:
mkdir -p qc
fastqc -q -t 4 -o qc data/*.fastq.gz
Each file gets an HTML report and a zip file. The zip contains a plain-text summary.txt with the verdicts, which is quicker to read than eight HTML pages:
for f in qc/SRR24402764_1_fastqc.zip qc/SRR24402764_2_fastqc.zip; do
echo "== $f"; unzip -p "$f" '*/summary.txt' | cut -f1,2
done
== qc/SRR24402764_1_fastqc.zip
PASS Basic Statistics
FAIL Per base sequence quality
PASS Per sequence quality scores
FAIL Per base sequence content
FAIL Per sequence GC content
PASS Per base N content
PASS Sequence Length Distribution
FAIL Sequence Duplication Levels
FAIL Overrepresented sequences
FAIL Adapter Content
== qc/SRR24402764_2_fastqc.zip
PASS Basic Statistics
FAIL Per base sequence quality
PASS Per sequence quality scores
FAIL Per base sequence content
FAIL Per sequence GC content
PASS Per base N content
PASS Sequence Length Distribution
FAIL Sequence Duplication Levels
FAIL Overrepresented sequences
FAIL Adapter Content
Six FAILs out of ten, on both reads of a perfectly usable control sample. The first time I saw a FastQC report on amplicon data, I assumed the run was ruined. It wasn't, and neither is this one. Here's the honest answer: FastQC's thresholds were designed for whole-genome sequencing, where reads come from random positions across millions of different DNA fragments. An amplicon library is the opposite. Every read comes from the same 213-bp molecule. So several modules fail by design:
- Per base sequence content: FAIL, ignore it. FastQC expects A, C, G and T to be roughly equally common at every position. In an amplicon, position 1 of every read is the first base of a primer, so it's the same base in every read. Expected.
- Per sequence GC content: FAIL, ignore it. FastQC compares your GC distribution with a smooth genome-wide curve. One amplicon has one GC content, so you get a single sharp spike. Expected.
- Sequence duplication levels: FAIL, ignore it. Nearly every read is a "duplicate" of every other, because they're all copies of the same locus. That's the point of an amplicon.
- Overrepresented sequences: FAIL, mostly ignore it. Same reason. It's worth a glance, though, because primer dimers often show up here as a short overrepresented sequence.
- Adapter content: FAIL, expected here. This one's specific to the setup. The amplicon is 213 bp and the reads are 301 bases, so every read runs 88 bases into the adapter. We'll trim it off.
- Per base sequence quality: FAIL, look at the plot. This is the module worth your time.

Figure 1. FastQC per-base sequence quality for the untreated control (SRR24402764). Each yellow box is the spread of quality scores at that position across all reads, and the blue line is the mean. Read 1 (left) stays in the green zone until about base 200, then drops. Read 2 (right) starts falling around base 150 and ends deep in the red. The final ~90 bases of both reads sit past the end of the 213-bp amplicon anyway, so that's mostly adapter and junk being read. Output of the code above.
The reason this module "fails" is the tail end of both reads, and the tail is exactly where we have no amplicon left, only adapter. What I actually check on this plot is the quality across the stretch of the read that covers my cut site. Here, the EMX1 cut site sits roughly in the middle of the amplicon, about 95–120 bases into either read, where both reads are still solidly above Q30. That's what matters.
What's actually in the reads
FastQC tells you about quality. It doesn't tell you whether the reads are your amplicon. For that, I like to look at the raw sequences directly, starting with the most common way reads begin:
zcat data/SRR24402764_1.fastq.gz | awk 'NR % 4 == 2' | cut -c1-25 | sort | uniq -c | sort -rn | head -n 5
53160 GTTGCCCACCCTAGTCATTGGAGGT
48536 AGTTTCTCATCTGTGCCCCTCCCTC
1206 GTTGCCCACCCTAGTCATTGGAGGG
1180 GTCGCCCACCCTAGTCATTGGAGGT
1111 AGCTTCTCATCTGTGCCCCTCCCTC
The top two lines are the two PCR primers, and between them they cover almost all of the reads (53,160 + 48,536 of 111,893). That's the reassuring part. The interesting part is that read 1 starts with either primer, about half the time each. In a "directional" library, read 1 would always start from the same primer. Here, the way the sequencing adapters were attached means either end of the amplicon can end up as read 1.
This matters more than it sounds. It means half your reads contain the guide sequence as written, and the other half contain its reverse complement. Any check you do by searching for a sequence, like counting reads with an intact guide, has to search both strands, or you'll silently analyze half your data. I'll show you what that looks like in numbers in a minute.
The three smaller lines (1,206, 1,180 and 1,111 reads) are the same primers with a single base changed. These are almost certainly errors from primer synthesis or the first sequencing cycle, not biology. Every oligo order contains a small fraction of imperfect molecules. Keep them in mind as a reminder of what background noise looks like: single-base differences, scattered across the read, in every sample.
Finding the end of the amplicon and the primer dimers
The Illumina adapter starts with AGATCGGAAGAGC. If I find where that sequence begins in each read, I learn how long the DNA insert was, because the sequencer reads through the insert and then hits adapter:
zcat data/SRR24402764_1.fastq.gz | awk 'NR % 4 == 2 { i = index($0, "AGATCGGAAGAGC"); print (i ? i - 1 : "no_adapter") }' |
sort | uniq -c | sort -rn | head -n 6
98178 213
6958 no_adapter
2251 41
1609 212
934 214
337 210
This is one of my favorite quick checks, because so much falls out of it:
- 98,178 reads have the adapter at position 213. The insert is 213 bp, exactly the amplicon size. Most of the library is what it should be.
- 2,251 reads have the adapter at position 41. That's a 41-bp insert, far too short to be the amplicon. These are primer dimers: the two PCR primers annealed to each other and got amplified and sequenced. About 2% of this library is primer dimer, which is fine. Primer dimers are small and amplify efficiently, so a bit of them is normal, especially if the bead clean-up after PCR wasn't stringent.
- 1,609 at 212 and 934 at 214. Inserts one base shorter or longer than the amplicon. Some of these will be genuine small indels, and some will be primer synthesis errors that dropped or added a base. Can't tell which from this alone.
- 6,958 with no adapter found. Mostly reads where a sequencing error landed inside the adapter's first 13 bases, so my exact-match search missed it. Quality is low out there, so that's expected.
Now run the same command on the sample that worried us:
zcat data/SRR24402885_1.fastq.gz | awk 'NR % 4 == 2 { i = index($0, "AGATCGGAAGAGC"); print (i ? i - 1 : "no_adapter") }' |
sort | uniq -c | sort -rn | head -n 4
1739 213
1097 41
187 no_adapter
25 73
1,097 of 3,154 reads are primer dimers. That's about a third of the library, against 2% in the control. This is the classic signature of a PCR that had very little genomic DNA template to work with. When there's plenty of template, the primers mostly find their target. When there isn't, they find each other. So the sample didn't fail at the sequencer. It failed upstream, before any library was pooled: very little genomic DNA went into that PCR. The low read count, the lower quality and the primer dimers are all one problem. The fix is in the wet lab (more cells, re-extract, or a tighter bead clean-up that removes the short dimer band), not in the analysis.
Trimming and merging read pairs with fastp
Because the amplicon (213 bp) is shorter than each read (301 bases), read 1 and read 2 overlap across the entire amplicon. That's useful: fastp can merge each pair into one read covering the whole amplicon, and wherever the two reads disagree it can use the higher-quality base. It also trims the adapter, filters low-quality reads, and writes an HTML report plus a JSON file. One command per sample:
fastp -i data/SRR24402764_1.fastq.gz -I data/SRR24402764_2.fastq.gz \
--merge --merged_out merged/SRR24402764.fastq.gz \
--detect_adapter_for_pe -w 4 \
-j qc/SRR24402764.json -h qc/SRR24402764.html 2>&1
Detecting adapter sequence for read1...
>Illumina TruSeq Adapter Read 1
AGATCGGAAGAGCACACGTCTGAACTCCAGTCA
Detecting adapter sequence for read2...
>Nextera_LMP_Read2_External_Adapter
GATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT
Read1 before filtering:
total reads: 111893
total bases: 33679793
Q20 bases: 30206585(89.6876%)
Q30 bases: 26632196(79.0747%)
Q40 bases: 0(0%)
Read2 before filtering:
total reads: 111893
total bases: 33679793
Q20 bases: 25476212(75.6424%)
Q30 bases: 20917016(62.1055%)
Q40 bases: 0(0%)
Merged and filtered:
total reads: 108778
total bases: 22735740
Q20 bases: 22320621(98.1742%)
Q30 bases: 21133926(92.9546%)
Q40 bases: 0(0%)
Filtering result:
reads passed filter: 221252
reads failed due to low quality: 2534
reads failed due to too many N: 0
reads failed due to too short: 0
reads failed due to adapter dimer: 0
reads with adapter trimmed: 220878
bases trimmed due to adapters: 20337583
reads corrected by overlap analysis: 49294
bases corrected by overlap analysis: 95796
Duplication rate: 0.000893711%
Insert size peak (evaluated by paired-end reads): 213
Read pairs merged: 108778
% of original read pairs: 97.2161%
% in reads after filtering: 100%
JSON report: qc/SRR24402764.json
HTML report: qc/SRR24402764.html
fastp -i data/SRR24402764_1.fastq.gz -I data/SRR24402764_2.fastq.gz --merge --merged_out merged/SRR24402764.fastq.gz --detect_adapter_for_pe -w 4 -j qc/SRR24402764.json -h qc/SRR24402764.html
fastp v1.4.0, time used: 2 seconds
That's a lot of output. Here's what I actually read:
- Detected adapters. fastp found the Illumina adapter on both reads automatically. Don't worry about the odd database name it gives the read 2 adapter (
Nextera_LMP_Read2_External_Adapter). The sequence it detected,GATCGGAAGAGCGTCGTGTAGGG…, is the standard Illumina read 2 adapter, so treat the name as a database label and ignore it. - Before vs after quality. Read 2 had 62.1% Q30 bases before. The merged reads have 92.95% Q30. Most of that jump comes from trimming away the junk tail past the end of the amplicon, which is where the low-quality bases were. On top of that, where the two reads disagree, fastp corrects a low-quality call to match a high-quality one.
- Reads corrected by overlap analysis: 49,294. For that many reads, read 1 and read 2 disagreed somewhere, and fastp took the call with the higher quality. This is why merging is worth doing for CRISPR work: a sequencing error in one read gets outvoted by the other read, so fewer errors masquerade as substitutions near your cut site.
- Insert size peak: 213. The amplicon size, again.
- Read pairs merged: 108,778, or 97.2%. This is the number I care about most. A high merge rate means the pairs overlapped the way the amplicon design said they should.
Let's put the four samples side by side:
for RUN in SRR24402764 SRR24402766 SRR24402765 SRR24402885; do
printf '%s\tpairs_in=%s\tmerged=%s\tinsert_peak=%s\n' "$RUN" \
"$(zcat data/${RUN}_1.fastq.gz | awk 'END { print NR / 4 }')" \
"$(zcat merged/${RUN}.fastq.gz | awk 'END { print NR / 4 }')" \
"$(jq '.insert_size.peak' qc/${RUN}.json)"
done
SRR24402764 pairs_in=111893 merged=108778 insert_peak=213
SRR24402766 pairs_in=101235 merged=98032 insert_peak=213
SRR24402765 pairs_in=100663 merged=97363 insert_peak=213
SRR24402885 pairs_in=3154 merged=3089 insert_peak=213
All four samples merge at about 97% and peak at 213 bp. So merging alone doesn't flag the failed sample. The primer dimers merge happily too, just into 41-bp reads. That's why I always plot the insert-size distribution from fastp's JSON rather than reading only the peak:

Figure 2. Insert-size distributions estimated by fastp for the untreated control (blue) and the failed sample (red), as a percentage of read pairs on a log scale. Both peak at the 213-bp amplicon, but the failed sample has a second peak at 41 bp (primer dimers) that's nearly as tall as the amplicon peak. Plotted from fastp's JSON output (insert_size.histogram) with a short matplotlib script.
The peak is the same. The shape isn't. If you only remember one plot from this post, make it this one. It takes ten seconds to look at and it catches a failed library before you waste an afternoon interpreting its editing percentage.
Seeing the edit in the raw reads
Now for the fun part. Cas9 with this guide cuts between the 17th and 18th base of the protospacer, three bases upstream of the GGG PAM:
GAGTCCGAGCAGAAGAA | GAA GGG
If editing worked, the reads around that position should show insertions and deletions that the untreated control doesn't have. But remember the orientation problem first. Here's what happens if you count reads containing the guide but forget the reverse complement:
GUIDE=GAGTCCGAGCAGAAGAAGAA
RC_GUIDE=$(echo $GUIDE | rev | tr ACGT TGCA)
echo "forward only: $(zcat merged/SRR24402764.fastq.gz | awk 'NR % 4 == 2' | grep -c $GUIDE)"
echo "both strands: $(zcat merged/SRR24402764.fastq.gz | awk 'NR % 4 == 2' | grep -c -E "$GUIDE|$RC_GUIDE")"
forward only: 48365
both strands: 101994
Searching one strand finds 48,365 reads. Searching both finds 101,994. If you'd built an "editing efficiency" calculation on the forward strand only, you'd have thrown away more than half the reads without any error message. I've seen this trap in homemade lab scripts more than once.
To look at the cut site properly, I want every read flipped to the same strand, and then just the stretch of sequence around the cut. I pick two 20-nt anchor sequences in the amplicon, one ending 6 bp before the protospacer and one starting 4 bp after the PAM, and pull out whatever sits between them. In an unedited read, that stretch is exactly 33 bp: GGGCCTGAGTCCGAGCAGAAGAAGAAGGGCTCC. I anchor outside the protospacer on purpose, because an edit can destroy the protospacer itself, and you can't find a sequence that isn't there anymore.
Here's the little script. It uses seqkit grep to find reads containing the upstream anchor on the forward strand, adds the reads containing it on the reverse strand (flipped with seqkit seq -r -p), and then uses awk to print the stretch between the anchors:
cat > cutsite_window.sh <<'EOF'
# Usage: bash cutsite_window.sh merged/RUN.fastq.gz
# Prints the 33-bp stretch between two fixed anchors for every merged read
# that carries both, with every read flipped to the protospacer strand.
RC_UP=$(echo $UP | rev | tr ACGT TGCA)
{ seqkit grep -s -P -p $UP "$1"
seqkit grep -s -P -p $RC_UP "$1" | seqkit seq -r -p -t dna
} | seqkit seq -s |
awk -v up=$UP -v dn=$DN '{ a = index($0, up); b = index($0, dn)
if (a && b > a) print substr($0, a + length(up), b - a - length(up)) }'
EOF
export UP=GGCAGAAGCTGGAGGAGGAA
export DN=CATCACATCAACCGGTGGCG
export WT_WINDOW=GGGCCTGAGTCCGAGCAGAAGAAGAAGGGCTCC
for RUN in SRR24402764 SRR24402766 SRR24402765 SRR24402885; do
bash cutsite_window.sh merged/${RUN}.fastq.gz > qc/${RUN}.windows.txt
done
Now count the most common versions of that window in the control and the PERC-edited sample:
for RUN in SRR24402764 SRR24402766; do
echo "== $RUN"; sort qc/${RUN}.windows.txt | uniq -c | sort -rn | head -n 8
done
== SRR24402764
98127 GGGCCTGAGTCCGAGCAGAAGAAGAAGGGCTCC
719 GGGCCTGAGTCCGAGCAGAAGAAAGAAGGGCTCC
400 GGGCCTGAGTCCGAGCAGAAGAGAAGGGCTCC
175 GGGCCTGAGTCCGAGCAGAAGAAGGGCTCC
160 GGGCCTGAGTCCGAGCAGAAGGGCTCC
156 GGGCCTGAGTCCGAGCAGAAGAAGAAGGGCCCC
116 GGGCCTGAGTCCGGGCAGAAGAAGAAGGGCTCC
97 GGGCCTGAGTCC
== SRR24402766
63375 GGGCCTGAGTCCGAGCAGAAGAAGAAGGGCTCC
8086 GGGCCTGAGTCCGAGCAGAAGAAAGAAGGGCTCC
3665 GGGCCTGAGTCCGAGCAGAAGAGAAGGGCTCC
2584 GGGCCTGAGTCCGAGCAGAAGGGCTCC
2270 GGGCCTGAGTCCGAGCAGAAGAAGGGCTCC
939 GGGCCTGAGTCC
733 GGGCTCC
321 GGGCCTGAGTCCGAGCTCC
Look at the PERC-edited sample. The top line is wild type (63,375 reads). Then:
…CAGAAGAAAGAAGGG…(8,086 reads): a +1 insertion of an A right at the cut site. This is the single most common SpCas9 outcome at many sites, because Cas9 often leaves a one-base 5′ overhang that gets filled in before ligation.…CAGAAGA–GAAGGG…(3,665 reads): a 1-bp deletion at the cut.GGGCCTGAGTCCGAGCAGAAGGGCTCC(2,584 reads) andGGGCCTGAGTCCGAGCAGAAGAAGGGCTCC(2,270 reads): 6-bp and 3-bp deletions, dropping two or one of theGAArepeats at the cut site.GGGCCTGAGTCC(939 reads) andGGGCTCC(733 reads): 21- and 26-bp deletions, which remove most of the protospacer.
You can see the edits with your own eyes, in the raw data, before any alignment tool has touched it. That's a good feeling, and it's also a powerful sanity check on whatever number an analysis tool gives you later.
Now look at the untreated control. Wild type dominates (98,127 reads), but the next lines are the same +1 A insertion (719 reads), the same 1-bp deletion (400), and even the same 21-bp deletion (97). Hold that thought too. We'll come back to it, because it's the most important finding in this dataset.
The same windows, summarized as length changes:
for RUN in SRR24402764 SRR24402766; do
echo "== $RUN (window length minus 33; 0 = same length as wild type)"
awk '{ print length($0) - 33 }' qc/${RUN}.windows.txt | sort -n | uniq -c | sort -rn | head -n 6
done
== SRR24402764 (window length minus 33; 0 = same length as wild type)
100455 0
747 1
437 -1
186 -3
172 -6
105 -21
== SRR24402766 (window length minus 33; 0 = same length as wild type)
65027 0
8351 1
3955 -1
2760 -6
2353 -3
1061 -21

Figure 3. Length change of the cut-site window relative to wild type, as a percentage of reads carrying both anchors, for the untreated control (grey) and the PERC-edited sample (blue). The 0-bp bar (wild-type length) is left out so the indels are visible. The edited sample shows the familiar SpCas9 pattern: mostly +1 insertions and small deletions, plus a tail of larger deletions. The control shows the same pattern at a much lower level. Plotted from the windows files above with a short matplotlib script.
Sequencing error or real edit? Ask the untreated control
Here's the summary across all four samples. For each one I count the reads with both anchors, the reads whose window is exactly wild type, the reads whose window is the right length but has a different sequence (substitutions), and the reads whose window changed length (insertions or deletions):
printf 'run\twith_anchors\texact_wt\tsame_length_diff\tlength_changed\tindel_pct\n'
for RUN in SRR24402764 SRR24402766 SRR24402765 SRR24402885; do
awk -v run=$RUN -v wt=$WT_WINDOW '
{ n++; if ($0 == wt) w++; else if (length($0) == length(wt)) s++; else d++ }
END { printf "%s\t%d\t%d\t%d\t%d\t%.1f\n", run, n, w, s, d, 100 * d / n }' qc/${RUN}.windows.txt
done
run with_anchors exact_wt same_length_diff length_changed indel_pct
SRR24402764 102548 98127 2328 2093 2.0
SRR24402766 88605 63375 1652 23578 26.6
SRR24402765 85460 35581 1061 48818 57.1
SRR24402885 1795 1756 38 1 0.1
The PERC sample has 26.6% of reads with a length change at the cut site. Electroporation hit 57.1%. The failed sample: 0.1%. That number tells you more than it seems to. If the well had simply held too few cells, the little DNA it did have should still have come from electroporated cells, and you'd expect editing somewhere in the range of donor 1's 57.1%. Instead, 1,756 of 1,795 anchored reads are exact wild type. Whatever DNA amplified was unedited: the electroporation may have failed, the edited cells may have died before harvest, or the well may have been mixed up. Whichever it was, the right move is to exclude this sample and repeat it, not to report it as 0.1% editing.
Now the control. It has 2.0% of reads with a length change at the cut site, and they're the same specific indels the edited samples carry. That's not what sequencing error looks like. Sequencing errors on Illumina are mostly substitutions, and they're scattered along the read. You can see that background in the same_length_diff column: 2,328 reads in the control with a same-length change, and 1,061 and 1,652 in the two edited samples. That number doesn't care whether Cas9 was there, which is how you know it's noise.
A Cas9-specific +1 A insertion in a sample that, according to the paper, received no RNP is a different kind of signal. I can't tell from the data alone where it came from, but the usual suspects are:
- Cross-contamination during PCR setup. A splash of an edited sample's genomic DNA or PCR product in the control well is enough. Amplicons are present at enormous copy numbers, so the smallest aerosol carries thousands of molecules.
- Index misassignment on the sequencer. When many libraries are pooled on one run, a small fraction of reads get assigned to the wrong sample's barcode. How often depends on the instrument and the library prep, but it's never zero.
- Polymerase slippage. The cut site sits in a
GAAGAAGAArepeat, and repeats are where PCR polymerases are most likely to add or drop a base. This could explain some of the +1 and −1 reads, but not a 21-bp deletion.
The failed sample offers one clue. It went through the same primers and the same repeat, yet only 1 of its 1,795 anchored reads has a length change at all. If slippage were producing the control's background, I'd expect to see some of it there too. That's a single low-depth sample, so it's a hint rather than proof, but it argues against slippage as the main source and makes contamination or misassignment the likelier explanation.
None of this means the study's conclusions are wrong. A 2% background against 27% and 57% editing doesn't change the story. But it changes what you can claim at the low end. If the control shows 2%, you can't call a 2% signal in a treated sample editing. In the CRISPResso2 post I said I start worrying when a mock control shows more than 0.5% indels in the quantification window. My 33-bp window isn't the same thing, but it's roughly comparable, and by that rule this control would make me go back and look at plate layout and PCR setup before I trusted any low-level result, like an off-target site.
This is why the untreated control is non-negotiable, as I argued in the amplicon design post. Without it, you'd have no way to know that "2% edited" is the floor of this experiment, not a result.
A pre-analysis checklist
Here's what I check on every amplicon run before I let any quantification tool near it. Every row takes a minute or less with the commands above.
| Check | Command | Healthy (this run) | Worry when |
|---|---|---|---|
| Reads per sample | seqkit stats | ~100,000 pairs | One sample is far below the rest |
| Q30 on read 1 / read 2 | seqkit stats -a | ~78% / ~61% | Read 1 looks as bad as a typical read 2 |
| Quality over the cut site | FastQC per-base quality | Above Q30 at bases ~95–120 | The cut site falls where quality drops |
| Insert size | Adapter position or fastp JSON | One sharp peak at 213 bp | A second big peak far from your amplicon size |
| Primer dimers | Adapter position at ~40 bp | About 2% of reads | Tens of percent of reads |
| Merge rate | fastp log | ~97% | Low for an amplicon shorter than the read pair |
| Indels in the untreated control | Cut-site window | 2.0% here, worth investigating | Anything you'd want to call real in a sample |
Limitations: what this kind of checking can't tell you
I want to be clear about what we did and didn't do, because it's easy to walk away from a post like this with a number in your head that shouldn't be there.
- The window counting is a sanity check, not a quantification. I matched exact sequences between two anchors. That's transparent and easy to reason about, but it's crude. A sequencing error inside either anchor loses the read. A substitution next to a deletion counts as just a deletion. And any deletion bigger than the 33-bp window, or one that eats an anchor, simply vanishes from the count. Properly quantifying editing needs an aligner built for it, which is what CRISPResso2 does. Treat the 26.6% and 57.1% here as "yes, editing clearly happened, roughly this much", not as values to report.
- Large deletions are invisible here, and in amplicon sequencing generally. If Cas9 caused a multi-kilobase deletion that removed a primer site, that allele never amplifies and never shows up in any file. That's a limitation of the amplicon approach itself, not of the checks.
- I couldn't compare against the paper's own numbers. The authors quantified editing with a different tool (Cortado), and their per-sample EMX1 values are only shown graphically in a supplementary figure. So I've deliberately not claimed my crude percentages match theirs.
- I can't prove where the control's background came from. The failed sample hints that polymerase slippage isn't the main source, but it's one low-depth sample, and the sequencing data alone can't separate contamination from index misassignment. Answering that would take the plate layout, the other samples on the same run, or a repeat experiment.
- One locus, one library type, one instrument. This is a non-directional library on a MiSeq with 2×301 bp reads and a 213-bp amplicon. If your amplicon is longer than about 570 bp (2 × 301 bases minus fastp's default 30-base minimum overlap), your reads won't overlap and fastp won't merge them. If your core uses a directional protocol, every read 1 will start with the same primer. The ideas carry over, but the specific numbers won't.
- FastQC verdicts aren't a pass/fail for amplicon data. I've told you which red crosses to ignore, but do look at the plots behind them occasionally. A weird spike in "overrepresented sequences" is sometimes a contaminant, not just your amplicon.
What I do with my own runs
Honestly, the order matters more than the tools. Here's my routine whenever an amplicon run comes back:
- Look at file sizes before anything else. A sample that's ten times smaller than its neighbors has already told you something.
- Run
seqkit stats -aon everything. Thirty seconds, and it catches low read counts and bad quality at once. - Run fastp with merging and look at the insert-size plot for every sample, not just the peak. Primer dimers and failed libraries are obvious there and invisible in a single summary number.
- Eyeball the cut site. Pull the window around the cut from a couple of samples, edited and control, and look at the top ten sequences. If you can't see your edit by eye in a sample that supposedly has 40% editing, something's wrong with either the sample or your reference.
- Read the untreated control like it's the most important sample on the plate, because it is. Its background sets the detection limit for everything else.
- Only then run a quantification tool, and check that its numbers roughly agree with what you saw by eye.
If a sample fails at step 2 or 3, I don't try to rescue it computationally. I go back to the freezer, re-extract or re-amplify, and add it to the next run. Sequencing a sample again is cheaper than spending a week explaining a number that was never real.
Once your files pass these checks, you're ready for the next step: quantifying editing properly with CRISPResso2, using the same EMX1 guide.
What's the strangest thing you've found hiding in your own FASTQ files? Drop a comment below.
Resources
| Tool / Paper / Data | What it is | Link |
|---|---|---|
| Foss et al. (2023) | Nature Biomedical Engineering paper on peptide-mediated (PERC) Cas9 RNP delivery to T cells, the source of the dataset | doi:10.1038/s41551-023-01032-2 |
| BioProject PRJNA923785 | The paper's amplicon sequencing runs in the NCBI Sequence Read Archive | ncbi.nlm.nih.gov/bioproject/PRJNA923785 |
| European Nucleotide Archive | Mirror of SRA with direct .fastq.gz downloads | ebi.ac.uk/ena |
| FastQC | Free per-file quality report for sequencing data (Babraham Bioinformatics) | bioinformatics.babraham.ac.uk/projects/fastqc |
| fastp (Chen et al., 2018) | Free and open-source FASTQ trimming, filtering and paired-end merging | doi:10.1093/bioinformatics/bty560 · GitHub |
| SeqKit (Shen et al., 2016) | Free and open-source toolkit for FASTA/FASTQ statistics and manipulation | doi:10.1371/journal.pone.0163962 · Docs |
| Cortado | The amplicon editing analysis tool used in the source paper | github.com/staciawyman/cortado |
| Ran et al. (2013) | Nature Protocols genome engineering protocol for SpCas9 in human cells | doi:10.1038/nprot.2013.143 |
| Amplicon NGS design (Post 13) | How to design the sequencing strategy this post assumes | /blog/amplicon-ngs-crispr-sequencing-strategy |
| Measuring editing efficiency (Post 15) | Wet-lab protocol from cell harvest to clean amplicon | /blog/measuring-crispr-editing-efficiency-complete-protocol |
| CRISPResso2 tutorial (Post 17) | The next step: proper quantification of editing from these reads | /blog/crisprresso2-tutorial-ngs-analysis-crispr |
Keep reading
Measuring CRISPR editing efficiency from start to finish: a complete protocol overview
Your T7E1 gel says 37% editing, your Sanger trace in ICE says 58%, and your single-cell clone looks completely unedited on the gel even though the protein is gone. Here is the end-to-end bench and analysis protocol for measuring CRISPR efficiency across knockouts, base edits, prime edits, and HDR knock-ins without getting fooled by your assay.
CRISPResso2: the standard tool for CRISPR NGS analysis (full tutorial)
Your amplicon FASTQ files are back from the sequencer, and the default CRISPResso2 numbers are already lying to you about your HDR and base editing rates. Here is how to run CRISPResso2 properly from raw paired-end reads to publication-ready allele tables.
Detecting off-targets in the lab: GUIDE-seq, CIRCLE-seq, and Digenome-seq compared
An overview and comparison of laboratory methods for finding CRISPR off-target editing. We compare GUIDE-seq, CIRCLE-seq, Digenome-seq, and DISCOVER-seq to help you choose the right validation tool.