2  Designing an experiment you can analyse

The design of an experiment covers its replicates, sequencing depth, read length, controls and batches. Many data analysis problems start even before the lab work is done. If an experiment has too few replicates, no control, or a hidden batch effect, no software can fix it later. This chapter explains the design choices that decide what your analysis can show.

NoteIn this chapter you will learn
  • why biological replicates matter, and what two replicates per condition can miss;
  • how many reads each assay needs, and when paired-end reads help;
  • which controls to prepare, and how to keep batches apart from conditions;
  • when you need to plan a spike-in;
  • which design checks EpiNexus runs before a run starts.

2.1 The question

Can my experiment answer my question? To compare two conditions, you need to know how much samples differ by chance. Only then can you say that a difference between conditions is real. This needs replicates, enough reads, the right controls, and a design that keeps the conditions apart from technical effects.

2.2 Replicates

A biological replicate is an independent sample: a different animal, a different patient, or cells grown and treated separately. A technical replicate is the same sample measured twice. Only biological replicates tell you how much samples vary in nature.

ENCODE asks for “two or more biological replicates” for every ChIP-seq experiment (ENCODE Project Consortium 2026b). However, two is the minimum, not the ideal. With two replicates per group, the analysis has very little information about the natural variation. Three findings show what this means:

  • Most real differences are missed. A large RNA-seq study had 42 good replicates per group. With only three of them, nine of eleven methods found just 20–40 % of the differences that all 42 replicates showed. The authors recommend “at least six replicates per condition for all experiments” (Schurch et al. 2016). This study used RNA-seq, not chromatin data. However, the statistics of differential analysis are the same.
  • Some methods fail to control false results. In a simulation with two samples per group, csaw was “the only method to yield an observed FDR that is lower than this threshold” among the methods tested (Lun and Smyth 2016). (FDR stands for false discovery rate.) The other methods reported more false differences than they claimed.
  • Permutation tests have little to work with. dmrseq, a method for DNA methylation, builds its null distribution by swapping sample labels between groups (Korthauer et al. 2019). With two samples per group, the dmrseq software can make only two such swaps. A region must therefore stand out strongly to be called. Chapter 19 shows how the swaps work on a real dataset.
TipBest practice

Use at least two biological replicates per condition, as ENCODE requires (ENCODE Project Consortium 2026b). Use three or more when you want to find modest differences.

2.3 Depth and read length

Sequencing depth is the number of reads in a library. Table 2.1 summarises how many reads each assay needs, and Chapter 6 explains where these numbers come from.

Table 2.1: Sequencing depth per replicate. A usable fragment is one DNA molecule with good mapping quality that is not a duplicate; with paired-end reads, a pair counts once (Chapter 6).
Assay Usable fragments per replicate Source
ChIP-seq, narrow histone mark 20 million ENCODE Project Consortium (2026b)
ChIP-seq, broad histone mark 45 million ENCODE Project Consortium (2026b)
ChIP-seq, transcription factor 20 million; at least 10 million ENCODE Data Coordination Center (2026); Landt et al. (2012)
ATAC-seq 25 million (25 million single-end or 50 million paired-end reads) ENCODE Project Consortium (2026a)
CUT&Tag about 3 million paired-end reads Kaya-Okur et al. (2019)
CUT&RUN about one tenth of ChIP-seq; 3 to 5 million fragments Skene and Henikoff (2017); Meers et al. (2019)

ENCODE asks for reads of at least 50 bp, “though longer read lengths are encouraged” (ENCODE Project Consortium 2026b). Longer reads can be aligned with confidence to more places in the genome than shorter reads.

Single-end or paired-end? With paired-end reads, both ends of each DNA fragment are read, and you therefore know the exact length of each fragment. This matters for ATAC-seq, where fragment sizes show nucleosomes, and for CUT&Tag and CUT&RUN, where fragments are counted directly. In addition, some tools need paired-end reads, for example the peak caller GoPeaks (Chapter 7). For histone ChIP-seq, however, single-end reads work well.

WarningPitfall: mixing single-end and paired-end libraries

If some libraries are single-end and others paired-end, the two kinds are processed in slightly different ways. This difference can look like a biological effect. Sequence all libraries of one experiment the same way.

2.4 Controls

A control shows the signal that an assay gives without the real target. For ChIP-seq, prepare an input for every ChIP sample, or at least for every condition. ENCODE asks for an input “with matching run type, read length, and replicate structure” (ENCODE Project Consortium 2026b). For CUT&RUN and CUT&Tag, an IgG control is useful, but its library is often small. Chapter 1 explains what each control does.

2.5 Batches

A batch effect is a technical difference between groups of samples. For example, samples may have been processed on different days, with different reagent lots, or by different people. Leek and colleagues define batch effects as differences “unrelated to the biological or scientific variables in a study” (Leek et al. 2010).

Batch effects are dangerous when they coincide with the conditions. Suppose all control samples were processed on Monday and all treated samples on Tuesday. You then cannot tell whether a difference comes from the treatment or from the day. Leek and colleagues give two rules (Leek et al. 2010):

  1. Spread the conditions across the batches. Each batch should contain samples from every condition.
  2. Write down the batch of each sample: the date, the person, the reagent lot.

If each batch contains one sample of each condition, the analysis can remove the batch effect. Such a design is called a paired design. For example, you might process one control and one knockout mouse from the same litter on the same day.

NoteIn EpiNexus 1.4

In the run wizard, on the Parameters step, tick Samples with the same replicate number were processed together (paired design). EpiNexus then models the replicate number as a batch. Use this option only when the pairing is real. With two replicates per condition, the paired model leaves very little information to estimate the variation.

2.6 When you need a spike-in

A spike-in is a fixed amount of chromatin or DNA from another species, added to every sample. It is needed when a treatment changes a mark across the whole genome.

Standard normalisation assumes that most regions do not change between conditions. This is usually true. However, some treatments change a mark everywhere. For example, a drug that blocks the enzyme that writes H3K27me3 lowers H3K27me3 across the whole genome. Standard normalisation then hides most of the change (Orlando et al. 2014; Chen et al. 2016).

If you expect such a global change, add a spike-in to every sample. Plan it before the experiment, because you cannot add it later. Chapter 10 explains how spike-ins are used in the analysis.

2.7 Checking your design in EpiNexus

EpiNexus checks the design before a run starts. The checks appear on the Review step of the run wizard. Errors stop the run. Notes are warnings: the run can start, but you should read them.

Table 2.2: Design checks on the Review step of EpiNexus 1.4 (a selection).
Check Type Example message (shortened)
A comparison names a condition that no sample has Error “…no H3K27ac sample has that condition”
Batch is the same as condition Error “…batch cannot be modelled”
The spike-in is the same species Error “…a spike-in must be another species”
The genome is not installed Error “The reference genome … isn’t installed yet”
GoPeaks with single-end reads Error “GoPeaks needs paired-end reads”
Analysis Only with FASTQ files Error “Analysis Only starts from BAM files uploaded with their peak files, but FASTQ files are selected”
Preprocessing Only without FASTQ files Error “Preprocessing Only trims and aligns FASTQ files, and none are selected”
No biological replicates Note “…differential results are exploratory”
Only one condition for a mark Note “…no differential analysis will run for this mark”
ChIP-seq without input Note “…peaks will be called without a control”
A sample has no control with its own replicate number Note “…is also the control for …, which has no control with the same replicate number”
A sample’s condition has no control Note “…(another condition) is the control for …, which has no control in the same condition”
No control can be chosen for a sample Note “No control could be chosen for: …”
Single-end and paired-end mixed Note —
The archive lists a different assay Note —

2.8 Example: GSE155100

The ChIP-seq example in this book (Chapter 6, Chapter 16) has this design (Boogerd et al. 2023):

  • two conditions: control and Arid1a knockout in heart muscle cells;
  • two biological replicates per condition;
  • one input per ChIP sample, with the same condition and replicate;
  • single-end reads of 75 bp;
  • 15–17.5 million reads per H3K27ac library.

This design meets ENCODE’s minimum for replicates and controls. Its weak points are the small number of replicates and a depth below the 20 million usable reads that ENCODE asks for. Both limit how many differences we can find. However, they do not make the differences that we find wrong.

2.9 Pitfalls

WarningPitfall: one control sample for everything

A single input pooled from all conditions cannot show differences in background between conditions. Prepare at least one input per condition, and ideally one per ChIP sample.

WarningPitfall: technical replicates counted as biological

Sequencing the same library twice gives more reads, not more replicates. Merge such files into one sample.

WarningPitfall: too many conditions, too few samples

Comparing six conditions with two replicates each means fifteen comparisons, each based on very little data. Decide before the experiment which comparisons answer your question.

Key points

  • Only biological replicates show how much samples vary in nature; sequencing a library twice gives more reads, not more replicates.
  • Two biological replicates per condition are ENCODE’s minimum, not the ideal; use three or more to find modest differences.
  • The depth that an experiment needs depends on the assay and the mark, from about 3 million paired-end reads for CUT&Tag to 45 million usable fragments for a broad histone mark.
  • Sequence all libraries of one experiment the same way, either single-end or paired-end.
  • Spread the conditions across the batches, and write down the batch of each sample.
  • Plan a spike-in before the experiment when you expect a mark to change across the whole genome.

2.10 Further reading

  • Leek et al. (2010): batch effects and how to design around them.
  • Schurch et al. (2016): how many replicates RNA-seq needs. The same logic applies to chromatin.
  • ENCODE Project Consortium (2026b): ENCODE’s requirements for replicates, depth, read length and controls.
  • Chen et al. (2016): when spike-ins are needed.