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

Run_Name

dataset

Dataset

group

Group

patient

Patient_Name

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.

Launch it by starting a new project without a --manifest argument:

raft run --project-id my-project-lens --workflow lens --version 1.9.3

The Manifest Generator opens in your browser. From there you can:

  1. Select a workflow — choose “LENS (Tumor Antigens)” from the dropdown.

  2. Add samples — fill in Dataset, Patient Name, Sample Type, Run Name, and File Prefix for each sample.

  3. Review — the Sample Overview section organizes samples by patient and group, with color-coded type badges.

  4. Save — click “Save to RAFT” to save the manifest to your project.

The RAFT Manifest Generator, showing the sample entry form on the left and the Sample Overview on the right, with samples grouped by patient and colour-coded type badges for tumor DNA, normal DNA, and tumor RNA.

The Sample Type dropdown auto-sets the Run Name prefix and Sequencing Method:

  • Tumor DNA → prefix ad-, method WES

  • Normal DNA → prefix nd-, method WES

  • Tumor RNA → prefix ar-, method RNA-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” appears when a patient has no normal DNA sample yet.

The Manifest Generator displaying a real-time validation warning reading "Missing for LENS (Tumor Antigens): Normal DNA" beneath a patient group containing only tumor DNA and tumor RNA.

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.

The table below lists the currently supported off-the-shelf immuno-oncology datasets. It loads from GitLab when the page opens. Click a dataset name to open its preparation repository.

Loading datasets from GitLab...

The same list is available from a terminal:

raft available-datasets

Add --json when a script needs to consume the list.

Datasets can be downloaded using:

raft download-dataset --dataset <DATASET>

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.3 --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.3 --manifest my_manifest.tsv

Manifest files must be placed in /path/to/raft/inputs/metadata directory to be discovered automatically.