FLARE integrates ChromBPNet deep learning predictions with evolutionary conservation to prioritize impactful rare non-coding variants. Evolutionary conservation is a key predictor of disease risk, influenced by diverse variant mechanisms. FLARE predicts PhyloP conservation scores using:
- TSS distance
- Nearest gene constraint
- Peak overlap
- ChromBPNet scores
- ChromBPNet scores conditional on the variant residing within a peak
Since PhyloP scores are not context-specific, FLARE models the relationship between genomic context, predicted regulatory effects, and evolutionary conservation in cell contexts where regulation is highly relevant.
FLARE:
- Disentangles the contributions of context-specific accessibility and regulatory effects to conservation.
- Provides an intuitive framework for integrating multiple functional genomic features into a unified model.
- Captures variants’ regulatory potential across multiple cell types through its predictions.
A powerful advantage of FLARE is its adaptability. The model can be trained on any context of interest (e.g., different tissues, developmental contexts) using ChromBPNet predictions across over 8 million ultra-rare variants in the 1000 Genomes Project.
This repository provides code for FLARE model training and FLARE predictions. Below is an example workflow using ASD de novo mutations for training and prediction. This smaller dataset is ideal for testing the code. However, the results described in the manuscript from Marderstein, Kundu et al. are based on training with the rare variants matrix and making predictions on the ASD set.
Ensure the following R packages are installed and can be loaded:
library(data.table)
library(optparse)
library(glmnet)You can use a Conda environment to manage dependencies:
conda activate r
Download the input data from the Synapse directory: https://www.synapse.org/Synapse:syn64693551/files/
The uncompressed rare variant file is over 40GB! Ensure you have sufficient memory. For interactive use:
srun --account=smontgom --partition=batch --time=24:00:00 --mem=128G --nodes=1 --ntasks=1 --cpus-per-task=1 --pty bash
From the FLARE root directory:
cd scripts
input="/oak/stanford/groups/smontgom/amarder/synapse/predictions/asd.all_dataset.K562_bias.annot2.txt.gz"
output="/oak/stanford/groups/smontgom/amarder/FLARE/data/ASD.FLARE-fb.txt"
model="fetal_brain"
./FLARE_Preprocess.R -i $input -o $output -m $model
You can specify one of the following models:
"baseline"(baseline model)"fetal_brain_peaksonly"(FLARE-fetal brain excluding ChromBPNet predictions)"fetal_brain"(FLARE-fetal brain)"adult_brain"(FLARE-adult brain)"brain"(FLARE-brain)"heart"(FLARE-heart)"all"(FLARE-all)
FLARE fits a lasso regression model on the input feature matrix to predict PhyloP conservation scores. Regularization hyperparameters are tuned with 4-fold cross-validation. For each chromosome, FLARE scores are predicted from a model trained on the remaining chromosomes.
input="/oak/stanford/groups/smontgom/amarder/FLARE/data/ASD.FLARE-fb.txt"
outdir="/oak/stanford/groups/smontgom/amarder/FLARE/models/ASD.FLARE-fb"
./FLARE_Training.R -i $input -o $outdir
input="/oak/stanford/groups/smontgom/amarder/FLARE/data/ASD.FLARE-fb.txt"
output="/oak/stanford/groups/smontgom/amarder/FLARE/predictions/ASD.FLARE-fb.ASD.txt"
modelpath="/oak/stanford/groups/smontgom/amarder/FLARE/models/ASD.FLARE-fb"
./FLARE_Predict.R -i $input -o $output -m $modelpath
You can also evaluate trained models by extracting lasso weights and computing prediction performance against PhyloP.
model_dir="/oak/stanford/groups/smontgom/amarder/FLARE/models/ASD.FLARE-fb"
./FLARE_Eval/FLARE_lasso_weights.R \
-m "$model_dir" \
-o "$model_dir/lasso_weights.txt" \
-p "$model_dir/lasso_weights_plot.pdf"
pred_file="/oak/stanford/groups/smontgom/amarder/FLARE/predictions/ASD.FLARE-fb.ASD.txt"
truth_file="/oak/stanford/groups/smontgom/amarder/FLARE/data/FLARE_training_snps.txt"
perf_file="/oak/stanford/groups/smontgom/amarder/FLARE/predictions/ASD.FLARE-fb.performance.txt"
./FLARE_Eval/FLARE_performance.R \
-p "$pred_file" \
-t "$truth_file" \
-o "$perf_file"
For downstream applications of FLARE scores (e.g., to ASD), refer to the manuscript GitHub repository.
For any questions, please contact:
Andrew Marderstein & Soumya Kundu 📧 andrew.marderstein@gmail.com, soumyak@stanford.edu
Marderstein, A. R., Kundu, S., et al. Decoding common and rare noncoding variant effects across cellular and developmental contexts. Nature Genetics (2026). https://doi.org/10.1038/s41588-026-02619-6



