seqgra: Principled Selection of Neural Network Architectures for Genomics Prediction Tasks
https://kkrismer.github.io/seqgra/
What is seqgra?
Sequence models based on deep neural networks have achieved state-of-the-art performance on regulatory genomics prediction tasks, such as chromatin accessibility and transcription factor binding. But despite their high accuracy, their contributions to a mechanistic understanding of the biology of regulatory elements is often hindered by the complexity of the predictive model and thus poor interpretability of its decision boundaries. To address this, we introduce seqgra, a deep learning pipeline that incorporates the rule-based simulation of biological sequence data and the training and evaluation of models, whose decision boundaries mirror the rules from the simulation process. The method can be used to (1) generate data under the assumption of a hypothesized model of genome regulation, (2) identify neural network architectures capable of recovering the rules of said model, and (3) analyze a model's predictive performance as a function of training set size, noise level, and the complexity of the rules behind the simulated data.
Installation
seqgra is a Python package that is part of PyPI, the package repositories behind pip.
To install seqgra with pip, run:
pip install seqgra
To install seqgra directly from this repository, run:
git clone https://github.com/gifford-lab/seqgra
cd seqgra
pip install .
System requirements
- Python 3.7 (or higher)
- R 3.5 (or higher)
- R package
ggplot23.3.0 (or higher) - R package
gridExtra2.3 (or higher) - R package
scales1.1.0 (or higher)
- R package
The tensorflow package is only required if TensorFlow models are used
and will not be automatically installed by pip install seqgra. Same is
true for packages torch and pytorch-ignite, which are only
required if PyTorch models are used.
R is a soft dependency, in the sense that it is used to create a number of plots (grammar-model-agreement plots, grammar heatmaps, and motif similarity matrix plots) and if not available, these plots will be skipped.
seqgra depends upon the Python package lxml, which in turn depends on system libraries that are not always present. On a Debian/Ubuntu machine you can satisfy those requirements using:
sudo apt-get install libxml2-dev libxslt-dev
Usage
Check out the following help pages:
- Usage examples: seqgra example analyses with data definitions and model definitions
- Command line utilities: argument descriptions for
seqgra,seqgras,seqgrae, andseqgraacommands - Data definition: detailed description of the data definition language that is used to formalize grammars
- Model definition: detailed description of the model definition language that is used to describe neural network architectures and hyperparameters for the optimizer, the loss, and the training process
- Simulators, Learners, Evaluators, Comparators: brief descriptions of the most important classes
- seqgra API reference: detailed description of the seqgra API
- Source code: seqgra source code repository on GitHub
Citation
If you use seqgra in your work, please cite:
seqgra: Principled Selection of Neural Network Architectures for Genomics Prediction Tasks
Konstantin Krismer, Jennifer Hammelman, and David K. Gifford
bioRxiv 2021.06.14.448415; DOI: https://doi.org/10.1101/2021.06.14.448415
Funding
We gratefully acknowledge funding from NIH grants 1R01HG008754 and 1R01NS109217.
Metadata
Release files for seqgra 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| seqgra-0.0.4.tar.gz | 116.6 kB | Without provenance | Details for seqgra-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| seqgra-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for seqgra-0.0.4-py3-none-any.whl |
Total release size: 296.2 kB
Release files / seqgra-0.0.4.tar.gz
| Download URL | seqgra-0.0.4.tar.gz |
|---|---|
| Size | 116.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f13d868fad51d1388a28f5de0a8d9e578a7370593bae1aa798f2dd6dc8744ee1
|
|
BLAKE2b-256 checksum How to use checksums |
4869b2fb1af341d52c9e572a5049b01f31a8c3985330ae6478942c2a2f2f76a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/0.0.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.10
|
Release files / seqgra-0.0.4-py3-none-any.whl
| Download URL | seqgra-0.0.4-py3-none-any.whl |
|---|---|
| Size | 179.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0751fc346e3276fcba6e8a6c68e0d3b4f1030421a9e2775b01fd55f0a6176567
|
|
BLAKE2b-256 checksum How to use checksums |
523e1b18b68dff0fdcb24865eea38f4fbbe8a4cb1191fd2dbcfd66dd368655b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/0.0.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.10
|
Security for seqgra 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.