Maintaining LENS projects

A finished LENS project keeps far more on disk than its results. This page covers what can be removed, what to keep, and the commands for inspecting a project after a run.

Deleting intermediate files

Large intermediate files such as trimmed FASTQs and BAMs are kept by default. On larger projects these dominate the storage footprint, so you can ask RAFT to delete them once the processes that consume them have completed:

raft run --project-id my-project-lens \
          --workflow lens \
          --version 1.9.3 \
          --manifest my_manifest.tsv \
          --delete-intermediates

--delete-intermediates sets the workflow’s clean_intermediates parameter, which is false unless you pass the flag.

This cleanup does not disrupt Nextflow caching. RAFT is designed so these files can be removed without breaking resume behavior for standard reruns. For background, see Tricking Nextflow’s caching system.

However, deleting intermediates does limit workflow modifications. If you plan to change workflow structure, tool choices, or parameters in a way that would require those intermediate outputs to be present, omit the flag so they are retained.

Reclaiming space from old runs

--delete-intermediates only reaches the run it is given to. A project also accumulates Nextflow work directories from earlier runs that failed or were superseded, and nothing removes those automatically. On a cohort of LENS projects they are usually the largest thing on disk.

raft project-status is the safe first command for any existing project. It is read-only, and reports the detected workflow, the manifest in use, the latest trace status, and where outputs and reports live:

raft project-status --project-id my-project-lens

raft clean reclaims the space, removing only work directories that no completed run still needs. It reports by default and deletes only with --execute:

raft clean --project-id my-project-lens
raft clean --project-id my-project-lens --execute

See Managing RAFT projects for the rest, including renaming a project and reusing parameters across projects.

Note

Before deleting anything, it is worth knowing what RAFT already keeps. Every project records the commands that built it in .raft/auto.raft, what changed between runs in .raft/run_changelog, and the RAFT version that created it in .raft/raft_version. The container images pinned in workflow/nextflow.config are the authoritative record of which tool versions produced a LENS report, and are what a methods section should cite.

raft package-project collects those alongside outputs/, inputs/, references/, and workflow/ into a single .rftpkg archive for transfer or long-term archiving. The Nextflow work/ directory is deliberately left out, which is why it is the safe thing to delete here.

Reproducibility and archiving covers all of this, including what to keep once an analysis is finished and what to report in a publication.