dmsroute 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dmsroute-0.1.2/.gitignore +218 -0
- dmsroute-0.1.2/CHANGELOG.md +9 -0
- dmsroute-0.1.2/CITATION.cff +33 -0
- dmsroute-0.1.2/DEVELOPMENT.md +138 -0
- dmsroute-0.1.2/LICENSE +21 -0
- dmsroute-0.1.2/PKG-INFO +285 -0
- dmsroute-0.1.2/README.md +252 -0
- dmsroute-0.1.2/dmsroute/__init__.py +249 -0
- dmsroute-0.1.2/dmsroute/_version.py +3 -0
- dmsroute-0.1.2/dmsroute/acquisition/__init__.py +0 -0
- dmsroute-0.1.2/dmsroute/acquisition/cache.py +475 -0
- dmsroute-0.1.2/dmsroute/acquisition/cache_inventory.py +984 -0
- dmsroute-0.1.2/dmsroute/acquisition/fetch.py +67 -0
- dmsroute-0.1.2/dmsroute/acquisition/io.py +513 -0
- dmsroute-0.1.2/dmsroute/builders.py +804 -0
- dmsroute-0.1.2/dmsroute/catalog.py +258 -0
- dmsroute-0.1.2/dmsroute/cli.py +1841 -0
- dmsroute-0.1.2/dmsroute/config.py +288 -0
- dmsroute-0.1.2/dmsroute/core/__init__.py +0 -0
- dmsroute-0.1.2/dmsroute/core/_dataset.py +159 -0
- dmsroute-0.1.2/dmsroute/core/_wildtype.py +342 -0
- dmsroute-0.1.2/dmsroute/core/constants.py +120 -0
- dmsroute-0.1.2/dmsroute/core/exceptions.py +114 -0
- dmsroute-0.1.2/dmsroute/core/parsing.py +564 -0
- dmsroute-0.1.2/dmsroute/core/transforms.py +276 -0
- dmsroute-0.1.2/dmsroute/core/types.py +83 -0
- dmsroute-0.1.2/dmsroute/core/validation.py +410 -0
- dmsroute-0.1.2/dmsroute/downloads.py +1700 -0
- dmsroute-0.1.2/dmsroute/pipeline.py +587 -0
- dmsroute-0.1.2/dmsroute/sources/__init__.py +71 -0
- dmsroute-0.1.2/dmsroute/sources/_dataset_adapter.py +63 -0
- dmsroute-0.1.2/dmsroute/sources/_mavedb_snapshot_dataset.py +156 -0
- dmsroute-0.1.2/dmsroute/sources/mavedb.py +100 -0
- dmsroute-0.1.2/dmsroute/sources/mavedb_bulk_catalog.py +606 -0
- dmsroute-0.1.2/dmsroute/sources/mavedb_catalog.py +158 -0
- dmsroute-0.1.2/dmsroute/sources/mavedb_snapshot_tables.py +1202 -0
- dmsroute-0.1.2/dmsroute/sources/mavedb_snapshots.py +838 -0
- dmsroute-0.1.2/dmsroute/sources/proteingym.py +100 -0
- dmsroute-0.1.2/dmsroute/sources/proteingym_catalog.py +246 -0
- dmsroute-0.1.2/dmsroute/sources/proteingym_resources.py +130 -0
- dmsroute-0.1.2/examples/01_quickstart_proteingym.ipynb +85 -0
- dmsroute-0.1.2/examples/02_quickstart_mavedb_download.ipynb +85 -0
- dmsroute-0.1.2/examples/03_variant_parsing_and_reconstruction.ipynb +90 -0
- dmsroute-0.1.2/examples/04_transforms_and_pseudo_labels.ipynb +78 -0
- dmsroute-0.1.2/examples/config.reference.yml +110 -0
- dmsroute-0.1.2/examples/pipeline.yml +28 -0
- dmsroute-0.1.2/pyproject.toml +82 -0
- dmsroute-0.1.2/tests/__init__.py +1 -0
- dmsroute-0.1.2/tests/_factories.py +29 -0
- dmsroute-0.1.2/tests/conftest.py +69 -0
- dmsroute-0.1.2/tests/test_builders.py +919 -0
- dmsroute-0.1.2/tests/test_cache.py +339 -0
- dmsroute-0.1.2/tests/test_cache_inventory.py +885 -0
- dmsroute-0.1.2/tests/test_catalog.py +570 -0
- dmsroute-0.1.2/tests/test_cli.py +3439 -0
- dmsroute-0.1.2/tests/test_config.py +319 -0
- dmsroute-0.1.2/tests/test_downloads.py +2377 -0
- dmsroute-0.1.2/tests/test_fetch.py +298 -0
- dmsroute-0.1.2/tests/test_io.py +605 -0
- dmsroute-0.1.2/tests/test_logging.py +356 -0
- dmsroute-0.1.2/tests/test_mavedb_bulk_catalog.py +630 -0
- dmsroute-0.1.2/tests/test_mavedb_snapshot_tables.py +1198 -0
- dmsroute-0.1.2/tests/test_mavedb_snapshots.py +823 -0
- dmsroute-0.1.2/tests/test_metadata_only.py +389 -0
- dmsroute-0.1.2/tests/test_parsing.py +413 -0
- dmsroute-0.1.2/tests/test_pipeline.py +810 -0
- dmsroute-0.1.2/tests/test_proteingym_indel_builder.py +420 -0
- dmsroute-0.1.2/tests/test_proteingym_indel_downloads.py +300 -0
- dmsroute-0.1.2/tests/test_proteingym_indel_pipeline.py +379 -0
- dmsroute-0.1.2/tests/test_source_config.py +663 -0
- dmsroute-0.1.2/tests/test_sources.py +254 -0
- dmsroute-0.1.2/tests/test_transforms.py +359 -0
- dmsroute-0.1.2/tests/test_validation.py +237 -0
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
#uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
#poetry.lock
|
|
109
|
+
#poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
#pdm.lock
|
|
116
|
+
#pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
#pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# SageMath parsed files
|
|
135
|
+
*.sage.py
|
|
136
|
+
|
|
137
|
+
# Environments
|
|
138
|
+
.env
|
|
139
|
+
.envrc
|
|
140
|
+
.venv
|
|
141
|
+
env/
|
|
142
|
+
venv/
|
|
143
|
+
ENV/
|
|
144
|
+
env.bak/
|
|
145
|
+
venv.bak/
|
|
146
|
+
|
|
147
|
+
# Spyder project settings
|
|
148
|
+
.spyderproject
|
|
149
|
+
.spyproject
|
|
150
|
+
|
|
151
|
+
# Rope project settings
|
|
152
|
+
.ropeproject
|
|
153
|
+
|
|
154
|
+
# mkdocs documentation
|
|
155
|
+
/site
|
|
156
|
+
|
|
157
|
+
# mypy
|
|
158
|
+
.mypy_cache/
|
|
159
|
+
.dmypy.json
|
|
160
|
+
dmypy.json
|
|
161
|
+
|
|
162
|
+
# Pyre type checker
|
|
163
|
+
.pyre/
|
|
164
|
+
|
|
165
|
+
# pytype static type analyzer
|
|
166
|
+
.pytype/
|
|
167
|
+
|
|
168
|
+
# Cython debug symbols
|
|
169
|
+
cython_debug/
|
|
170
|
+
|
|
171
|
+
# PyCharm
|
|
172
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
173
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
174
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
175
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
176
|
+
#.idea/
|
|
177
|
+
|
|
178
|
+
# Abstra
|
|
179
|
+
# Abstra is an AI-powered process automation framework.
|
|
180
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
181
|
+
# Learn more at https://abstra.io/docs
|
|
182
|
+
.abstra/
|
|
183
|
+
|
|
184
|
+
# Visual Studio Code
|
|
185
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
186
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
188
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
189
|
+
# .vscode/
|
|
190
|
+
|
|
191
|
+
# Ruff stuff:
|
|
192
|
+
.ruff_cache/
|
|
193
|
+
|
|
194
|
+
# PyPI configuration file
|
|
195
|
+
.pypirc
|
|
196
|
+
|
|
197
|
+
# Cursor
|
|
198
|
+
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
199
|
+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
200
|
+
# refer to https://docs.cursor.com/context/ignore-files
|
|
201
|
+
.cursorignore
|
|
202
|
+
.cursorindexingignore
|
|
203
|
+
|
|
204
|
+
# Marimo
|
|
205
|
+
marimo/_static/
|
|
206
|
+
marimo/_lsp/
|
|
207
|
+
__marimo__/
|
|
208
|
+
|
|
209
|
+
data/
|
|
210
|
+
datasets/
|
|
211
|
+
cache/
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
*.diff
|
|
215
|
+
|
|
216
|
+
# Local repository archives
|
|
217
|
+
/DMSRoute-v*.zip
|
|
218
|
+
/dms-parser.zip
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to DMSRoute are recorded here. Versions follow [Semantic Versioning](https://semver.org/).
|
|
4
|
+
|
|
5
|
+
## 0.1.2
|
|
6
|
+
|
|
7
|
+
- First release on PyPI (`pip install dmsroute`).
|
|
8
|
+
- `dmsroute.__version__` exposes the package version.
|
|
9
|
+
- Requires Python 3.11 or newer (Python 3.10 reached end of life).
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use this software, please cite it as below."
|
|
3
|
+
title: "DMSRoute"
|
|
4
|
+
abstract: "Utilities for acquiring, parsing, validating, harmonizing, and standardizing DMS datasets from MaveDB and ProteinGym."
|
|
5
|
+
type: software
|
|
6
|
+
license: "MIT"
|
|
7
|
+
url: "https://github.com/kren-ai-lab/dms-route"
|
|
8
|
+
authors:
|
|
9
|
+
- family-names: "Fernández-Villegas"
|
|
10
|
+
given-names: "Diego"
|
|
11
|
+
affiliation: "Universidad de Magallanes"
|
|
12
|
+
- family-names: "Escobedo"
|
|
13
|
+
given-names: "Sebastián"
|
|
14
|
+
affiliation: "Universidad de Magallanes"
|
|
15
|
+
- family-names: "Alarcón"
|
|
16
|
+
given-names: "Tomás"
|
|
17
|
+
affiliation: "Universidad de Magallanes"
|
|
18
|
+
- family-names: "Medina-Ortiz"
|
|
19
|
+
given-names: "David"
|
|
20
|
+
affiliation: "Universidad de Magallanes"
|
|
21
|
+
repository-code: "https://github.com/kren-ai-lab/dms-route"
|
|
22
|
+
keywords:
|
|
23
|
+
- "deep mutational scanning"
|
|
24
|
+
- "data harmonization"
|
|
25
|
+
- "DMS datasets"
|
|
26
|
+
- "MaveDB"
|
|
27
|
+
- "ProteinGym"
|
|
28
|
+
- "bioinformatics"
|
|
29
|
+
- "protein"
|
|
30
|
+
identifiers:
|
|
31
|
+
- type: doi
|
|
32
|
+
value: 10.5281/zenodo.21924522
|
|
33
|
+
description: "Concept DOI (all versions)"
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Development Guide
|
|
2
|
+
|
|
3
|
+
This project is the `DMSRoute` Python package and command-line interface for acquiring, parsing, validating, harmonizing, and standardizing DMS datasets from MaveDB and ProteinGym.
|
|
4
|
+
|
|
5
|
+
## Requirements
|
|
6
|
+
|
|
7
|
+
The project currently declares:
|
|
8
|
+
|
|
9
|
+
- Python `>=3.11`
|
|
10
|
+
- core runtime dependencies in `pyproject.toml`
|
|
11
|
+
- the `dev` extra includes `pytest>=8.0`
|
|
12
|
+
|
|
13
|
+
## Development installation
|
|
14
|
+
|
|
15
|
+
Create a virtual environment and install the project in editable mode:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
python -m venv .venv
|
|
19
|
+
# Linux/macOS
|
|
20
|
+
. .venv/bin/activate
|
|
21
|
+
# Windows PowerShell
|
|
22
|
+
# .\.venv\Scripts\Activate.ps1
|
|
23
|
+
python -m pip install --upgrade pip
|
|
24
|
+
python -m pip install -e ".[dev]"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
This uses the repository's actual editable-install workflow and dev extra.
|
|
28
|
+
|
|
29
|
+
## Repository architecture
|
|
30
|
+
|
|
31
|
+
The package lives directly at the repository root as `dmsroute/`.
|
|
32
|
+
|
|
33
|
+
- root-level orchestration modules: `builders.py`, `catalog.py`, `config.py`, `downloads.py`, `pipeline.py`, and `cli.py`
|
|
34
|
+
- `dmsroute/core/`: parsing, validation, transformation, and domain primitives
|
|
35
|
+
- `dmsroute/acquisition/`: cache, fetch, and I/O infrastructure
|
|
36
|
+
- `dmsroute/sources/`: MaveDB and ProteinGym source-specific adapters and catalogs
|
|
37
|
+
- `tests/`: automated regression and behavior tests
|
|
38
|
+
- `examples/`: usage examples and notebooks
|
|
39
|
+
|
|
40
|
+
## Testing
|
|
41
|
+
|
|
42
|
+
Run the full suite:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pytest -q
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Run a focused test file:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
pytest -q tests/test_parsing.py
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Run one focused test:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pytest -q tests/test_parsing.py -k hgvs_to_sequence
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Run dependency validation:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
python -m pip check
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Run compile checking:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
python -m compileall -q dmsroute tests examples
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## CLI smoke testing
|
|
73
|
+
|
|
74
|
+
The supported public CLI entry point is `dmsroute`.
|
|
75
|
+
|
|
76
|
+
Use the following commands:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
dmsroute --help
|
|
80
|
+
dmsroute download --help
|
|
81
|
+
dmsroute download-many --help
|
|
82
|
+
dmsroute run --help
|
|
83
|
+
dmsroute snapshot --help
|
|
84
|
+
dmsroute cache --help
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
`python -m dmsroute.cli` is intentionally not a supported public invocation and is not documented as such.
|
|
88
|
+
|
|
89
|
+
## External access policy
|
|
90
|
+
|
|
91
|
+
Unit tests should not depend on live MaveDB, ProteinGym, Zenodo, or other external services.
|
|
92
|
+
|
|
93
|
+
Use offline deterministic tests unless a specific test is designed to exercise an external integration path intentionally.
|
|
94
|
+
|
|
95
|
+
## Packaging validation
|
|
96
|
+
|
|
97
|
+
For release-oriented checks, use the repository's current packaging workflow:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
python -m build --sdist --wheel
|
|
101
|
+
python -m twine check --strict dist/*
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Optional clean-install validation:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
python -m venv /tmp/dmsroute-check
|
|
108
|
+
# activate the temporary environment and install the built wheel
|
|
109
|
+
python -m pip install dist/dmsroute-*-py3-none-any.whl
|
|
110
|
+
python -m pip check
|
|
111
|
+
dmsroute --help
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Do not add or require `uv.lock` for normal development.
|
|
115
|
+
|
|
116
|
+
## Contribution and change principles
|
|
117
|
+
|
|
118
|
+
- Source adapters should keep source-specific behavior inside `dmsroute/sources/`.
|
|
119
|
+
- Generic acquisition logic belongs in `dmsroute/acquisition/`.
|
|
120
|
+
- Generic parsing, validation, and domain logic belongs in `dmsroute/core/`.
|
|
121
|
+
- Orchestration remains in the root-level facade modules.
|
|
122
|
+
- Changes to standardized data contracts require explicit tests.
|
|
123
|
+
- Avoid unrelated cleanup while implementing a requested change.
|
|
124
|
+
|
|
125
|
+
## Release checklist
|
|
126
|
+
|
|
127
|
+
Before tagging or publishing a release candidate, confirm:
|
|
128
|
+
|
|
129
|
+
- worktree is clean
|
|
130
|
+
- full test suite passes
|
|
131
|
+
- `python -m pip check` passes
|
|
132
|
+
- project builds successfully
|
|
133
|
+
- `twine check --strict` passes
|
|
134
|
+
- clean install succeeds in a temporary environment
|
|
135
|
+
- CLI smoke checks pass
|
|
136
|
+
- `dmsroute/_version.py` and `CHANGELOG.md` are updated
|
|
137
|
+
- tag only after all checks pass; pushing a `v*` tag publishes to PyPI through `.github/workflows/publish-pypi.yml`
|
|
138
|
+
|
dmsroute-0.1.2/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DMSRoute contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
dmsroute-0.1.2/PKG-INFO
ADDED
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: dmsroute
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: Utilities for acquiring, parsing, validating, harmonizing, and standardizing DMS datasets from MaveDB and ProteinGym.
|
|
5
|
+
Project-URL: Homepage, https://github.com/kren-ai-lab/dms-route
|
|
6
|
+
Project-URL: Repository, https://github.com/kren-ai-lab/dms-route
|
|
7
|
+
Project-URL: Issues, https://github.com/kren-ai-lab/dms-route/issues
|
|
8
|
+
Project-URL: Documentation, https://github.com/kren-ai-lab/dms-route#readme
|
|
9
|
+
Author: Diego Fernández-Villegas, Sebastián Escobedo, Tomás Alarcón, David Medina-Ortiz
|
|
10
|
+
Maintainer: Diego Fernández-Villegas, Sebastián Escobedo, Tomás Alarcón, David Medina-Ortiz
|
|
11
|
+
License-Expression: MIT
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Keywords: bioinformatics,data-harmonization,deep-mutational-scanning,dms,mavedb,protein,proteingym
|
|
14
|
+
Classifier: Development Status :: 4 - Beta
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
23
|
+
Requires-Python: >=3.11
|
|
24
|
+
Requires-Dist: numpy>=1.24
|
|
25
|
+
Requires-Dist: pandas>=2.0
|
|
26
|
+
Requires-Dist: pyarrow>=15.0
|
|
27
|
+
Requires-Dist: pyyaml>=6.0
|
|
28
|
+
Requires-Dist: requests>=2.31
|
|
29
|
+
Requires-Dist: typer<0.28,>=0.27.1
|
|
30
|
+
Provides-Extra: dev
|
|
31
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
32
|
+
Description-Content-Type: text/markdown
|
|
33
|
+
|
|
34
|
+
# DMSRoute
|
|
35
|
+
|
|
36
|
+
[](https://pypi.org/project/dmsroute/)
|
|
37
|
+
[](https://github.com/kren-ai-lab/dms-route)
|
|
38
|
+
[](https://github.com/kren-ai-lab/dms-route/actions/workflows/ci.yml)
|
|
39
|
+

|
|
40
|
+
[](https://doi.org/10.5281/zenodo.21924522)
|
|
41
|
+
|
|
42
|
+
DMSRoute obtains and standardizes Deep Mutational Scanning (DMS) datasets
|
|
43
|
+
from ProteinGym and MaveDB. It provides a command-line interface, a Python API,
|
|
44
|
+
and a YAML pipeline for producing consistent datasets from source-specific
|
|
45
|
+
tables and metadata.
|
|
46
|
+
|
|
47
|
+
The project name is DMSRoute. The distribution, Python package, and console
|
|
48
|
+
command are named `dmsroute`.
|
|
49
|
+
|
|
50
|
+
Supported sources:
|
|
51
|
+
|
|
52
|
+
- ProteinGym substitution and indel datasets, identified by canonical
|
|
53
|
+
`DMS_id` values.
|
|
54
|
+
- MaveDB score sets, identified by permanent score-set URNs and acquired from
|
|
55
|
+
the public API or a fixed bulk snapshot.
|
|
56
|
+
|
|
57
|
+
## Installation
|
|
58
|
+
|
|
59
|
+
DMSRoute requires Python 3.11 or newer.
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
pip install dmsroute
|
|
63
|
+
# or with uv:
|
|
64
|
+
uv add dmsroute
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Check the installation with:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
dmsroute --help
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Development setup and validation commands are documented in
|
|
74
|
+
[`DEVELOPMENT.md`](https://github.com/kren-ai-lab/dms-route/blob/main/DEVELOPMENT.md).
|
|
75
|
+
|
|
76
|
+
## Quick start
|
|
77
|
+
|
|
78
|
+
Inspect a MaveDB score set:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
dmsroute metadata \
|
|
82
|
+
--source mavedb \
|
|
83
|
+
--dataset-id urn:mavedb:00000001-a-4
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Download and standardize it:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
dmsroute download \
|
|
90
|
+
--source mavedb \
|
|
91
|
+
--dataset-id urn:mavedb:00000001-a-4 \
|
|
92
|
+
--output-dir datasets/ube2i
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
ProteinGym uses canonical `DMS_id` values:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
dmsroute list --source proteingym --query BRCA1 --limit 10
|
|
99
|
+
|
|
100
|
+
dmsroute download \
|
|
101
|
+
--source proteingym \
|
|
102
|
+
--dataset-id BRCA1_HUMAN_Findlay_2018 \
|
|
103
|
+
--output-dir datasets/brca1
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
ProteinGym substitutions are selected by default. Use `--variant-type indels`
|
|
107
|
+
for the indel resource.
|
|
108
|
+
|
|
109
|
+
## CLI
|
|
110
|
+
|
|
111
|
+
The main commands are:
|
|
112
|
+
|
|
113
|
+
| Command | Purpose |
|
|
114
|
+
| --- | --- |
|
|
115
|
+
| `dmsroute list` | Search a ProteinGym or MaveDB catalog |
|
|
116
|
+
| `dmsroute metadata` | Retrieve metadata for one dataset |
|
|
117
|
+
| `dmsroute download` | Download and standardize one dataset |
|
|
118
|
+
| `dmsroute download-many` | Process several datasets from one source |
|
|
119
|
+
| `dmsroute run` | Run a YAML pipeline |
|
|
120
|
+
| `dmsroute discover` | Search a fixed local MaveDB snapshot |
|
|
121
|
+
| `dmsroute snapshot` | Fetch snapshots or extract archival tables |
|
|
122
|
+
| `dmsroute cache` | Inspect the local cache without modifying it |
|
|
123
|
+
|
|
124
|
+
Each command provides its complete options through `--help`.
|
|
125
|
+
|
|
126
|
+
For example, a batch can be specified with repeated identifiers:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
dmsroute download-many \
|
|
130
|
+
--source proteingym \
|
|
131
|
+
--dataset-id BRCA1_HUMAN_Findlay_2018 \
|
|
132
|
+
--dataset-id PTEN_HUMAN_Mighell_2018 \
|
|
133
|
+
--output-dir datasets
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Source artifacts are cached under `~/.cache/dmsroute` by default. Use
|
|
137
|
+
`--cache-dir` to select another location.
|
|
138
|
+
|
|
139
|
+
## MaveDB acquisition
|
|
140
|
+
|
|
141
|
+
### API
|
|
142
|
+
|
|
143
|
+
API acquisition is the default for MaveDB catalog, metadata, and download
|
|
144
|
+
commands. It retrieves the current score-set metadata and scores for a
|
|
145
|
+
permanent URN.
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
dmsroute download \
|
|
149
|
+
--source mavedb \
|
|
150
|
+
--dataset-id urn:mavedb:00000001-a-4 \
|
|
151
|
+
--output-dir datasets/ube2i
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Snapshot
|
|
155
|
+
|
|
156
|
+
Bulk snapshots are versioned Zenodo records. Snapshot acquisition is explicit
|
|
157
|
+
and requires the selected record to be present in the local cache.
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
dmsroute snapshot fetch --record 20840937
|
|
161
|
+
|
|
162
|
+
dmsroute discover \
|
|
163
|
+
--snapshot 20840937 \
|
|
164
|
+
--query BRCA1
|
|
165
|
+
|
|
166
|
+
dmsroute download \
|
|
167
|
+
--source mavedb \
|
|
168
|
+
--dataset-id urn:mavedb:00000001-a-4 \
|
|
169
|
+
--acquisition snapshot \
|
|
170
|
+
--snapshot-record 20840937 \
|
|
171
|
+
--output-dir datasets/ube2i-snapshot
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
`dmsroute snapshot extract` extracts raw score and count tables. Snapshot
|
|
175
|
+
standardization is available through `download` and `download-many`; the YAML
|
|
176
|
+
pipeline uses the MaveDB API.
|
|
177
|
+
|
|
178
|
+
## Configuration
|
|
179
|
+
|
|
180
|
+
Run a configured pipeline with:
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
dmsroute run --config examples/pipeline.yml
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
A configuration may contain ProteinGym, MaveDB, or both:
|
|
187
|
+
|
|
188
|
+
```yaml
|
|
189
|
+
proteingym:
|
|
190
|
+
resource: dms_substitutions
|
|
191
|
+
dir_base: datasets/proteingym
|
|
192
|
+
datasets:
|
|
193
|
+
- dataset_id: BLAT_ECOLX_Jacquier_2013
|
|
194
|
+
|
|
195
|
+
mavedb:
|
|
196
|
+
dir_base: datasets/mavedb
|
|
197
|
+
datasets:
|
|
198
|
+
- dataset_id: "urn:mavedb:00000001-a-4"
|
|
199
|
+
|
|
200
|
+
output:
|
|
201
|
+
summary_dir: datasets/summaries
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Use `--only proteingym` or `--only mavedb` to select one configured source.
|
|
205
|
+
`--dry-run` resolves configuration and source metadata without writing
|
|
206
|
+
processed datasets. The full configuration contract is documented in
|
|
207
|
+
[`examples/config.reference.yml`](https://github.com/kren-ai-lab/dms-route/blob/main/examples/config.reference.yml).
|
|
208
|
+
|
|
209
|
+
## Output
|
|
210
|
+
|
|
211
|
+
A successful `download` writes one dataset bundle:
|
|
212
|
+
|
|
213
|
+
```text
|
|
214
|
+
output-directory/
|
|
215
|
+
|-- standardized.csv
|
|
216
|
+
|-- summary.csv
|
|
217
|
+
`-- summary.json
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
The standardized table preserves source columns and adds common dataset,
|
|
221
|
+
variant, sequence, score, and row-status fields. Source scores are copied to
|
|
222
|
+
`score_raw`; score transformations are opt-in.
|
|
223
|
+
|
|
224
|
+
`download-many` also writes `download-summary.csv` and
|
|
225
|
+
`download-summary.json` at the batch root. YAML pipelines write processed CSV
|
|
226
|
+
files under each source directory and combined summaries under
|
|
227
|
+
`output.summary_dir`.
|
|
228
|
+
|
|
229
|
+
## Python API
|
|
230
|
+
|
|
231
|
+
The same download workflow is available from Python:
|
|
232
|
+
|
|
233
|
+
```python
|
|
234
|
+
from pathlib import Path
|
|
235
|
+
|
|
236
|
+
from dmsroute import FilesystemCache, download_and_standardize_dataset
|
|
237
|
+
|
|
238
|
+
cache = FilesystemCache(Path.home() / ".cache" / "dmsroute")
|
|
239
|
+
result = download_and_standardize_dataset(
|
|
240
|
+
"mavedb",
|
|
241
|
+
"urn:mavedb:00000001-a-4",
|
|
242
|
+
output_dir="datasets/ube2i",
|
|
243
|
+
cache=cache,
|
|
244
|
+
)
|
|
245
|
+
|
|
246
|
+
print(result.dataset_path)
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
Local tables can be standardized with `build_proteingym_dataset`,
|
|
250
|
+
`build_proteingym_indel_dataset`, and `build_mavedb_dataset`.
|
|
251
|
+
|
|
252
|
+
## Documentation
|
|
253
|
+
|
|
254
|
+
- [`examples/`](https://github.com/kren-ai-lab/dms-route/tree/main/examples) contains notebooks for acquisition, parsing, and
|
|
255
|
+
score transformations.
|
|
256
|
+
- [`examples/config.reference.yml`](https://github.com/kren-ai-lab/dms-route/blob/main/examples/config.reference.yml) documents
|
|
257
|
+
every YAML option.
|
|
258
|
+
- [`DEVELOPMENT.md`](https://github.com/kren-ai-lab/dms-route/blob/main/DEVELOPMENT.md) covers development setup, architecture,
|
|
259
|
+
tests, and packaging checks.
|
|
260
|
+
- `dmsroute <command> --help` is the reference for CLI options.
|
|
261
|
+
|
|
262
|
+
## Citation
|
|
263
|
+
|
|
264
|
+
If you use DMSRoute in your research, please cite:
|
|
265
|
+
|
|
266
|
+
> Fernández-Villegas, D.; Escobedo, S.; Alarcón, T.; Medina-Ortiz, D.
|
|
267
|
+
> *DMSRoute*.
|
|
268
|
+
> Version 0.1.2, 2026. Zenodo.
|
|
269
|
+
> https://doi.org/10.5281/zenodo.21924522
|
|
270
|
+
|
|
271
|
+
```bibtex
|
|
272
|
+
@software{dmsroute2026,
|
|
273
|
+
author = {Fernández-Villegas, Diego and Escobedo, Sebastián and Alarcón, Tomás and Medina-Ortiz, David},
|
|
274
|
+
title = {DMSRoute},
|
|
275
|
+
year = {2026},
|
|
276
|
+
version = {0.1.2},
|
|
277
|
+
publisher = {Zenodo},
|
|
278
|
+
doi = {10.5281/zenodo.21924522},
|
|
279
|
+
url = {https://doi.org/10.5281/zenodo.21924522}
|
|
280
|
+
}
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
## License
|
|
284
|
+
|
|
285
|
+
MIT. See [`LICENSE`](https://github.com/kren-ai-lab/dms-route/blob/main/LICENSE).
|