Reproducibility and archiving

RAFT is built so that an analysis can be defended, repeated, and handed to someone else. This page describes what a project records as you work, how to package one up for transfer or archiving, and what to keep when the analysis is finished.

What a project records as you go

How the project was built

RAFT records the commands that shape a project in .raft/auto.raft, in order:

raft run-demo -p my-project -w lens -v 1.9.0
raft load-metadata -p my-project -f my_manifest.tsv
raft load-reference -p my-project -f my_reference.fa
raft add-step -p my-project -m lenstools -s lenstools_score

Entries are written as commands succeed, so the file reflects what actually happened rather than what was intended. It is the fastest way to answer “how was this project built?” months later.

What is recorded:

  • the command that created the project, whether raft init-project, raft run, or raft run-demo

  • commands that change the project afterwards, such as raft load-metadata, raft load-reference, raft load-module, raft add-step, and raft update-parameters

What is not:

  • read-only commands such as raft project-status and raft check-manifest, which would add noise without adding history

  • repeated runs. Only the invocation that created the project is recorded. Running raft run -p my-project again, including with different --nf-params, does not add an entry.

Repeated runs are covered separately, by the run changelog below.

What changed between runs

Each time a project runs, RAFT compares the inputs that affect results against the previous run and appends any differences to .raft/run_changelog:

2026-08-07 15:33:24  raft run -p my-project
  initial run

2026-08-07 15:40:22  raft run -p my-project --profile my_cluster
  changed  param params.dna_aligner: 'bwa' -> 'bwa_mem2'
  changed  container samtools_container: quay.io/samtools:1.20 -> quay.io/samtools:1.21
  changed  metadata my_manifest.tsv (contents differ)

RAFT tracks three kinds of change:

params

params.* assignments in workflow/main.nf

container

container images declared by label across the project’s workflow and module configs

metadata

the contents of files under inputs/metadata, so an edited manifest is visible even when its name does not change

A run that changes none of these is not recorded, so the changelog stays a record of decisions rather than a log of every invocation. Re-running an unchanged project adds nothing.

Note

The changelog records what changed, not why. When a change is deliberate, the reason belongs in your own notes or commit message; the changelog tells a later reader that something moved and exactly what.

The RAFT version

Every project records the RAFT that created it, in .raft/raft_version:

$ cat projects/my-project/.raft/raft_version
RAFT v1.5.0 (commit fe1a130)

The format matches raft --version, so it can be pasted into a methods section as-is. It is written once, at project creation, and is not updated if the project is later run with a different RAFT version.

The commit is available however RAFT was installed. Running from a checkout, RAFT asks git directly. A release installed from PyPI or conda has no repository to ask, so the commit it was built from is recorded into the package at build time and reported from there.

What RAFT will not do is report the commit of whatever repository you happen to be standing in when you run it. A plausible but wrong commit recorded as provenance is worse than none, so where no commit can be established honestly, RAFT says so:

$ cat projects/my-project/.raft/raft_version
RAFT v1.5.0 (commit unknown)

In practice that means a distribution built outside a checkout, without the environment variables below. The version number remains a reproducible identifier on its own.

To set the commit explicitly, use RAFT_COMMIT (GIT_COMMIT and COMMIT_SHA are also honored, which covers most CI environments). These take precedence over everything else, at build time and at run time alike:

$ cd /path/to/raft
$ export RAFT_COMMIT=$(git rev-parse --short HEAD)

Every project created after that records the commit you exported.

Workflow and parameters

The project’s workflow/ directory holds the workflow as it ran: main.nf with the parameter values used, nextflow.config, and the module code cloned into workflow/modules/. Because modules are cloned at a specific branch, the project carries the module code that produced its results rather than a pointer to whatever that module looks like today.

Tool versions

The project’s workflow/nextflow.config pins the container image for every process, one withLabel block per tool:

withLabel: 'samtools_container' {
  container = 'quay.io/biocontainers/samtools:1.21--h96c455f_1'
}

This is the file raft update-parameters rewrites when you apply a configuration from the Config Generator, so it reflects the images the project will actually run with. Those pinned images are the authoritative record of which tool versions ran, and are what a methods section should cite. See Citing RAFT.

Reference integrity

References are shared across projects rather than copied into each one, so RAFT verifies them rather than assuming they are intact:

  • Downloads are checked against the size the server reports, and staged under a temporary name so an interrupted transfer cannot be mistaken for a complete file.

  • Checksums are recorded in references/.checksums on first successful download, so later runs can detect a file that has changed underneath them.

See Shared installations for how this behaves when several people share one reference set.

Run records

After a run, outputs/reports/ holds the Nextflow trace, and logs/ holds the Nextflow log. The trace records every task, its status, and its resource use. raft project-status summarizes both. See Project status.

Packaging and transferring a project

Package a project

raft package-project produces a .rftpkg file, a tar archive intended to move a project between machines or to archive it:

$ raft package-project --project-id my-project

By default RAFT writes projects/my-project/rftpkgs/default.rftpkg. Choose a package name with --output:

$ raft package-project \
    --project-id my-project \
    --output my-project-2026-04-14

That writes my-project-2026-04-14.rftpkg under the project’s rftpkgs/ directory. Two options change what goes in: --no-git leaves Git metadata out of the packaged workflow module directories, and --no-checksums skips checksum generation.

What a package contains

A package captures outputs/, inputs/, references/, and workflow/, along with:

snapshot.raft

the command history for the project

raft_version and run_changelog

so a received project reports the RAFT that built it and what changed along the way, rather than the RAFT that unpacked it

checksums

checksums across the captured directories

The Nextflow work/ directory is deliberately not included. It is scratch, it is often larger than everything else combined, and its absolute paths are meaningless on another machine. Outputs are what a package preserves.

See RAFT project packages for the package format.

Load a packaged project

raft load-project builds a project from an existing .rftpkg:

$ raft load-project \
    --project-id restored-project \
    --rftpkg /path/to/default.rftpkg

RAFT initializes a new project directory, extracts the package into the project’s internal .raft/ area, restores the packaged inputs/ and workflow/ directories, and rewrites the project identifiers stored inside them.

You can also load from a Git repository that stores project packages:

$ raft load-project \
    --project-id restored-project \
    --repo-url https://example.org/group/project-packages.git \
    --branch main

Push a package to a repository

raft push-project pushes an existing package into a project package repository:

$ raft push-project \
    --project-id my-project \
    --rftpkg default

Warning

This command exists in RAFT but is less polished than the standard off-the-shelf run path. Validate repository configuration and package contents before relying on it for production transfer.

What to keep

When an analysis is finished, the durable artifacts are:

Keep

Why

outputs/

The results themselves.

.raft/auto.raft

How the project was built.

.raft/raft_version

Which RAFT version built it.

.raft/run_changelog

What changed between runs.

workflow/

The workflow, parameters, and module code that ran.

outputs/reports/ and logs/

Evidence of what executed, and of any retries or failures.

The manifest

Which samples were analyzed and how they were grouped.

A .rftpkg

All of the above in one file.

work/ can be deleted once outputs are collected. It is the largest thing on disk and holds nothing that is not reproducible from the above, though deleting it does give up the ability to resume that project. See Storage requirements.

Reclaiming space

Two commands reduce what a project costs on disk:

  • raft run --delete-intermediates sets the workflow’s clean_intermediates parameter, so intermediate files are cleared as the run proceeds. This applies to the run it is given to.

  • raft clean --project-id <id> removes work directories left by earlier failed or superseded runs, which the option above never reaches. It reports by default and only deletes with --execute. See Reclaim space from old runs.

What to report in a publication

To let a reader evaluate or repeat the analysis:

  • the RAFT version, from raft --version

  • the workflow name and version, for example lens 1.9.0

  • the species and reference set

  • the tool versions, taken from the pinned container images

  • the manifest, or a description of the samples and their grouping

Citing RAFT covers how to cite RAFT, the workflow, and the underlying tools.

Limits worth knowing

RAFT records a great deal, but it does not make an analysis reproducible on its own:

  • Reference downloads are not versioned by RAFT. They come from external sources that can change or disappear. Record which reference set you used, and keep it if the analysis matters.

  • A package is only as complete as the project. If inputs were symlinked from outside the project and those files later move, a loaded package will not find them.

  • Scratch is not archival. A work directory on scratch may be purged, which also means a run cannot be resumed after the purge window.

  • Commands are recorded, not the environment. .raft/auto.raft does not capture your Nextflow profile, scheduler, or the machine. Record those separately if they affected the result.

  • Repeated runs are not recorded. .raft/auto.raft captures only the command that created the project. Differences between runs are recorded separately, in .raft/run_changelog.

See also