Metadata-Version: 2.1
Name: gReLU
Version: 1.0.3.post1.dev0
Summary: gReLU is a python library to train, interpret, and apply deep learning models to DNA sequences
Home-page: https://code.roche.com/gred-rb-ai-ml-regulatory-genomics/grelu
Author: lal.avantika,eraslan.gokcen
Author-email: lal.avantika@gene.com
License: MIT
Project-URL: Documentation, https://code.roche.com/gred-rb-ai-ml-regulatory-genomics/grelu
Project-URL: Source, https://code.roche.com/gred-rb-ai-ml-regulatory-genomics/grelu
Platform: Linux
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8
License-File: LICENSE.txt
Requires-Dist: importlib-metadata
Requires-Dist: importlib-resources
Requires-Dist: wandb >=0.14
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: seaborn
Requires-Dist: matplotlib
Requires-Dist: plotnine >=0.8
Requires-Dist: anndata >=0.8
Requires-Dist: scikit-learn
Requires-Dist: torch >=2.0
Requires-Dist: pytorch-lightning >=2.0
Requires-Dist: torchmetrics >=1.1
Requires-Dist: modisco-lite >=2.2.1
Requires-Dist: biopython
Requires-Dist: enformer-pytorch
Requires-Dist: genomepy
Requires-Dist: bioframe >=0.4
Requires-Dist: captum ==0.5.0
Requires-Dist: logomaker >=0.8
Requires-Dist: pyBigWig
Requires-Dist: ledidi
Requires-Dist: tangermeme
Requires-Dist: pygenomeviz <=0.4.4
Provides-Extra: testing
Requires-Dist: setuptools ; extra == 'testing'
Requires-Dist: pytest ; extra == 'testing'
Requires-Dist: pytest-cov ; extra == 'testing'

# gReLU

gReLU is a Python library to train, interpret, and apply deep learning models to DNA sequences. Code documentation is available [here](https://genentech.github.io/gReLU/).

![Flowchart](media/flowchart.jpg)

## Installation

To install from source:

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

To install using pip:

```shell
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](https://github.com/Dao-AILab/flash-attention) needs to be installed first:
```shell
conda install -c conda-forge cudatoolkit-dev -y
pip install torch ninja
pip install flash-attn --no-build-isolation
pip install gReLU
```

## Contributing

This project uses [pre-commit](https://pre-commit.com/). Please make sure to install it before making any changes:

```shell
pip install pre-commit
cd gReLU
pre-commit install
```

It is a good idea to update the hooks to the latest version:

```shell
pre-commit autoupdate
```

## 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:

```shell
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:

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

## Citation

Please cite our preprint: https://www.biorxiv.org/content/10.1101/2024.09.18.613778v1
