Skip to main content

gReLU is a python library to train, interpret, and apply deep learning models to DNA sequences

Project description

DOI

gReLU

gReLU is a Python library to train, interpret, and apply deep learning models to DNA sequences. Code documentation is available here.

Flowchart

Breaking Changes in v1.1.0

Model Zoo Migration: The gReLU model zoo has moved from Weights & Biases to HuggingFace. The grelu.resources API has changed:

# Old API (wandb) - still available at grelu.resources.wandb but will be removed in future
grelu.resources.load_model(project="human-atac-catlas", model_name="model")

# New API (HuggingFace)
grelu.resources.load_model(repo_id="Genentech/human-atac-catlas-model", filename="model.ckpt")

Browse the zoo at https://huggingface.co/collections/Genentech/grelu-model-zoo and see the Model Zoo Tutorial for updated usage.

Installation

To install from source:

git clone https://github.com/Genentech/gReLU.git
cd gReLU
pip install .

To install using pip:

pip install gReLU

Typical installation time including all dependencies is under 10 minutes.

To train or use transformer models containing flash attention layers, flash-attn needs to be installed first:

conda install -c conda-forge cudatoolkit-dev -y
pip install torch ninja
pip install flash-attn --no-build-isolation
pip install gReLU

Contributing

See our contribution guide.

Additional requirements

If you want to use genome annotation features through the function grelu.io.genome.read_gtf, you will need to install the following UCSC utilities: genePredToBed, genePredToGtf, bedToGenePred, gtfToGenePred, gff3ToGenePred.

If you want to create bigWig files through the function grelu.data.preprocess.make_insertion_bigwig, you will need to install the following UCSC utilities: bedGraphToBigWig.

UCSC utilities can be installed from http://hgdownload.cse.ucsc.edu/admin/exe/, for example using the following commands:

rsync -aP rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/bedGraphToBigWig /usr/bin/
rsync -aP rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/genePredToBed /usr/bin/
rsync -aP rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/genePredToGtf /usr/bin/
rsync -aP rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/bedToGenePred /usr/bin/
rsync -aP rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/gtfToGenePred /usr/bin/
rsync -aP rsync://hgdownload.soe.ucsc.edu/genome/admin/exe/linux.x86_64/gff3ToGenePred /usr/bin/

or via bioconda:

conda install -y \
bioconda::ucsc-bedgraphtobigwig \
bioconda::ucsc-genepredtobed    \
bioconda::ucsc-genepredtogtf    \
bioconda::ucsc-bedtogenepred    \
bioconda::ucsc-gtftogenepred    \
bioconda::ucsc-gff3togenepred

If you want to create ATAC-seq coverage bigWig files using grelu.data.preprocess.make_insertion_bigwig, you will need to install bedtools. See https://bedtools.readthedocs.io/en/latest/content/installation.html for instructions.

Citation

Please cite our paper: https://www.nature.com/articles/s41592-025-02868-z

Lal, A., Gunsalus, L., Nair, S. et al. gReLU: a comprehensive framework for DNA sequence modeling and design. Nat Methods (2025). https://doi.org/10.1038/s41592-025-02868-z

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

grelu-1.1.0.tar.gz (24.5 MB view details)

Uploaded Source

Built Distribution

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

grelu-1.1.0-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

Details for the file grelu-1.1.0.tar.gz.

File metadata

  • Download URL: grelu-1.1.0.tar.gz
  • Upload date:
  • Size: 24.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.10

File hashes

Hashes for grelu-1.1.0.tar.gz
Algorithm Hash digest
SHA256 d9679786aa64c03dd03e79466fb9149923e439bbad745da1e4b05003395b94f9
MD5 d80e0dc9d3634a77e43f2cb8d0c9c968
BLAKE2b-256 87b9309c24dd3401fa2956ddf35a99fbad769366d80f1ee0fc04a71c476cae60

See more details on using hashes here.

File details

Details for the file grelu-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: grelu-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.10

File hashes

Hashes for grelu-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c9ec3f76ae5630cfb691963b5e0e3b5c58e04c47694010e08b88eb652934e521
MD5 1766fc67e6851ba8703cc764e711043a
BLAKE2b-256 a1772065f5e0e3641b0441e0c314d37207dc3567627e5dba730918183b81a86e

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