Skip to main content

Predict the impact of promoter variants on gene expression

Project description

PromoterAI

This repository contains the source code for PromoterAI, a deep learning model for predicting the impact of promoter variants on gene expression, as described in Jaganathan, Ersaro, Novakovsky et al., Science (2025).

PromoterAI precomputed scores for all human promoter single nucleotide variants are freely available for academic and non-commercial research use. Please complete the license agreement; the download link will be shared via email shortly after submission. Scores range from –1 to 1, with negative values indicating under-expression and positive values indicating over-expression. Recommended thresholds are ±0.1, ±0.2, and ±0.5.

Installation

The simplest way to install PromoterAI for variant effect prediction is through:

pip install promoterai

For model training or to work directly with the source code, install PromoterAI by cloning the repository:

git clone https://github.com/Illumina/PromoterAI
cd PromoterAI
pip install -e .

PromoterAI supports both CPU and GPU execution, and has been tested on H100 (TensorFlow 2.15, CUDA 12.2, cuDNN 8.9.7) and A100 (TensorFlow 2.13, CUDA 11.4, cuDNN 8.6.0) GPUs. Functionality on other GPUs is expected but not officially tested.

Variant effect prediction

Organize the variants into a tsv file with the following columns: chrom, pos, ref, alt, strand. If strand cannot be specified, create separate rows for each strand and aggregate predictions. Indels must be left-normalized and without special characters.

chrom	pos	ref	alt	strand
chr16	84145214	G	T	1
chr16	84145333	G	C	1
chr2	55232249	T	G	-1
chr2	55232374	C	T	-1
chr6	108295024	C	CGG	1
chr6	108295024	CT	C	1

Download the appropriate reference genome fa file, then run:

promoterai \
    --model_folder path/to/model \
    --var_file path/to/variant_tsv \
    --fasta_file path/to/genome_fa \
    --input_length 20480

Scores will be added as a new column labeled score, and written to a file created by appending the model folder name to the variant file name.

Model training and fine-tuning

Create a tsv file listing the genomic positions of interest (e.g., data/annotation/tss_hg38.tsv, data/annotation/tss_mm10.tsv), with the following required columns: chrom, pos, strand.

chrom	pos	strand
chr1	11868	1
chr1	12009	1
chr1	29569	-1
chr1	17435	-1

Download the appropriate reference genome fa file and regulatory profile bigwig files. Organize the bigwig file paths and their corresponding transformations into a tsv file (e.g., data/bigwig/hg38.tsv, data/bigwig/mm10.tsv), where each row represents a prediction target, with the following required columns:

  • fwd: path to the forward-strand bigwig file
  • rev: path to the reverse-strand bigwig file
  • xform: transformation applied to the prediction target
fwd	rev	xform
path/to/ENCFF245ZZX.bigWig	path/to/ENCFF245ZZX.bigWig	lambda x: np.arcsinh(np.nan_to_num(x))
path/to/ENCFF279QDX.bigWig	path/to/ENCFF279QDX.bigWig	lambda x: np.arcsinh(np.nan_to_num(x))
path/to/ENCFF480GFU.bigWig	path/to/ENCFF480GFU.bigWig	lambda x: np.arcsinh(np.nan_to_num(x))
path/to/ENCFF815ONV.bigWig	path/to/ENCFF815ONV.bigWig	lambda x: np.arcsinh(np.nan_to_num(x))

Generate TFRecord files by running the command below, which can be parallelized across chromosomes for speed:

for chrom in $(cut -f1 path/to/position_tsv | sort -u | grep -v chrom)
do
    python -m promoterai.preprocess \
        --tfr_folder path/to/output_tfrecord \
        --tss_file path/to/position_tsv \
        --fasta_file path/to/genome_fa \
        --bigwig_files path/to/profile_tsv \
        --chrom ${chrom} \
        --input_length 32768 \
        --output_length 16384 \
        --chunk_size 256
done

For multi-species training, repeat the steps above for each species, writing TFRecord files to separate folders. Train a model on the generated TFRecord files by running:

python -m promoterai.train \
    --model_folder path/to/trained_model \
    --tfr_human_folder path/to/human_tfrecord \
    --input_length 20480 \
    --output_length 4096 \
    --num_blocks 24 \
    --model_dim 1024 \
    --batch_size 32 \
    --tfr_nonhuman_folders [path/to/mouse_tfrecord ...]  # optional list

Fine-tune the trained model using the variant file data/annotation/finetune_gtex.tsv by running:

python -m promoterai.finetune \
    --model_folder path/to/trained_model \
    --var_file path/to/finetune_gtex_tsv \
    --fasta_file path/to/genome_fa \
    --input_length 20480 \
    --batch_size 8

The fine-tuned model will be saved in a folder created by appending _finetune to the trained model folder name.

Contact

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

promoterai-1.0rc6.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

promoterai-1.0rc6-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file promoterai-1.0rc6.tar.gz.

File metadata

  • Download URL: promoterai-1.0rc6.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.4

File hashes

Hashes for promoterai-1.0rc6.tar.gz
Algorithm Hash digest
SHA256 a140009957969973ab1d72c39fd6adc9cbf4fa6be2b13534374df8e2dc168143
MD5 4e75bcfbb30ac83a04b4dd41700f7278
BLAKE2b-256 79d73cd06036f1bbaa8cb66af49373f53c0a079872b0d079da63e8516a8fbf72

See more details on using hashes here.

File details

Details for the file promoterai-1.0rc6-py3-none-any.whl.

File metadata

  • Download URL: promoterai-1.0rc6-py3-none-any.whl
  • Upload date:
  • Size: 13.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.4

File hashes

Hashes for promoterai-1.0rc6-py3-none-any.whl
Algorithm Hash digest
SHA256 f96c2a53106155a66b8eedd6b54286b8eaa197564cd9881c012e6a729d34daf8
MD5 0df20aade22380c14a6c235afbf06e5a
BLAKE2b-256 727ecbf22c66c918553fc3f20f7719d6e39f7c41a11dcc661e46f24f0e5c4942

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page