Why Reproducibility Matters
The problem
Section titled “The problem”A colleague asks you to rerun an analysis from six months ago. You open your project folder. The scripts are there. The data is there. You run the pipeline and get different results.
This is not a rare scenario. A 2016 survey in Nature found that over 70% of researchers had failed to reproduce another scientist’s experiments. Computational work should be easier to reproduce than wet lab experiments. There are no pipetting errors or batch effects from reagent lots. Yet computational results are just as fragile.
Why bioinformatics analyses break
Section titled “Why bioinformatics analyses break”Several factors make bioinformatics results hard to reproduce.
Software versions change behavior
Section titled “Software versions change behavior”STAR 2.7.9a and STAR 2.7.11b can produce different alignment counts for the same FASTQ file. DESeq2 1.38 and DESeq2 1.42 may report different p-values for the same count matrix. These are not bugs. Algorithms improve, defaults change, and edge cases get handled differently between versions.
If you do not record which version you used, you cannot reproduce your results. If a collaborator installs a newer version, they will get different numbers.
Reference genomes and annotations evolve
Section titled “Reference genomes and annotations evolve”GENCODE releases a new human gene annotation roughly every six months. Each release adds genes, changes transcript boundaries, and reclassifies biotypes. An RNA-seq analysis run against GENCODE v38 and GENCODE v44 will produce different count matrices, even with identical software and FASTQ files.
The same applies to genome assemblies. GRCh38 patch releases add alternate loci and fix sequence errors. Variant calling results depend on which patch you used.
Undocumented manual steps
Section titled “Undocumented manual steps”Many analyses include steps that never make it into a script. Filtering a sample list in Excel. Renaming files by hand. Adjusting a threshold after looking at a plot. These decisions are invisible to anyone trying to reproduce the work, including your future self.
Environment drift
Section titled “Environment drift”Your laptop today is not your laptop six months from now. Operating system updates, library upgrades, and Python version changes can all alter results. A script that worked in January may fail in July because a dependency updated its API.
The three pillars of reproducibility
Section titled “The three pillars of reproducibility”Three tools address these failure modes. Each solves a different part of the problem.
1. Version control tracks your decisions
Section titled “1. Version control tracks your decisions”Git records every change you make to your code. It captures what changed, when it changed, and why. If you modified a filtering threshold, the commit history shows the old value and the new value. If a collaborator asks why you removed a sample, the answer is in the log.
Version control does not just protect against mistakes. It documents the reasoning behind your analysis. This site has a full section on Git if you are new to it.
2. Containers preserve an installed environment
Section titled “2. Containers preserve an installed environment”An image contains the installed software and libraries. Running the same image preserves those versions on compatible hosts, but it does not fix input data, runtime parameters, hardware differences, or random choices in the analysis.
Record the final image digest with the results. A version tag can move, and a Dockerfile that installs from live repositories can produce different packages on a later build. The container build guide explains the distinction between an image, a version tag, and a digest.
3. Workflow managers automate your pipeline
Section titled “3. Workflow managers automate your pipeline”A workflow manager connects your analysis steps into a directed graph. Each step declares its inputs, outputs, and the command to run. The workflow manager handles execution order, parallelism, error recovery, and logging.
A workflow definition records the order and dependencies between analysis steps. It removes the need to remember which script to run next. A successful rerun still depends on available inputs, compatible software, permissions, and enough compute resources.
Workflow managers for bioinformatics
Section titled “Workflow managers for bioinformatics”Several workflow managers are used in bioinformatics. The two most popular are Nextflow and Snakemake.
Nextflow
Section titled “Nextflow”Nextflow uses a Groovy-based DSL to define workflows. It has native support for Docker, Singularity, and cloud platforms like AWS Batch. The nf-core community maintains over 100 production-ready pipelines for common bioinformatics tasks.
Nextflow is the dominant choice in genomics core facilities and large sequencing centers. If you work with nf-core pipelines, you are using Nextflow.
This site covers Nextflow in detail in the Nextflow & nf-core subsection.
Snakemake
Section titled “Snakemake”Snakemake uses Python syntax to define workflows. It determines what to run based on file targets, similar to GNU Make. It integrates tightly with Conda for environment management and supports Singularity containers.
Snakemake is popular in academic research labs, especially those with existing Python expertise. It has a lower barrier to entry if you already know Python.
This site covers Snakemake on the Snakemake page.
Other workflow managers
Section titled “Other workflow managers”CWL and WDL are also used in bioinformatics. CWL is a standard backed by the Global Alliance for Genomics and Health. WDL is developed by the Broad Institute and powers the Terra/Cromwell platform. Both are less common in day-to-day academic research than Nextflow or Snakemake.
Comparison
Section titled “Comparison”| Feature | Nextflow | Snakemake | CWL | WDL |
|---|---|---|---|---|
| Language | Groovy DSL | Python-based | YAML/JSON | Custom DSL |
| Container support | Docker, Singularity, Podman | Singularity, Docker | Docker, Singularity | Docker |
| Cloud support | AWS, Google, Azure | Google, AWS, Azure | Platform-dependent | Terra/Cromwell |
| Community pipelines | nf-core (100+) | Snakemake Catalog | Few | WARP (Broad) |
| Conda integration | Via profiles | Native | Limited | No |
| Resume/caching | Built-in | Built-in | Implementation-dependent | Via Cromwell |
| Learning curve | Moderate (Groovy) | Low (Python) | High (verbose YAML) | Moderate |
How containers and workflow managers work together
Section titled “How containers and workflow managers work together”Containers supply an installed software environment, and workflow managers execute the declared steps. Both still depend on the record of the analysis. Keep the pipeline revision, resolved configuration, sample manifest, reference versions, input checksums, image digests, and relevant random seeds with the results.
Nextflow and Snakemake can execute steps in containers when the selected configuration enables the engine. The host still needs that engine and the workflow runtime. Check the software versions and execution reports from the actual run rather than assuming that a container declaration records every dependency.
A reproducible project looks like this
Section titled “A reproducible project looks like this”A well-structured bioinformatics project combines all three pillars:
my-rnaseq-project/├── workflow/ # Nextflow or Snakemake pipeline│ ├── main.nf # Pipeline definition│ └── nextflow.config├── containers/ # Dockerfiles for custom tools│ └── Dockerfile├── data/ # Raw data or download scripts│ └── samplesheet.csv├── results/ # Pipeline output (gitignored)├── docs/ # Analysis notes and decisions└── .git/ # Version control historyKeep download instructions and checksums with the sample manifest, and retain the reference files or a stable source for them. Record the run command and environment alongside the pipeline revision. Test a rerun from a fresh project copy and compare its declared outputs before you describe the analysis as reproduced.
Next steps
Section titled “Next steps”The following pages cover each workflow manager in detail. Start with What is Nextflow if you work with nf-core pipelines, or jump to Snakemake if you prefer a Python-based approach.
Preserve spatial source identities
Section titled “Preserve spatial source identities”The Spatial dataset lesson preserves hashes for archived counts, coordinates, and tissue images. It distinguishes archived Space Ranger outputs from fresh downstream calculations.
Further reading
Section titled “Further reading”Sandve and colleagues, 2013, describe records for reproducible computational research, including software versions, parameters, inputs, and random seeds. Use their recommendations to check what a project must preserve beyond its scripts.
The Nextflow cache and resume guide gives a concrete example of these dependencies. It explains why a workflow manager needs both its cache and task files to reuse earlier work.