SEAM: Meta-explanations for interpreting sequence-based deep learning models
Project description
SEAM: systematic explanation of attribution-based mechanisms for regulatory genomics
SEAM (Systematic Explanation of Attribution-based for Mechanisms) is a Python suite to use meta-explanations to interpret sequence-based deep learning models for regulatory genomics data. For installation instructions, tutorials, and documentation, please refer to the SEAM website, https://seam-nn.readthedocs.io/. For an extended discussion of this approach and its applications, please refer to our paper:
- Seitz, E.E., McCandlish, D.M., Kinney, J.B., and Koo P.K. Deciphering the determinants of mechanistic variation in regulatory sequences. bioRxiv (2025). (unpublished)
Installation:
With Anaconda sourced, create a new environment via the command line:
conda create --name seam
Next, activate this environment via conda activate seam
, and install the following packages:
pip install seam-nn
Finally, when you are done using the environment, always exit via conda deactivate
.
Notes
SEAM has been tested on Mac and Linux operating systems. Typical installation time on a normal computer is less than 1 minute.
If you have any issues installing SEAM, please see:
- https://seam-nn.readthedocs.io/en/latest/installation.html
- https://github.com/evanseitz/seam-nn/issues
For issues installing SQUID, the package used for sequence generation and inference, please see:
- https://squid-nn.readthedocs.io/en/latest/installation.html
- https://github.com/evanseitz/squid-nn/issues
Older DNNs that require inference via Tensorflow 1.x or related packages may be in conflict with SEAM defaults. Users will need to run SEAM piecewise within separate environments:
- Tensorflow 1.x environment for generating in silico sequence-function-mechanism dataset
- Tensorflow 2.x environment for applying SEAM to explain in silico sequence-function-mechanism dataset
Usage:
SEAM provides a simple interface that takes as input a sequence-based oracle (e.g., a genomic DNN), which is used to generate an in silico sequence-function-mechanism dataset representing a localized region of sequence space. SEAM uses a meta-explanation framework to interpret the in silico sequence-function-mechanism dataset, deciphering the determinants of mechanistic variation in regulatory sequences.
Examples
Google Colab examples for applying SEAM on previously-published deep learning models are available at the links below.
Note: Due to memory requirements for calculating distance matrices, Colab Pro may be required for examples using hierarchical clustering with their current settings.
- Local library to annotate all TFBSs and biophysical states
- DeepSTARR: Enhancer 20647 (Fig.2a)
- Local library with 30k sequences and 10% mutation rate | Integrated gradients; hierarchical clustering
- Expected run time: ~3.2 minutes on Colab A100 GPU
- Local library to explore mechanism space of an enhancer TFBS
- DeepSTARR: Enhancer 13748 (Fig.1)
- Local library with 100k sequence and 10% mutation rate | Saliency maps; UMAP with K-Means clustering
- Expected run time: ~3.9 minutes on Colab A100 GPU
- Local library to reveal low-affinity motifs using background separation
- DeepSTARR: Enhancer 4071 (Fig.TBD)
- Local library with 60k sequences and 10% mutation rate | Integrated gradients; hierarchical clustering
- Expected run time: ~9.3 minutes on Colab A100 GPU
- Combinatorial-complete library with empirical mutagenesis maps
- PBM: Zfp187 (Fig.TBD)
- Combinatorial-complete library with 65,536 sequences | ISM; Hierarchical clustering
- Expected run time: ~12 minutes on Colab A100 GPU
- Combinatorial-complete library with interactive mechanism space viewer
- PBM: Hnf4a (Fig.TBD)
- Combinatorial-complete library with 65,536 sequences | ISM; UMAP with K-Means clustering
- Expected run time: ~4.9 minutes on Colab A100 GPU
- Global library to compare mechanistic heterogeneity of an enhancer TFBS
- DeepSTARR: CREB/ATF (Fig.TBD)
- Global library with 100k sequences | Saliency maps: UMAP with K-Means clustering
- Expected run time: ~3.2 minutes on Colab A100 GPU
- Global library to compare mechanisms across different developmental programs
- DeepSTARR: DRE (Fig.TBD)
- Global library with 100k sequences | Saliency maps; UMAP with K-Means clustering
- Expected run time: ~2.7 minutes on Colab A100 GPU
- Global library to compare mechanisms associated with genomic and synthetic TFBSs
- DeepSTARR: AP-1 (Fig.TBD)
- Global library with 100k sequences | Integrated gradients; UMAP with K-Means clustering
- Expected run time: ~3.9 minutes on Colab A100 GPU
Python script examples are provided in the examples
folder for locally running SEAM and exporting outputs to file. Additional dependencies for these examples may be required and outlined at the top of each script.
GUI:
A graphic user interface (GUI) is available for dynamically interpretting SEAM results. The GUI can be run using the command line interface from the seam
folder via python seam_gui.py
. The SEAM GUI requires pre-computed inputs that can be saved using the example scripts above.
Citation:
If this code is useful in your work, please cite our paper.
bibtex TODO
License:
Copyright (C) 2023–2025 Evan Seitz, David McCandlish, Justin Kinney, Peter Koo
The software, code sample and their documentation made available on this website could include technical or other mistakes, inaccuracies or typographical errors. We may make changes to the software or documentation made available on its web site at any time without prior notice. We assume no responsibility for errors or omissions in the software or documentation available from its web site. For further details, please see the LICENSE file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file seam_nn-0.5.4.tar.gz
.
File metadata
- Download URL: seam_nn-0.5.4.tar.gz
- Upload date:
- Size: 96.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
ea4cdde32cc8897d8df6aa288ef6cd9da880ebfae2c347c107814add4a207d4b
|
|
MD5 |
7289783c281639cc7eb1cfd3262d5a62
|
|
BLAKE2b-256 |
fa932c88a56c90e9a55c51b89b145ae6b0d49ce273d4341af1dcfc812b62d87a
|
File details
Details for the file seam_nn-0.5.4-py3-none-any.whl
.
File metadata
- Download URL: seam_nn-0.5.4-py3-none-any.whl
- Upload date:
- Size: 108.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
8f3e6f925f3314e82092e81e2292ec7fd4ee8acca7b6f3f1d3b3a1ee25b3cefb
|
|
MD5 |
93ee9b40fd66efda027bd1befa109f48
|
|
BLAKE2b-256 |
bf0bcaef1f480c6d82729175d5a21c0cf4c325a15a7bcf572873d7b9e469d404
|