Frequently asked questions

This page collects common LENS and RAFT questions that come up during setup, execution, and report review. If you are trying to diagnose a failure or an unexpected output, also see Troubleshooting.

RAFT and LENS

What is LENS?

LENS (Landscape of Effective Neoantigens Software) is a workflow designed for predicting potentially therapeutically targetable tumor-specific and tumor-associated antigens from short-read sequencing data.

What is RAFT? How is it different from LENS?

RAFT is a Nextflow-based workflow manager that runs LENS. RAFT is used to run the LENS workflow, but RAFT is also capable of running other workflows (see raft available-workflows). More information about RAFT can be found in the RAFT Documentation.

Running LENS

What input files are required?

Users must provide a manifest file (see Preparing your samples) as well as multiple samples per patient. These samples include:

  • DNA normal sample (WES/WXS or WGS)

  • DNA tumor sample (WES/WXS or WGS)

  • RNA tumor sample

A normal RNA sample is not required. Earlier versions of LENS asked for a tissue-matched normal RNA sample to provide an expression baseline; that comparison now uses a pan-normal reference bundled with the workflow. See Introduction.

What sequencing technologies are supported?

Illumina-based short-read sequencing from roughly 50 bp to 150 bp is currently supported. A long-read-based tumor antigen workflow is still in development.

How can I run LENS with my own reference files?

In the Config Generator, modify reference file paths in the References step. For CLI users, use --setup-only to generate the project configuration, then edit the reference paths in /path/to/raft/projects/<PROJECT_ID>/workflow/nextflow.config before launching with raft run. See Running LENS using RAFT for more information.

Workflow tools

How can I run LENS using different tools?

In the Config Generator, expand the Tool selection accordion for the step you want to change and pick an alternative tool. For CLI users, pass edit the tool parameter in the project’s workflow/nextflow.config. For the full list of what each step accepts, see the alternative tools tables in Off-the-shelf defaults.

How do I know which tool versions are running?

For the standard profile, see Off-the-shelf defaults. For workflow-level details about how those tools are used, see Antigen-specific technical details. The exact containers for a specific project run are recorded in that project’s workflow/nextflow.config file.

How do I know which Docker image tools are running?

RAFT (the workflow manager running LENS) relies upon containerization software (Docker or Singularity/Apptainer) for running its processes. The specific container being used for each process can be found in your LENS project’s nextflow.config file (/path/to/raft/projects/<PROJECT_ID>/workflow/nextflow.config). Each process defined within RAFT’s modules (the directories in workflow/) has one or more Nextflow label directives assigned to it. For example the fastp process includes the label fastp_container. If we search for this label within the nextflow.config file then we find lines like:

withLabel: fastp_container {
  label = 'cloud'
  container = 'quay.io/biocontainers/fastp:0.24.0--heae3180_1'
}

This reveals that the fastp process is being run using BioContainer’s fastp v0.24.0 container image.

How do I change which tool versions are used?

Tool versions can be changed by using a different container image for the process labels associated with that tool. Those labels are configured in the project’s nextflow.config file (/path/to/raft/projects/<PROJECT_ID>/workflow/nextflow.config). Container images are commonly sourced from Docker Hub or BioContainers.

Note

Docker images may differ in construction (e.g. where binaries are located within the container), so some modifications to process definitions within each tool’s RAFT module (in /path/to/raft/projects/<PROJECT_ID>/workflow/) may be required.

How do I change resource allocations for each tool?

Resource allocations (cpus and memory directives) can be modified in the nextflow.config file (/path/to/raft/projects/<PROJECT_ID>/workflow/nextflow.config).

What makes the reviewed evidence report different from the base report?

The base report is the biological candidate table emitted by the core LENS workflow before evidence review. The reviewed evidence report keeps those same candidate rows and adds review outputs keyed by candidate_id, including alignment_confidence_score, final_tier, and reasons.

Those review annotations are driven by both generic alignment-quality checks and antigen-specific checks. Across sources, the generic checks include support read count, support ratio, support-read mapping quality, strand bias, read-end bias, duplicate fraction, soft-clipping enrichment, mismatch burden, repeat or low-mappability context, and for variant candidates, excess support in matched normal DNA. Source-specific checks are then layered on top:

  • SPLICE: junction split-read support, anchor length, PSI-like abundance, coding-kmer support, and intron-versus-flank coverage patterns

  • FUSION: split reads, spanning pairs, and breakpoint dispersion

  • ERV: locus specificity, multimapping risk, normal-tissue expression, mTEC expression, and open reading frame coverage

  • VIRUS: genomic breadth, uniqueness, and abundance

  • CTA/SELF: abundance, transcript coverage, number of detectable normal tissues, normal-tissue expression, and mTEC expression

In practice, the reviewed evidence report is usually the right starting point for interpretation because it adds the evidence-based confidence layer that the base report does not contain. For the complete thresholds, penalties, and source-specific defaults, see Evidence review specifications.

How is the workflow code in LENS executed?

See Antigen-specific technical details for more information.

Antigen sources

What antigen sources are supported?

  • Somatic single nucleotide variants (SNVs)

  • Somatic insertion and deletion variants (InDels)

  • Splice variants

  • Fusion events

  • Viruses

  • Endogenous Retroviruses (ERVs)

  • Cancer-testis antigens (CTAs)

How is CTA gene list defined?

The CTA (cancer-testis antigens) gene list (cta.pirlygenes.06APR2026.gene_list in the standard human profile) is hand curated. It is based loosely on the CTDatabase gene list, which served as a starting point rather than the definition, with additional genes added on top of it.

Why are some of my CTA transcripts expressed in normal tissues?

Curation makes the gene list better vetted than a raw database dump, but a gene on it is still not guaranteed to be testis-specific – the CTDatabase entries it draws on are not reliably testis-restricted. To address this, LENS outputs contain columns that can be used to further filter CTA pMHCs, such as cta_gene_detectable_normal_tissues derived from Human Protein Atlas data.

What do the mTEC columns mean?

Medullary thymic epithelial cells (mTECs) are thymic cells involved in central tolerance. LENS uses two mTEC expression datasets (Larouche et al., Genome Medicine, 2020, and Laumont et al., Science Translational Medicine, 2018) to estimate expression in that context. Lower mTEC expression generally suggests a lower risk of central tolerance toward the pMHC of interest.

How is ERV list defined?

The endogenous retrovirus (ERV) list is derived from version 1.1 of the gEVE database (Nakagawa and Takahashi, Database, 2016). These elements are computationally predicted.

Note

The gEVE project site (geve.med.u-tokai.ac.jp) no longer resolves, so the database is not currently available at its original address. The reference data LENS uses is bundled with the workflow’s reference set, so runs are unaffected, but the upstream source cannot be re-downloaded or browsed.

The LENS report includes ERV metadata columns from erv_scores.25SEP2023.tsv that can be used for additional filtering. More information on those scores is available in the ERV section of Antigen-specific technical details.

Algorithms

How is CCF calculated?

Cancer cell fraction (CCF, also known as clonality) is estimated using the formula:

_images/ccf_calculation.png

where f is the variant allele frequency, rho is the sample tumor purity, N_T is the gene-level copy number, and m is the multiplicity (Tarabichi et al., 2021).

How is the prioritization score calculated?

Tumor antigens are prioritized based upon the binding affinity, allele-specific transcript abundance, and CCF (if available), which aligns with previously published recommendations (Wells et al., 2020).

Specifically, binding affinity values are transformed using:

max(0, (1000 - x) / 1000)

where x is the predicted binding affinity in nanomolar units. This keeps higher-affinity interactions (smaller nanomolar values) at larger transformed values, bounds the term to 0-1, and holds it at 0 for anything weaker than 1000 nM so that a poor binder can never out-score a strong one.

Note

Before LENS v1.9 this term was abs(x - 1000) / 1000, which is identical below 1000 nM but rises again above it – a 5000 nM non-binder scored 4.0 while a 1 nM binder scored 0.999. Candidates passing the default binding_affinity_threshold of 500 nM were never affected, so scores from runs using the default profile are unchanged. If you raised that threshold above 1000 nM, priority scores from earlier runs are not trustworthy and those reports should be regenerated.

Support read counts are log2 transformed and normalized by dividing each observation by the maximum observed count so that they range from 0 to 1.

Warning

That maximum is taken within a single report, so pMHC_RS – and therefore the priority score – is scaled differently for each patient. Priority scores are meaningful for ranking candidates within one report and should not be compared across patients.

Cancer cell fraction values do not require this normalization because they are already bounded between 0 and 1. Each peptide-and-HLA combination is then assigned a prioritization metric:

S = pMHC_BA * pMHC_RS * pMHC_CCF

Here, pMHC_BA is the transformed binding-affinity term, pMHC_RS is the log-transformed and normalized read-support term, and pMHC_CCF is the estimated cancer cell fraction.

The metric ranks candidate targets for downstream review and manufacturing decisions.

How are SNV and InDel peptides generated?

In the standard human profile, LENS generates SNV- and InDel-derived peptides through the following pipeline:

  1. Somatic variant calling — mutect2 and strelka2 identify somatic variants independently.

  2. Filter for PASS — bcftools retains only variants passing each caller’s quality filters.

  3. Union somatic calls — jacquard combines passing calls across the enabled somatic callers.

  4. Annotate variants — snpEff annotates variant effects (missense, frameshift, etc.).

  5. Filter for expressed transcripts — salmon quantification is used to retain only variants in transcripts above the user-specified expression threshold. In the standard human profile, the default setting is -p 50 --exclude-zeros.

  6. Phase variants — whatshap performs read-backed phasing of somatic and germline variants, preserving local haplotype context.

  7. Build variant-specific VCFs — for each variant of interest, a VCF is constructed that includes the focal somatic variant and any phased germline variants on the same haplotype.

  8. Extract exonic sequences — samtools faidx extracts exon sequences from the reference FASTA for expressed transcripts harboring the variant.

  9. Apply variants to transcripts — bcftools consensus applies the variant-specific VCFs to the exonic sequences, producing tumor and normal transcript sequences.

  10. Translate into peptides — lenstools make-snv-peptides-context and lenstools make-indel-peptides-context generate mutant peptide and nucleotide outputs from the sequence context built upstream.

For more detail on each step, see Antigen-specific technical details.

Reports

How should I interpret the LENS report?

See Interpreting the LENS reports for a guide to interpreting the LENS reports, including key columns, priority scores, and missing values. That page also walks a real candidate through the columns that carry the decision, gives a starting triage workflow for narrowing a report to a shortlist, and explains how much weight each of the seven antigen sources will bear.

How do I determine how many pMHCs are filtered at each step of LENS?

The RAFT Output Viewer provides interactive pMHC filtering and counting. After a LENS run completes:

raft generate-reports --project-id my-project-lens

In the viewer, select a patient and use the filter controls (antigen source, Top N, binding affinity threshold) to see how many pMHCs remain at each filter level. See Accessing and reviewing outputs for details.

Additionally, the run QC summary file (outputs/lens/*.run_qc_summary.tsv) contains per-step counts for each antigen source.