Skip to content
Tech Interview Prep
Technical interview guide

Bioinformatics Pipelines & Reproducibility

How multi-tool genomics analyses are made repeatable and portable: workflow managers, containerization, and the reproducibility practices the field has had to learn the hard way.

Minutes to read
4
Practice MCQs
25
Interview Q&A
25
Edition
v4
Editorial status
Reviewed

Scope: Nextflow 25.x; Snakemake 9.26; CWL 1.2.1; WDL 1.2; OCI image specification; current nf-core, RO-Crate 1.1, FAIR and GA4GH WES guidance reviewed 2026-09-04.

Overview

Curated: · Written: · Reviewed:

Bioinformatics Pipelines & Reproducibility

In one line

A reproducible pipeline is a dependency graph of tools with typed inputs and outputs, immutable references, pinned environments and per-attempt provenance, so an authorized operator can reproduce or explain every published result. Reach for it whenever a result must be rerun, audited or moved to another site.

Key definitions

  • Output contract: the format, schema, nonempty rule, sample and reference identity, checksum and domain QC a file must pass before it is published.
  • Cache key: every semantic input (command, code, parameters, environment, input content, execution context). Filenames and timestamps are not keys.
  • Immutable reference: a versioned, checksummed FASTA, index, annotation or model. "latest" or "GRCh38" alone does not identify one.
  • Scatter-gather: fan-out over shards with unique keys, then a gather step that checks the expected shard set is complete before publishing.
  • Provenance record: one row per task attempt linking output digest, input digests, config hash, workflow revision, image digest and executor.
  • Resource declaration: a scheduling hypothesis fitted from measured peak usage, not a guess.

Formulas and complexity

A pilot fit from 40 samples (2 to 25 GB inputs) is a starting point, not a guarantee. Size the request from the fit plus headroom, then check the measured peak on production samples:

RSSpeak≈3 GB+1.2 x,x=input size in GB\mathrm{RSS}_{peak} \approx 3\,\mathrm{GB} + 1.2\,x, \quad x = \text{input size in GB}

For a 25 GB input the fit predicts about 33 GB. An 8 GB request for that input is the kind of mismatch that produces exit 137 on most tasks.

How it works

The engine resolves the graph from declared inputs, so ordering follows data dependencies, not filenames or completion timing. A cache hit is accepted only when the full key matches. A miss runs the task in task-local temporary space. The output contract is checked, and only then is the file published atomically. A failed contract is classified and its logs and work directory are kept. Every attempt writes a provenance row, whether it executed or came from cache.

no yes yes no Validated sample sheet and params Cache hit on full key? Run task in temp space Provenance row: cached Output contract passes? Atomic publish Classified failure, logs kept Provenance row: executed

When to use and when not to

SituationManaged workflowAd hoc script
Result will be rerun, audited or sharedYes: manifest, pinned inputs, contractsNot sufficient
Many samples on HPC or cloudYes: scatter-gather, retries, resumeManual fan-out, no resume safety
One-off exploration on a laptopOverhead may exceed valueAcceptable if outputs are not reported
Output feeds a clinical or regulated reportYes, plus protected-data validationNot acceptable
Caching across reference or config changesOnly with content-based keysFilename caching silently reuses stale results

Traps interviewers probe

  1. Treating file existence or size as success. A 12 MB Parquet file that parses cleanly can still hold a fraction of the usual rows. Fix: check row counts and size against recent runs and fail the task when the output falls outside the contract.
  2. Caching on filename or modification time. Restoring an archived file with tar -x can keep an old mtime, so make-style checks skip the rebuild. Fix: key the cache on input content hashes plus the full command and image digest.
  3. Non-idempotent writes on retry. A retried task that appends rows duplicates data, and a timed-out attempt can leave a partial file. Fix: write to staging, publish atomically, and deduplicate or upsert on a natural key such as shard ID.
  4. Pinning a mutable tag. A tag like 2.7.1 can be re-pushed, so the same manifest pulls different bytes. Fix: pin the image digest and record the imageID the pod actually ran.
  5. Recording a seed and assuming reproducibility. The seed does not fix GPU model, library build or reduction order. Fix: pin the environment and target hardware, then measure residual variance across repeated runs.

Interview tips

Open with the invariant: every published artifact resolves to immutable inputs and a pinned environment, and the graph, config and contracts can be replayed from the run manifest.

Expect these follow-ups: how the cache invalidates when a reference changes; how you retry without duplicating output; how you prove a resume re-executed the tasks it should have; how a missing shard is detected; how you handle a reference patch or decoy change; how you keep sample identifiers out of public logs.

30-second outline: "Each task declares its inputs and an output contract. Inputs and references are checksummed and pinned by digest. The cache key covers content, command and environment. Outputs are staged, validated and published atomically. Every attempt writes provenance to a run manifest, so a resume can show what re-ran and why. Failures are classified, and only transient ones are retried, with limits."

Feedback on this overview

Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.