Managing RAFT projects

Most users interact with RAFT projects through raft run and raft generate-reports. The commands below are useful once you have several projects, need to move a project between environments, or need to preserve a project snapshot.

Generated project README

RAFT writes a README.md into each created project directory. It records the project id, detected workflow context, manifest path, creation command, common follow-up commands, and important output/log paths.

Open this file when returning to an older project or when sharing a project directory with another user.

Check project status

Use raft project-status to inspect a project without changing it:

$ raft project-status --project-id my-project

It summarizes the detected workflow, the manifest referenced by workflow/main.nf, manifest sample counts, latest trace status, output directories, and workflow-specific checks when available.

For more detail, see Project status.

Packaging a project, loading one elsewhere, and pushing a package to a repository are covered in Reproducibility and archiving.

Rename a project

raft rename-project renames a project and updates the internal files that refer to its id:

$ raft rename-project \
    --project-id old-project-id \
    --new-id new-project-id

RAFT rewrites the project id in:

  • workflow/mounts.config

  • workflow/nextflow.config

  • .raft/auto.raft

Then it moves the project directory to the new id.

Warning

Rename support is limited to the files RAFT explicitly rewrites. If you manually added project-id references elsewhere, review the project after renaming.

Reuse parameters across projects

raft copy-parameters copies workflow parameters into a project, either from another project or from a configuration file:

$ raft copy-parameters \
    --dest-project my-project \
    --source-project other-project
$ raft copy-parameters \
    --dest-project my-project \
    --source-config my-config.config

raft update-parameters applies a configuration file to an existing project, updating both parameters and container declarations. Use it after generating a config with the Config Generator:

$ raft update-parameters \
    --dest-project my-project \
    --source-config my-config.config

Both commands rewrite the project in place, so the change persists across later reruns of that project.

Reclaim space from old runs

A project keeps a Nextflow work directory for every task it has ever run, including tasks from runs that failed or were superseded. They are usually the largest thing in a project, and nothing removes them automatically.

raft clean removes only the work directories that no completed run still needs, so the most recent work stays resumable:

$ raft clean --project-id my-project

That reports what it would remove and how much space that would free, without deleting anything. Add --execute when the list looks right:

$ raft clean --project-id my-project --execute

To be more aggressive, keep only the work from the latest successful run:

$ raft clean --project-id my-project --keep-latest --execute

Note

This is different from raft run --delete-intermediates, which clears intermediate files during the run it is given to. raft clean reclaims space between runs, from attempts that are already finished.

Warning

Removing work directories that a run still needs means those tasks are recomputed on the next -resume. Nothing in outputs/ is affected.