How konradjk/loftee works
Project Overview and Type
• LOFTEE (Loss-Of-Function Transcript Effect Estimator) is a VEP plugin written predominantly in Perl (with some Python utilities) that assesses putative loss‐of‐function variants. It focuses on three main variant types (stop‐gained, splice site disrupting, and frameshift) and applies a comprehensive set of filters based on transcript context, conservation, and splice modeling.
• The purpose is to flag “high-confidence” and “low-confidence” LoF variants by combining predictions from various modules (including splice models via MaxEntScan and SVM/logistic regression filters).
Analyzing the File Structure
• Top-Level Files: The project includes major Perl modules (e.g., LoF.pm, TissueExpression.pm, ancestral.pm, context.pm) that implement core variant analysis functionality.
• Executable scripts: Files like de_novo_donor.pl, extended_splice.pl, gerp_dist.pl, loftee_splice_utils.pl, splice_site_scan.pl, svm.pl, and utr_splice.pl serve as specialized tools or filters.
• The “maxEntScan” directory: Contains data, scoring scripts (score3.pl, score5.pl), and splice models that are used to predict splicing consequences.
• The “splice_data” folder: Includes reference files, donor/acceptor motifs, and SVM configuration files that support splice site rescue predictions.
• The “src” directory: Holds Python utility scripts such as loftee_utils.py and scripts that parse and process VEP VCF outputs.
• The rest of the structure (LICENSE, README.md) defines project licensing and comprehensive usage examples.
Key Components
a. Input/Integration Layer:
• External VEP Tool: LOFTEE is invoked via VEP as a plugin. VEP sends variant data (VCF lines) and expects annotated output.
• External dependencies: Samtools, the PhyloCSF database, and the ancestral sequence file (human_ancestor.fa) that are checked during processing.
b. Core LOFTEE Modules:
• Variant Filtering Logic: Implemented in several Perl modules (LoF.pm, TissueExpression.pm, ancestral.pm, context.pm) that handle variant categorization and filtering criteria.
• Splice Prediction Module: A dedicated branch that leverages MaxEntScan scripts (in the maxEntScan directory) and the splice_data files. This branch calculates MES scores and predicts rescue events.
• SVM and Logistic Regression Components: Scripts such as svm.pl indicate use of machine learning methods to predict de novo donor splice sites and extended splice site effects.
c. Utility Scripts for Output Handling:
• Data Parsing & Integration: Python scripts in “src” (e.g., read_vep_vcf.py, strip_vcf_to_sites.py, tableize_vcf.py) that help parse the VEP/LoF VCF output and reformat results.
Relationships and Data Flow
• Within LOFTEE, split the pipeline into parallel filtering/analysis paths:
• One branch for evaluating stop-gained and frameshift variants (referencing transcript boundaries, near-end exon filtering, etc.).
• A second branch for splice site analysis using both core splice site recognition and extended splice site predictions. This branch interacts with:
• MaxEntScan (scoring scripts and splice models)
• Splice data (donor/acceptor motif details and SVM parameters)
• SVM/Logistic regression components.
• Utility modules (the Python “src” scripts) can be drawn alongside these main flows to indicate how the raw output is post-processed for ease of analysis.
Final Elements to be Included
• A clear “VEP” block that feeds into the LOFTEE core.
• Branches for:
• Stop-gained/Frameshift analysis (using modules like LoF.pm).
• Splice site variant analysis (leveraging maxEntScan scripts, splice_data motifs, and rescue prediction logic).
• An SVM/Logistic Regression branch if needed.
• Output block annotated as “VCF with LoFTER Annotations” or “Parsed Variant Annotations” from the Python utilities.