Preparing your samples
LENS requires a manifest that defines the relationships among your samples, patients, and datasets. The manifest tells RAFT which samples belong together and what sequencing data each sample contains.
The organizational hierarchy follows:
Sample ⊂ Group ⊂ Patient ⊂ Dataset
In other words,
Samples belong to Groups
Groups belong to Patients
Patients belong to Datasets
Note
Groups are only required if a patient has multiple time-points or multiple sampled regions.
Samples, groups, patients, and datasets are defined within the manifest using:
Hierarchy term |
Manifest column |
|---|---|
sample |
|
dataset |
|
group |
|
patient |
|
Note
A LENS manifest requires at least one tumor DNA sample, one normal DNA sample, and one tumor RNA sample per patient. A reduced analysis (without SNV or InDel pMHCs) can be run with only tumor RNA.
Creating a manifest using the Manifest Generator
The easiest way to create a manifest is through the RAFT Manifest Generator — a browser-based form with autocomplete, real-time validation, and workflow-aware requirements.
Important
Running on a cluster or any machine you reach over SSH? RAFT starts each
web interface as a small server bound to localhost on the machine that
runs raft, then tries to open a browser there. On a remote host there is
no browser to open, so RAFT detects this and prints the address instead:
============================================================
RAFT Manifest Generator
============================================================
No browser detected. Please open the following URL manually:
http://localhost:8765
That address is local to the remote machine, so pasting it into a browser on your laptop will not reach it. Forward the port first. In a second terminal on your own computer, using the port RAFT printed:
ssh -L 8765:localhost:8765 you@your-cluster.edu
Leave that session open and visit http://localhost:8765 in your local
browser. RAFT chooses the port at startup, so use whichever one it prints
rather than the example above.
If you cannot forward ports at all, skip the browser tools entirely: build
the manifest with raft manifest-template (below) and run with
--workflow-profile so the Config Generator is not required.
Important
The RAFT web interfaces — the Manifest Generator, the Config Generator, and
the Output Viewer — load their runtime libraries from public CDNs
(unpkg.com, cdnjs.cloudflare.com, and cdn.tailwindcss.com) each
time they open. They will not render on a machine without outbound internet
access, or behind a proxy that blocks those hosts.
If you cannot reach them, build your manifest from the command line instead (see below) and run with a workflow profile so the Config Generator is not required.
Launch it by starting a new project without a --manifest argument:
raft run --project-id my-project-lens --workflow lens --version 1.9-dev
The Manifest Generator opens in your browser. From there you can:
Select a workflow — choose “LENS (Tumor Antigens)” from the dropdown.
Add samples — fill in Dataset, Patient Name, Sample Type, Run Name, and File Prefix for each sample.
Review — the Sample Overview section organizes samples by patient and group, with color-coded type badges.
Save — click “Save to RAFT” to save the manifest to your project.
The Sample Type dropdown auto-sets the Run Name prefix and Sequencing Method:
Tumor DNA → prefix
ad-, methodWESNormal DNA → prefix
nd-, methodWESTumor RNA → prefix
ar-, methodRNA-Seq
The File Prefix field autocompletes from available FASTQ files in your project directory and validates that the files exist.
Note
LENS normalizes FASTQs before downstream processing. For each logical sample
row in the manifest, RAFT gathers all FASTQs matching the File_Prefix,
pairs mates using anchored read suffixes such as _1/_2 or
_R1/_R2, and then concatenates all matched chunks for that sample into a
single normalized FASTQ pair.
This means a single File_Prefix can safely match multiple lane-level
FASTQs, such as sample-1_1.fastq.gz / sample-1_2.fastq.gz and
sample-2_1.fastq.gz / sample-2_2.fastq.gz. Those lane-level files
will be concatenated into one per-sample pair for the manifest row.
If your lanes are listed as multiple manifest rows with the same
Dataset, Patient_Name, and Run_Name, they will also be merged
into one normalized sample, and the emitted normalized manifest will record
the original prefixes in a trailing Source_File_Prefixes column.
This behavior assumes the manifest groups lanes from the same library under the same logical sample. If FASTQ naming is ambiguous or mate pairs cannot be resolved cleanly, RAFT will fail rather than guessing.
Validation warnings appear in real time — for example, “Missing for LENS (Tumor Antigens): Normal DNA” if a normal DNA sample has not been added for a patient.
A hosted version of the Manifest Generator is also available for creating manifests outside of a project:
Creating a manifest from the command line
If you prefer the command line, RAFT can generate a template manifest:
raft manifest-template --output my_manifest.tsv
This creates a TSV file with example rows for a typical LENS run. To generate a header-only template:
raft manifest-template --no-examples --output my_manifest.tsv
For the full column reference, sample naming conventions, complex sample sets with Groups, and manifest validation, see Manifest specifications.
Using an off-the-shelf dataset
If you are running a published dataset rather than your own samples, RAFT can fetch it for you and generate the manifest, so there is nothing to fill in by hand:
raft download-dataset --dataset HugoLo_IPRES_2016
This clones the dataset-prep repository, downloads the dataset’s FASTQs from
ENA/EBI into /path/to/raft/inputs/fastqs/<DATASET>, builds its public
metadata into /path/to/raft/inputs/metadata/<DATASET>, and generates the
RAFT manifest (<DATASET>_run_data.tsv) alongside that metadata. Hand the
generated manifest to a run like any other:
raft run --project-id my-project-lens --workflow lens --version 1.9-dev --manifest HugoLo_IPRES_2016_run_data.tsv
Manifest generation runs the dataset’s R prep script under Apptainer, so a
container runtime must be available. Use --skip-manifest to stop after the
FASTQ and metadata downloads, or --skip-fastqs to prepare the metadata and
manifest without downloading sequencing data.
Alternatively, raft run --dataset HugoLo_IPRES_2016 does the same
preparation as part of creating a project, generating the manifest during the
run instead of beforehand.
Supplying the manifest
Once you have a manifest, pass it when starting a project:
raft run --project-id my-project-lens --workflow lens --version 1.9-dev --manifest my_manifest.tsv
Manifest files must be placed in /path/to/raft/inputs/metadata directory to be
discovered automatically.