LENSTools
Overview
The LENS lenstools module is the main report-assembly and peptide-postprocessing
layer for the workflow. It wraps the LENSTools Python and R utilities inside
Nextflow processes and workflows and is responsible for:
peptide-context generation support
peptide filtering and annotation
read-support quantification
review evidence extraction and scoring
report assembly, publication, and validation
QC summarization and cohort-level comparisons
Current repository
The current module repository is:
reproducible-analyses-framework-and-tools/modules/tools/lenstools
Within this project, the main wrapper files are:
workflow/modules/lenstools/lenstools.nfworkflow/modules/lenstools/lenstools.config
Functions used directly by LENS
The entries below are the lenstools processes and workflows currently
imported by workflow/modules/lens/lens.nf.
Variant and pMHC processing
Function |
Kind |
Description |
|---|---|---|
|
process |
Extracts selected annotation fields from annotated VCFs for downstream report joins. |
|
process |
Adds pMHC annotation fields and emits the high-affinity subset used downstream. |
|
process |
Re-annotates pMHCs after optional multipass filtering. |
|
process |
Selects peptides for an optional second-pass MHC characterization run. |
|
process |
Removes peptides that should be filtered against the configured reference peptidome. |
|
process |
Converts wildtype peptide FASTAs into lookup tables for agretopicity and report annotation. |
|
process |
Counts RNA support for variant alleles at genomic loci represented in the report. |
|
process |
Calculates cancer cell fraction values from variant, purity, and copy-number inputs. |
|
process |
Produces the final high-confidence reviewed report subset. |
Peptide read-support quantification
Function |
Kind |
Description |
|---|---|---|
|
workflow |
Wrapper that quantifies ERV- and CTA-derived peptide coding sequences in RNA alignments. |
|
process |
Quantifies RNA read support for viral peptide coding sequences. |
|
process |
Quantifies RNA read support for SNV-derived peptide coding sequences. |
|
process |
Quantifies RNA read support for InDel-derived peptide coding sequences. |
|
process |
Quantifies RNA read support for fusion-derived peptide coding sequences. |
|
process |
Quantifies RNA read support for splice-derived peptide coding sequences. |
|
process |
Merges source-specific peptide read-count outputs into a single report-ready table. |
Report annotation and assembly
Function |
Kind |
Description |
|---|---|---|
|
process |
Adds tabular annotations to report rows using a single shared key. |
|
process |
Adds tabular annotations using multi-column join keys. |
|
process |
Adds metadata from external reference tables such as ERV or CTA resources. |
|
process |
Prepares and normalizes the CTA annotation reference used for report joins. |
|
process |
Adds virus-specific metadata to viral report rows. |
|
process |
Converts LOHHLA outputs into report-ready HLA loss annotations. |
|
process |
Builds transcript lookup tables used for transcript-to-gene and versionless joins. |
|
process |
Adds splice-event gene identifiers to splice report rows. |
|
process |
Adds splice-event gene symbols/names using the transcript lookup table. |
|
process |
Labels report rows with origin/source categories derived from upstream annotations. |
|
process |
Adds expression values such as TPMs to report rows. |
|
process |
Converts the report into a BED file for IGV/LENS visualization. |
|
process |
Builds the versioned LENS report deliverable from stripped report inputs. |
|
process |
Adds stable candidate identifiers to report rows before final publication. |
|
process |
Extracts HLA sidecar information used during final report generation. |
|
process |
Publishes the base, unreviewed report output. |
|
process |
Publishes the reviewed report output package. |
|
process |
Runs final structural/content validation on LENS report outputs. |
|
process |
Produces run-level QC summaries for the report bundle. |
|
process |
Removes empty columns from assembled reports before publication. |
|
process |
Applies row-wise annotation logic, used in LENS for APPM annotations. |
|
process |
Merges RegTools-derived splice annotations back into LENS splice review outputs. |
Review, prioritization, and QC
Function |
Kind |
Description |
|---|---|---|
|
workflow |
Master review workflow that assembles evidence, flags, and review-ready report outputs. |
|
process |
Computes the standard LENSTools peptide prioritization score. |
|
process |
Computes custom prioritization outputs using configurable weighting logic. |
|
process |
Adds a recommended priority-score field to finalized report rows. |
|
workflow |
Summarizes SNV candidate attrition across the LENS filtering funnel. |
|
workflow |
Summarizes InDel candidate attrition across the LENS filtering funnel. |
|
workflow |
Summarizes splice candidate attrition across the LENS filtering funnel. |
|
workflow |
Summarizes fusion candidate attrition across the LENS filtering funnel. |
|
workflow |
Summarizes ERV candidate attrition across the LENS filtering funnel. |
|
workflow |
Summarizes viral candidate attrition across the LENS filtering funnel. |
|
workflow |
Summarizes CTA candidate attrition across the LENS filtering funnel. |
|
process |
Assesses antigen-processing and presentation machinery features from expression inputs. |
|
process |
Assesses spliceosome-related expression features for downstream QC/interpretation. |
|
process |
Produces multi-group comparison outputs for patients with grouped samples. |
Lower-level helper entry points in the current repo
The current lenstools repo also contains lower-level helper processes that
are typically reached through other subworkflows rather than imported directly
by lens.nf. Examples include:
lenstools_make_snv_peptides_contextlenstools_make_indel_peptides_contextlenstools_filter_expressed_variantslenstools_get_expressed_transcripts_bedlenstools_make_variant_specific_vcfslenstools_make_variant_specific_tx_seqslenstools_get_3prime_seq_bedlenstools_filter_expressed_self_geneslenstools_get_expressed_selfs_bedlenstools_make_self_antigen_peptideslenstools_filter_expressed_ervslenstools_filter_expressed_ervs_without_controllenstools_filter_ervs_by_rna_coveragelenstools_get_expressed_ervs_bedlenstools_make_erv_peptideslenstools_filter_expressed_viruseslenstools_filter_viruses_by_rna_coveragelenstools_get_expressed_viral_bedlenstools_make_viral_peptideslenstools_get_fusion_transcripts_bedlenstools_make_fusion_specific_tx_seqslenstools_make_fusion_peptides_context
Those helpers are the implementation-level building blocks behind the antigen-source-specific behavior described in Antigen-specific technical details.