Running LENS using RAFT
Local
Try the demo first if you have not already: Quick start runs LENS end to end on one patient and confirms your install works.
Once your environment is ready and your manifest is prepared, launch LENS with:
raft run --project-id my-project \
--workflow lens \
--version 1.9.3 \
--manifest my_manifest.tsv
LENS supports mouse samples with an additional requirement: class I MHC
alleles must be supplied in the manifest’s Alleles column (e.g.
H-2-Kb,H-2-Db), since LENS does not type them from mouse sequencing data.
See Manifest specifications for the full format.
Run with --species mouse:
raft run --project-id my-project \
--workflow lens \
--version 1.9.3 \
--manifest my_manifest.tsv \
--species mouse
To rerun or resume an existing project, pass only its project identifier:
raft run --project-id my-project
Do not repeat setup-only flags such as --workflow, --version,
--manifest, or --setup-only when running an existing project. RAFT
treats those as project-creation options and refuses to mix them with an
existing project run.
For where results land and how to review them, see Accessing and reviewing outputs.
Hybrid
In hybrid mode you install and run RAFT on your local machine but offload
pipeline execution and data storage to cloud infrastructure. Use --bucket
when you want everything RAFT touches, references, indexes, project data, and
outputs, in one bucket. For a cleaner separation, partition the data across
--project-bucket, --references-bucket, --fastqs-bucket, and
--metadata-bucket instead, which lets a LENS reference cache be shared and
reused across projects rather than re-uploaded per run.
RAFT supports both s3:// (AWS) and gs:// (GCP) bucket URLs.
Prerequisites
RAFT installed locally (see Installing RAFT)
A Nextflow profile configured for your cloud executor in
~/.nextflow/config(see the Nextflow documentation for AWS Batch configuration)Docker or Singularity/Apptainer available on the compute nodes
- For AWS:
an AWS account with a configured S3 bucket(s)
the
awsCLI installed and authenticated (included as part of RAFT)
- For GCP:
one or more GCS bucket(s) you control
Google Application Default Credentials (ADC) configured locally
Note
RAFT uses the Python Google Cloud Storage client for many gs:// checks
and uploads, but some bucket-backed operations still call gsutil for
object reads, copies, and local syncs. Install the Google Cloud SDK (or
another package that provides gsutil) and create ADC credentials with:
$ gcloud auth application-default login
Running LENS from a single bucket
When you pass --bucket <bucket-url> to raft run, RAFT replaces local
directory paths with cloud bucket URLs in the Nextflow command. Input data
(FASTQs, references, metadata) is uploaded before the run starts, pipeline
execution happens on cloud compute through your Nextflow profile, and outputs
are written straight back to the bucket.
raft run --project-id my-project-lens \
--workflow lens \
--version 1.9.3 \
--manifest my_manifest.tsv \
--bucket gs://<your_bucket> \
--profile <your_cloud_profile>
Running LENS across multiple buckets
Use the split bucket-routing options when you do not want one bucket to own every part of the run: to keep a reusable LENS reference cache central while project work and outputs live elsewhere, to reuse FASTQs already staged in another bucket, or to separate buckets by permissions, ownership, or cost.
--project-bucketfor project, work, FASTQ, and metadata paths--references-bucketfor the LENS reference set--fastqs-bucketfor discovering already-staged FASTQs--metadata-bucketfor discovering already-staged metadata
--bucket cannot be combined with --project-bucket or
--references-bucket. --fastqs-bucket and --metadata-bucket are
discovery helpers and need at least one other bucket-routing flag.
raft run --project-id my-project-lens \
--workflow lens \
--version 1.9.3 \
--manifest my_manifest.tsv \
--project-bucket gs://<your_project_bucket> \
--references-bucket gs://<your_reference_bucket> \
--profile <your_cloud_profile>
LENS’s reference set is large, so staging it once is worth doing before the first hybrid run:
raft stage-refs \
--workflow lens \
--version 1.9.3 \
--references-bucket gs://<your_reference_bucket>
That uploads the workflow-declared LENS reference and index outputs under
references/, plus RAFT’s local shared directory under shared/.
Input FASTQs stage the same way. raft stage-fastqs uploads the FASTQs named
by a manifest and needs no project or workflow:
raft stage-fastqs \
--manifest my_manifest.tsv \
--fastqs-bucket gs://<your_fastq_bucket>
RAFT looks for those FASTQs in --fastq-dir when given, and otherwise beside
the manifest and then in the configured RAFT FASTQ directory. Add --sub-dir
to keep several cohorts in one cache, and --dry-run to see what would be
staged without transferring anything. Files already in the destination are
skipped, so re-running after adding samples only uploads the new ones.
Pass that same URL to the run as --fastqs-bucket so RAFT reuses the staged
FASTQs instead of uploading them again.
Note
Google Cloud Storage bucket names cannot contain underscores. Use hyphens instead when creating buckets for LENS or RAFT cloud runs.
Cloud (EXPERIMENTAL)
To run LENS entirely in the cloud, without installing RAFT yourself, use the RAFT Cloud Launcher. You set up the project in the browser and submit it to GCP Batch in your own cloud account.
You will need a GCP project and GCS bucket you control, a RAFT runner image accessible to Batch, and IAM permissions to upload objects and submit Batch jobs. See Running RAFT on the cloud for the runner container and the full launcher walkthrough.
Running LENS using workflow profiles
LENS can be run with a pre-defined configuration if desired. This means all references, tools, and tool configuration will be set to default values.
Available profiles can be listed using:
raft available-workflow-profiles --workflow lens --version 1.9.3
Workflow profiles can be applied to a project using the --workflow-profile
parameter, for example:
raft run --project-id my-project \
--workflow lens \
--version 1.9.3 \
--manifest my_manifest.tsv \
--workflow-profile standard
Available profiles
Profile |
What it does |
|---|---|
|
The default. Optimised for throughput: alignment deduplicates in a single step, and base quality score recalibration, duplicate marking, and indel realignment are not run. |
|
A more conservative configuration for when call quality matters more
than runtime. It marks duplicates ( |
Apply one with --workflow-profile:
raft run --project-id my-project \
--workflow lens \
--version 1.9.3 \
--manifest my_manifest.tsv \
--workflow-profile stringent
Note
More profiles will be added over time. If you have assembled a configuration that works well for a particular study design, sample type, or institutional standard, we would welcome it as a contribution. Get in touch through the contact details on the documentation home page and we can look at bundling it as a named profile.
To run LENS with specific references, tools, or tool parameters, use the web-based Config Generator.
Running LENS using the Config Generator
When you start a new project without a workflow profile, RAFT opens a web-based configuration tool that lets you select tools, set parameters, and modify references, all without editing configuration files directly.
This step assumes you have already completed Preparing your samples.
RAFT will run the Config Generator when --workflow-profile is not specified
by the user:
raft run --project-id my-project \
--workflow lens \
--version 1.9.3 \
--manifest my_manifest.tsv
After loading or saving your manifest, RAFT opens the Config Generator.
Note
If you are working over SSH, RAFT will print a http://localhost:<port>
address rather than opening a browser. See accessing RAFT’s web tools over SSH for how
to forward the port, or use --workflow-profile to skip the Config
Generator entirely.
The Config Generator walks you through:
Workflow selection — choose LENS, species (human or mouse), and workflow version.
Runtime limits — set max CPUs and memory (only used when a default Nextflow profile is not available).
Tool selection — expand sections to pick tools for each step (e.g.,
fastportrimmomaticfor trimming,mutect2orstrelka2for variant calling).Parameters — edit tool-specific parameters.
References — modify reference file paths if needed.
Methods description — an auto-generated methods section based on your selections, ready to copy into manuscripts.
Each tool carries a version dropdown and a free-text parameters field, so you can pin a container version or pass tool-specific flags without editing configuration files. Unchecked tools are available alternatives; checking one adds it to the run.
After configuration, click Save to RAFT to save and launch the workflow, or Copy to CLI to get the command for terminal use.
Note
You still need to download alternative reference files yourself and make
them available in /path/to/raft/references before running them with
LENS.
For removing intermediate files, reclaiming disk from earlier runs, and inspecting a project after it finishes, see Maintaining LENS projects.