Building a Data Provenance Policy for Your Lab: A Template

By Dr. Zubair Khalid, DVM, MS, PhD ·

Building a Data Provenance Policy for Your Lab: A Template

By the end of this article you will be able to write, adopt, and verify a data provenance policy for your bioinformatics lab. You will have a copy-ready policy template covering data capture, checksums, versioning, pipeline provenance, and long-term preservation, plus a worked implementation using Git, Data Version Control (DVC), standard checksum utilities, and Workflow Run RO-Crate conventions. Everything here is designed for a small to mid-sized academic or core-facility lab running genomics workloads, and every policy section maps to a concrete artifact you can actually produce.

What you need on hand before you start:

  • A POSIX-style environment (Linux or macOS) with Git installed, plus md5sum or sha256sum
  • Python 3.9 or later if you want to generate RO-Crate bundles programmatically
  • R 4.x with Bioconductor if you run RNA-seq quantification workflows
  • Roughly one hour to draft the policy and one lab meeting to ratify it

Why Your Lab Needs a Written Provenance Policy

Provenance is the recorded history of where a piece of data came from, what was done to it, and by whom. In bioinformatics, a sample's provenance chain runs from the sequencer output file, through the reference genome and annotation you aligned it against, through every preprocessing and analysis step, to the figure in your manuscript. A policy turns that chain from tribal knowledge into a documented, checkable standard.

The case for writing it down is empirical. A comprehensive survey of the German neuroscience community conducted for the National Research Data Infrastructure initiative found that researchers perceive barriers to research data management that fall into five groups: lack of data and metadata standards, lack of community-adopted provenance tracking methods, lack of secure and privacy-preserving infrastructure for sensitive data, lack of research data management literacy, and lack of time and personnel. The same survey found that 91 percent of respondents were willing to share data with other researchers and wanted to build their data management skills [1]. The gap is not motivation. The gap is that individual goodwill cannot compensate for the absence of a lab-level policy, and provenance tracking is one of the areas where that absence bites hardest.

A policy also protects the lab institutionally. Long-term preservation work argues that data stewards should be engaged early in the data life cycle, ideally at the onset of a research program, so that data collection strategies align with institutional policies and with the repositories that will eventually hold the data [2]. If your policy assigns a steward role from day one, you avoid the classic failure mode where the only person who understands a five-year-old dataset has left the lab.

Finally, provenance is increasingly a governance requirement rather than a courtesy. In clinicogenomics, digital tools that preserve privacy and document provenance are identified as promising instruments for patient-centered data governance, and policy updates to clinical data governance practices are explicitly called for in the precision medicine literature [3]. A lab that can demonstrate provenance is a lab that can participate in controlled-access data consortia.

Core Concepts and Vocabulary

Define these terms in your policy itself. Every new lab member should be able to read the policy and understand it without asking.

Data provenance. The documented lineage of a dataset: its origin, transformations, parameters, software versions, and the people and instruments involved.

W3C PROV. A World Wide Web Consortium recommendation for representing provenance as entities, activities, and agents. Workflow Run RO-Crate, discussed below, aligns with this model [4].

RO-Crate. Research Object Crate, a packaging format that bundles data files with their metadata in a machine-readable JSON-LD document. Workflow Run RO-Crate extends RO-Crate and Schema.org to capture provenance of workflow executions at different levels of granularity, bundling inputs, outputs, and code together. It is implemented by several workflow management systems, which allows interoperable comparisons of workflow runs across heterogeneous systems [4].

OAIS. The Open Archival Information System reference model, which describes long-term digital preservation as six functional entities: Ingest, Access, Data Management, Archival Storage, Administration, and Preservation Planning. Preservation-focused guidance for biomedical data recommends building on this model and on early steward involvement [2].

Checksum. A fixed-length cryptographic fingerprint of a file, computed with an algorithm such as MD5 or SHA-256. Two files with the same SHA-256 hash are, for practical purposes, identical. Checksums let you verify that a FASTQ file on your cluster is bit-for-bit the file the core facility delivered, and they let tools recognize a reference transcriptome automatically [5].

DVC. Data Version Control, an open-source tool that brings Git-style versioning to large data files. Treating data as version-controlled software is the design principle behind BioBricks.ai, a registry that packages public life sciences datasets as modular DVC Git repositories, each containing an extract-transform-load pipeline and managed through a package-manager-like interface [6].

FAIR. Findable, Accessible, Interoperable, Reusable. A set of principles for research data management that versioned, provenance-aware data registries are designed to advance [6].

What Goes in a Data Provenance Policy: The Template

The following template is the core of this article. It is written in plain policy language so you can paste it into a lab handbook and fill in the bracketed placeholders. This is the format that answers the search for a practical data provenance policy template for bioinformatics: eleven numbered sections, each with a rule, a rationale, and a required artifact.

DATA PROVENANCE POLICY - {{LAB_NAME}}
Version: {{1.0}}   Effective: {{DATE}}   Owner: {{PI_NAME}}
Review cadence: annually, or upon change of major infrastructure

1. PURPOSE AND SCOPE
   This policy governs provenance recording for all data generated,
   received, or processed by {{LAB_NAME}}, including raw instrument
   output, derived analysis results, reference data, and metadata.
   It applies to all lab members, contractors, and visiting
   researchers.

2. ROLES AND RESPONSIBILITIES
   2.1 The Data Steward ({{NAME}}) owns this policy, approves
       exceptions in writing, and engages repositories and curators
       at project start to develop data sustainability plans.
   2.2 Every project has a Project Data Lead who enforces capture
       requirements for that project.
   2.3 Every lab member who touches data is responsible for
       recording provenance at the moment of action, not after.

3. DATA CLASSES AND SENSITIVITY TIERS
   Class A: Public, non-identifiable data (reference genomes,
            public datasets). Full versioning required.
   Class B: Internal research data (non-human, de-identified).
            Versioning plus access log required.
   Class C: Controlled or regulated human data. Versioning, access
            log, encryption at rest, and separation of identifiers
            from assay data required. De-identified clinical data
            stored on approved systems only.
   The steward records the class of each new dataset in the project
   registry within {{5}} business days of acquisition.

4. CAPTURE AT ACQUISITION
   4.1 Raw data are write-once. No lab member modifies, renames,
       or deletes raw instrument output.
   4.2 Every raw file receives a SHA-256 checksum computed on the
       receiving system within {{24}} hours of transfer.
   4.3 Every dataset receives a metadata record containing, at
       minimum: sample identifier, source tissue or organism,
       instrument or platform, capture date, operator, protocol or
       kit version, and the checksum of the raw file.
   4.4 Human-derived data are de-identified before they enter
       analysis storage. The key linking identifiers to sample IDs
       is stored separately from assay data, with access limited to
       {{NAMED_ROLES}}.

5. STORAGE, NAMING, AND DIRECTORY CONVENTIONS
   5.1 Directory layout follows the pattern
       /projects/{{PROJECT_ID}}/{raw,metadata,refs,workflow,results}
   5.2 File names contain no spaces, no date ambiguity (ISO 8601
       dates only, YYYY-MM-DD), and no operator initials.
   5.3 Raw data live in {{STORAGE_SYSTEM}} with {{RETENTION_PERIOD}}
       retention; derived data may be regenerated and are kept on
       faster storage.
   5.4 For projects involving public dataset integration, the lab
       prefers versioned, pipeline-packaged sources over ad hoc
       downloads where such sources exist.

6. VERSIONING
   6.1 All code lives in Git. The main branch always runs.
   6.2 All datasets above {{SIZE_THRESHOLD}} live under DVC or an
       equivalent versioned data registry. The DVC metadata (the
       .dvc files and dvc.yaml) is committed to Git.
   6.3 Every result directory contains a pointer to the exact
       Git commit, DVC version, and container digest used to
       produce it (see Section 7).
   6.4 Reference genomes, annotations, and databases are treated
       as versioned assets. Each reference copy is recorded with
       its source URL, release version, download date, and SHA-256
       checksum.

7. PIPELINE PROVENANCE
   7.1 Analyses run through the lab workflow engine
       ({{NEXTFLOW_OR_SNAKEMAKE}}). Ad hoc one-off scripts may be
       used for exploration but never for published results.
   7.2 The workflow engine's provenance output (trace and report
       files, or RO-Crate where supported) is archived with the
       results for every run that produces a reportable figure or
       table.
   7.3 Containers are pinned by digest, not by tag. The digest is
       recorded in the run's provenance bundle.
   7.4 Reference integrity in quantification workflows is verified
       by checksum, and the checksum travels with the output.

8. LONG-TERM PRESERVATION AND ARCHIVAL
   8.1 At project close, the Project Data Lead packages the
       project for archival: raw data, metadata records, provenance
       bundles, and the final code commit.
   8.2 The package is ingested into {{ARCHIVE_SYSTEM}} following the
       OAIS functional model: Ingest, Data Management, Archival
       Storage, Access, Administration, and Preservation Planning.
   8.3 Preservation Planning reviews formats annually and migrates
       at-risk formats.
   8.4 Deposits into public repositories are made at
       {{REPOSITORIES}}, with accessions recorded in the project
       registry.

9. SHARING AND RELEASE
   9.1 Data are shared with the minimum class consistent with the
       request. Class C data require steward approval and a
       data-use agreement where applicable.
   9.2 Shared datasets carry their metadata records and checksums.
       A dataset shared without provenance is not considered
       released.

10. COMPLIANCE AND AUDIT
   10.1 The steward audits {{NUMBER}} projects per quarter against
        Sections 4 through 8 using the checklist in Appendix A.
   10.2 Failures are logged and remediated within {{30}} days.
        Repeat failures trigger policy review.

11. GLOSSARY
    Provenance, checksum, OAIS, RO-Crate, DVC, FAIR, raw data,
    derived data, reference asset, metadata record. Definitions
    follow those given in this policy's training material.

A few of those sections deserve unpacking, because they are where labs make avoidable mistakes.

Section 4, capture at acquisition, is the one you cannot retrofit

A FASTQ delivery is hashed on arrival, compared with the manifest, then either registered with metadata or sent back for redelivery.

Raw data that arrives without a checksum and without metadata is provenance you have already lost. The fix costs minutes on the day of arrival. The preservation literature makes the same point at the institutional level: placing equal importance on early activities such as data collection and ingest, rather than treating preservation as an end-of-project afterthought, is what makes long-term preservation work [2].

Section 6 and 7, versioning and pipeline provenance, are the technical core

Versioned data registries treat datasets like software packages. BioBricks.ai demonstrates the pattern at community scale by packaging public biological and chemical datasets as DVC repositories, each carrying an ETL pipeline, with more than 90 curated datasets across genomics, proteomics, cheminformatics, and epidemiology in its current release [6]. Your lab policy applies the same pattern locally: data files are versioned, code is versioned, and the two are linked.

Section 3, sensitivity tiers, keeps you out of regulatory trouble

Large controlled-access resources such as The Cancer Genome Atlas, which at over 1.2 petabytes spans whole genome sequence, methylation, RNA expression, proteomic, and clinical data, are distributed under security and regulatory controls designed to conform to federal best practices [7]. Your lab will not handle petabytes, but the control logic scales down: know your data classes, keep identifiers separate, and document access.

A Worked Example: Implementing the Policy with Real Tools

This walkthrough implements Sections 4 through 7 of the template for a single RNA-seq project. Follow it in order on a test directory before applying it to production data.

Step 1: Create the project skeleton

mkdir -p /projects/rnaseq_demo/{raw,metadata,refs,workflow,results}
cd /projects/rnaseq_demo
git init
dvc init
git add .gitignore .dvc .dvc/config
git commit -m "Initialize project with Git and DVC"

Expected output:

Initialized empty Git repository in /projects/rnaseq_demo/.git/
Initialized DVC repository.

The dvc init command also appends rules to .gitignore so that large data files are not committed to Git directly. That split is the entire point of the versioning design: Git tracks small, meaningful metadata, DVC tracks the data.

Step 2: Register raw data with checksums (policy Section 4)

Assume the core facility delivered three FASTQ files. Compute checksums on the receiving system immediately.

cp /scratch/delivery/*fastq.gz raw/
sha256sum raw/*.fastq.gz | tee metadata/raw_checksums.sha256

Expected output:

c22b3f60d3a1e4f9e0a2b8c7d6e5f4a3...  raw/sample_A_R1.fastq.gz
9f1e2d3c4b5a69788796655443322110...  raw/sample_A_R2.fastq.gz
00abc123def4567890abcdef12345678...  raw/sample_B_R1.fastq.gz

Verify the checksums match the delivery manifest from the core facility:

sha256sum -c metadata/raw_checksums.sha256

Expected output is one OK per file. If a line reports FAILED, the file changed in transit or at rest, and you request a redelivery before doing any analysis. Never compute checksums for the first time after an analysis has already run against the file, because at that point you are documenting the file you have, not the file you received.

Step 3: Create the metadata record (policy Section 4.3)

Write metadata/sample_metadata.tsv with a header row and one row per sample:

sample_id	raw_file	organism	tissue	instrument	protocol_date	operator	checksum_ref
sample_A	sample_A_R1.fastq.gz	Mus musculus	cortex	Illumina NovaSeq	2025-03-14	J. Rivera	c22b3f60d3a1e4f9...
sample_B	sample_B_R1.fastq.gz	Mus musculus	cortex	Illumina NovaSeq	2025-03-14	J. Rivera	00abc123def45678...

Commit the metadata and checksums to Git, and register the raw data with DVC:

git add metadata/
dvc add raw
git add raw.dvc .gitignore dvc.yaml 2>/dev/null
git commit -m "Register raw FASTQs and metadata with checksums"

Expected output from dvc add raw:

100% Add|raw|████████████████████████████████████████|3 files added
To track the changes with git, run:

	git add raw.dvc .gitignore

Step 4: Register the reference genome as a versioned asset (policy Section 6.4)

# Download the reference and record its identity
wget -q -O refs/genome.fa.gz {{REFERENCE_URL}}
sha256sum refs/genome.fa.gz | tee metadata/ref_checksums.sha256

Append the provenance line to metadata/refs.tsv:

asset	version	source_url	download_date	checksum
genome.fa	GRCm39	{{REFERENCE_URL}}	2025-03-15	c22b3f...

The rule is simple: any reference asset that is not in refs.tsv with a checksum does not exist for publication purposes. Reference confusion is one of the most damaging silent failures in genomics, and the solution pioneered in the RNA-seq world is to make the reference travel with the data by checksum. The tximeta package demonstrates this directly: it identifies the correct reference transcriptome automatically via a hashed checksum stored in the quantification output, then retrieves and caches the matching transcript database, which prevents the class of mistakes where shared quantification files arrive with missing or incorrect annotation metadata [5].

Step 5: Define the pipeline under DVC (policy Sections 6 and 7)

dvc stage add -n trim \
  -d raw/sample_A_R1.fastq.gz -d raw/sample_A_R2.fastq.gz \
  -o results/trimmed/sample_A_R1.trimmed.fastq.gz \
  -o results/trimmed/sample_A_R2.trimmed.fastq.gz \
  "cutadapt -a {{ADAPTER}} -q 20 -m 35 \
   -o results/trimmed/sample_A_R1.trimmed.fastq.gz \
   -p results/trimmed/sample_A_R2.trimmed.fastq.gz \
   raw/sample_A_R1.fastq.gz raw/sample_A_R2.fastq.gz"

Repeat for alignment and quantification stages, or write the stages directly in dvc.yaml. Then execute the whole chain with:

dvc repro

Expected output:

Running stage 'trim':
> cutadapt -a ...
Locked.
Updating lock file 'dvc.lock'

Reproduced 2 stages in 00:12:34.

The dvc.lock file is your parameter and dependency ledger. It records the checksums of every dependency and output at the time of execution. Commit it:

git add dvc.yaml dvc.lock
git commit -m "Pipeline run: trim and align, parameters locked"
git rev-parse HEAD | tee results/HEAD_commit.txt

That last command writes the exact commit hash into the results directory, satisfying policy Section 6.3. Anyone who receives the results can run git checkout <hash> and dvc checkout to reconstruct the entire input state.

Step 6: Archive workflow-run provenance (policy Section 7.2)

For analyses run under a workflow engine, capture the engine's provenance output. For Nextflow:

nextflow run main.nf -with-trace results/pipeline_trace.tsv -with-report results/pipeline_report.html

For runs that need to be shareable and interoperable across workflow systems, use the Workflow Run RO-Crate pattern. The RO-Crate community maintains tooling to build crates, and the specification is implemented by several workflow management systems, so a crate produced by one system can be compared with a run from another [4]. A minimal check that a crate contains what policy Section 7.2 requires:

python -c "import rocrate; print(rocrate.__version__)"

Your archival package for the run then contains the crate JSON-LD document, the inputs and outputs it references, the pinned container digests, and the Git commit hash from Step 5.

Step 7: Verify checksum-linked annotation in R (policy Section 7.4)

library(tximeta)
library(SummarizedExperiment)

files <- file.path("results/quant", c("sample_A", "sample_B"),
                   "quant.sf")
coldata <- data.frame(files = files,
                      names = c("sample_A", "sample_B"))
se <- tximeta(coldata)

Expected behavior: tximeta reads the checksum embedded in the quantification output, matches it against its local cache of known transcriptomes, and reports the matching reference, after which the returned SummarizedExperiment carries correct transcript annotation without any manual specification from you [5]. If the checksum matches nothing, tximeta asks you to point at the correct transcriptome, and you record that decision in refs.tsv. The silent alternative, proceeding with the wrong annotation, is precisely the failure mode checksum-based identification exists to prevent [5].

Step 8: Package for archival (policy Section 8)

tar -czf rnaseq_demo_provenance_package.tar.gz \
  metadata/ refs.tsv dvc.lock dvc.yaml results/HEAD_commit.txt \
  results/pipeline_trace.tsv raw_checksums.sha256
sha256sum rnaseq_demo_provenance_package.tar.gz \
  >> metadata/archive_checksums.sha256

The package, plus the raw data, goes to your archival storage system. The OAIS model gives you the functional checklist for what that system must do: Ingest to accept the package, Archival Storage to hold it, Data Management to catalog it, Access to serve it, Administration to govern it, and Preservation Planning to keep the formats readable as software and media change [2].

A Reference Table of Provenance Layers

Provenance layerWhat it answersPrimary tool or formatRequired artifact
File integrityIs this the exact file we received?sha256sum, md5sumChecksum manifest in metadata/
Sample metadataWhat biological material is this?TSV or YAML metadata recordsample_metadata.tsv
Data versioningWhich version of the data produced this?DVC, versioned registries [6]dvc.lock, .dvc files in Git
Code versioningWhich code version produced this?GitCommit hash recorded with results
Pipeline runWhat commands, parameters, containers ran?Workflow engine plus Workflow Run RO-Crate [4]Trace file or provenance crate
Reference identityWhich genome or transcriptome was used?Checksum-based identification, as in tximeta [5]refs.tsv with SHA-256 values
Long-term preservationCan someone open this in ten years?OAIS functional model [2]Archival package with checksums

How to Check That the Policy Actually Works

A policy you cannot audit is a wish. Run this five-point verification on one completed project per quarter.

  1. Checksum spot check. Pick three raw files at random. Run sha256sum -c against the delivery manifest. All must report OK.
  2. Reconstruction test. From the archived dvc.lock and the recorded Git commit, have a lab member who did not work on the project run git checkout, dvc checkout, and dvc repro, dry-run and confirm the dependency graph resolves. This is the cheapest possible reproducibility drill.
  3. Metadata completeness. Confirm every row in sample_metadata.tsv has all columns from policy Section 4.3 filled. A blank cell is a finding.
  4. Reference audit. Confirm every reference used in the project appears in refs.tsv with a checksum, and that any quantification output carries its embedded checksum as validated in Step 7 [5].
  5. Provenance bundle completeness. Open one archived run's RO-Crate or trace file and confirm it names the inputs, outputs, software, and parameters. The Workflow Run RO-Crate specification bundles these objects together precisely so that this audit is possible across systems [4].

Log results in the compliance register described in policy Section 10. Two consecutive quarters of failures on the same section means the section is wrong, not the people, and you revise the policy.

Common Mistakes and Limitations

Decision path asking whether checksums and metadata exist, then DVC versioning, then workflow provenance, before archival packaging.

Writing the policy before naming a steward. The single most common failure. Preservation guidance is explicit that early steward involvement, starting at the onset of a research program, contributes significantly to long-term data preservation [2]. A policy without an owner is a document without an enforcer.

Computing checksums after the fact. A checksum proves identity only from the moment it is computed. If you hash a file six months after delivery, you cannot detect corruption that occurred in the interim. Capture at acquisition, per Section 4.2, is not bureaucratic ritual.

Pinning containers by tag instead of digest. The tag latest is a moving target. Digest pinning costs nothing at write time and saves a reconstruction project later.

Treating the reference genome as free infrastructure. The wrong transcriptome silently changes gene-level results. Checksum-based reference identification exists because this mistake is common enough, and costly enough, to warrant an automated defense [5].

Storing identifier keys alongside assay data. If your de-identification key lives in the same directory tree as the data it de-identifies, your Class C tier is theater. Separate storage, separate access control, documented in Section 3.

Overengineering at launch. A lab that tries to implement all eleven sections with full RO-Crate packaging on day one will abandon the effort by the second project. Adopt in order: checksums and metadata first, then DVC versioning, then workflow provenance, then archival packaging.

Assuming goodwill replaces infrastructure. The community survey data show that willingness to share and to learn is high, while the barriers are structural: standards, provenance methods, secure infrastructure, literacy, and resources [1]. Budget for the structural parts. An hour of steward time per project is the resource cost, and it is the cheapest line item in your grant.

A limitation to state plainly. This template encodes best practice from the preservation, versioning, and provenance literature, not a regulatory certification. Labs handling human clinical genomics additionally need their institution's compliance office to review Sections 3, 4.4, and 9 against applicable federal and state requirements before adoption.

Frequently Asked Questions

What is a data provenance policy in bioinformatics?

It is a written lab standard that defines how every dataset records its origin, transformations, software versions, parameters, and custodians. It converts reproducibility from an individual habit into an auditable lab process.

What should a data provenance policy template include?

The eleven sections in this article: purpose and scope, roles, data classes, capture at acquisition, storage conventions, versioning, pipeline provenance, archival, sharing, audit, and a glossary. Each section pairs a rule with a required artifact so compliance is checkable rather than aspirational.

Is there a free data provenance policy template for bioinformatics I can adapt?

Yes, the template block in this article is free to copy and adapt under the bracketed-placeholder format, and the tools it references, including Git, DVC, checksum utilities, and RO-Crate tooling, are open source with no license cost.

How do checksums help with provenance?

A SHA-256 checksum is a fingerprint that proves a file is unchanged from a known point in time. Checksums catch transfer corruption, enable automated reference identification in workflows such as tximeta, and let a reconstruction test confirm that today's files match the ones an analysis actually consumed.

What is Workflow Run RO-Crate?

It is a community specification, built on RO-Crate and Schema.org and aligned with W3C PROV, that packages a workflow execution together with its inputs, outputs, code, and parameters. Because several workflow management systems implement it, runs from different systems can be compared and archived in a common format.

How large does genomics data storage need to be?

It depends entirely on your assays, but plan for raw data to dominate. As a scale reference, The Cancer Genome Atlas resource is over 1.2 petabytes across whole genome sequence, exome, methylation, expression, proteomic, and clinical data. Most single-lab projects sit orders of magnitude below that, which is why the policy distinguishes write-once raw storage from regenerable derived data.

Who should own the data provenance policy?

A named data steward, not the principal investigator by default. The steward owns the document, grants exceptions in writing, engages repositories at project start, and runs the quarterly audit. The PI ratifies the policy and funds the steward's time.

How does provenance relate to publishing and data sharing?

Journals, repositories, and consortia increasingly require that shared data carry metadata and accessions, and provenance records are what make a deposited dataset reusable rather than merely accessible. A dataset released without its provenance is not, under this template's Section 9.2, considered released.

Sources

  1. Research Data Management and Data Sharing for Reproducible Research-Results of a Community Survey of the German National Research Data Infrastructure Initiative Neuroscience.
  2. Long-term preservation of biomedical research data.
  3. Health equity innovation in precision medicine: data stewardship and agency to expand representation in clinicogenomics.
  4. Recording provenance of workflow runs with RO-Crate.
  5. Tximeta: Reference sequence checksums for provenance identification in RNA-seq.
  6. BioBricks.ai: a versioned data registry for life sciences data assets.
  7. TCGA Expedition: A Data Acquisition and Management System for TCGA Data.