tangermeme
tangermeme is a Python package that implements the basic operations necessary to perform sophisticated genomic analyses using machine learning models. Essentially, tangermeme aims to implement everything except for the model that you’d like to use, including I/O, identifying matched region sets, altering sequences (e.g., inserting a motif or scrambling out a motif), running marginalization experiments, and annotating regions. These functions are meant to be used by themselves but also can easily be built on top of if you’d like to customize your analyses.
Another way of looking at tangermeme is that, if the MEME suite is meant to do sequence analyses when you have only biological sequences (or maybe priors derived from experimental data), tangermeme is meant to do sequence analyses when you have these sequences and a predictive machine learning model. How does motif discovery or annotation differ when you have attribution values highlighting nucleotides based on how important they are to the predictions? tangermeme extends classic MEME-suite-style analyses to handle attributions, and implements new methods that answer additional questions. The FIMO and TOMTOM tools themselves now live in memesuite-lite, where they can be used without a PyTorch dependency.
Installation
pip install tangermeme
Or, with uv:
uv add tangermeme
Optional extras:
tangermeme[docs]— install the Sphinx toolchain for building this documentation site locally.
Development install
Contributors should clone the repository and use uv to create a reproducible environment from uv.lock:
git clone https://github.com/jmschrei/tangermeme.git
cd tangermeme
uv sync --extra dev
uv run pytest -m "not cmd"
Claude Code Skill
tangermeme ships an Agent Skill for Claude Code that teaches the agent how to use the library correctly — the API contracts, the common footguns, and the multi-step workflows. It is bundled with the package, but because Claude Code does not scan installed Python packages you install it once into your personal skills directory:
tangermeme-install-skills
This copies the skill to ~/.claude/skills/tangermeme/, where it is available to Claude Code in every project (re-run with --force after upgrading to refresh it). Once installed, simply ask Claude Code to perform tangermeme tasks and the skill is consulted automatically. To instead point Claude Code at the bundled copy in place, set CLAUDE_SKILLS_PATH to the output of tangermeme-install-skills --print-path.
Thank You
No good project is done alone, and so I’d like to thank everyone who tested tangermeme, provided feedback, and contributed during the development process.
Contributions
Contributions are eagerly accepted! If you would like to contribute a feature then fork the main branch and be sure to run the tests before changing any code. Let us know what you want to do on the issue tracker just in case we’re already working on an implementation of something similar. Also, please don’t forget to add tests for any new functions.