dmsroute 0.1.2__py3-none-any.whl
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/__init__.py +249 -0
- dmsroute/_version.py +3 -0
- dmsroute/acquisition/__init__.py +0 -0
- dmsroute/acquisition/cache.py +475 -0
- dmsroute/acquisition/cache_inventory.py +984 -0
- dmsroute/acquisition/fetch.py +67 -0
- dmsroute/acquisition/io.py +513 -0
- dmsroute/builders.py +804 -0
- dmsroute/catalog.py +258 -0
- dmsroute/cli.py +1841 -0
- dmsroute/config.py +288 -0
- dmsroute/core/__init__.py +0 -0
- dmsroute/core/_dataset.py +159 -0
- dmsroute/core/_wildtype.py +342 -0
- dmsroute/core/constants.py +120 -0
- dmsroute/core/exceptions.py +114 -0
- dmsroute/core/parsing.py +564 -0
- dmsroute/core/transforms.py +276 -0
- dmsroute/core/types.py +83 -0
- dmsroute/core/validation.py +410 -0
- dmsroute/downloads.py +1700 -0
- dmsroute/pipeline.py +587 -0
- dmsroute/sources/__init__.py +71 -0
- dmsroute/sources/_dataset_adapter.py +63 -0
- dmsroute/sources/_mavedb_snapshot_dataset.py +156 -0
- dmsroute/sources/mavedb.py +100 -0
- dmsroute/sources/mavedb_bulk_catalog.py +606 -0
- dmsroute/sources/mavedb_catalog.py +158 -0
- dmsroute/sources/mavedb_snapshot_tables.py +1202 -0
- dmsroute/sources/mavedb_snapshots.py +838 -0
- dmsroute/sources/proteingym.py +100 -0
- dmsroute/sources/proteingym_catalog.py +246 -0
- dmsroute/sources/proteingym_resources.py +130 -0
- dmsroute-0.1.2.dist-info/METADATA +285 -0
- dmsroute-0.1.2.dist-info/RECORD +38 -0
- dmsroute-0.1.2.dist-info/WHEEL +4 -0
- dmsroute-0.1.2.dist-info/entry_points.txt +2 -0
- dmsroute-0.1.2.dist-info/licenses/LICENSE +21 -0
dmsroute/__init__.py
ADDED
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
"""Public API for dmsroute."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import logging
|
|
6
|
+
|
|
7
|
+
from dmsroute._version import __version__
|
|
8
|
+
from dmsroute.builders import (
|
|
9
|
+
build_mavedb_dataset,
|
|
10
|
+
build_proteingym_dataset,
|
|
11
|
+
build_proteingym_indel_dataset,
|
|
12
|
+
)
|
|
13
|
+
from dmsroute.acquisition.cache import CacheManifest, FilesystemCache
|
|
14
|
+
from dmsroute.acquisition.cache_inventory import (
|
|
15
|
+
CacheInventoryArtifact,
|
|
16
|
+
CacheInventoryEntry,
|
|
17
|
+
CacheInventoryIssue,
|
|
18
|
+
CacheInventoryResult,
|
|
19
|
+
inventory_cache,
|
|
20
|
+
)
|
|
21
|
+
from dmsroute.catalog import DatasetRecord, get_dataset_metadata, list_datasets
|
|
22
|
+
from dmsroute.config import load_pipeline_config, validate_pipeline_config
|
|
23
|
+
from dmsroute.downloads import (
|
|
24
|
+
DatasetBatchDownloadEntry,
|
|
25
|
+
DatasetBatchDownloadResult,
|
|
26
|
+
DatasetDownloadResult,
|
|
27
|
+
download_and_standardize_dataset,
|
|
28
|
+
download_and_standardize_datasets,
|
|
29
|
+
)
|
|
30
|
+
from dmsroute.core.exceptions import (
|
|
31
|
+
CacheError,
|
|
32
|
+
CacheInventoryError,
|
|
33
|
+
CatalogError,
|
|
34
|
+
CorruptCacheManifestError,
|
|
35
|
+
DMSParserError,
|
|
36
|
+
DatasetNotFoundError,
|
|
37
|
+
DownloadError,
|
|
38
|
+
FileFormatError,
|
|
39
|
+
InvalidCacheEntryError,
|
|
40
|
+
InvalidCatalogQueryError,
|
|
41
|
+
InvalidDatasetError,
|
|
42
|
+
InvalidHGVSVariantError,
|
|
43
|
+
InvalidPipelineOptionError,
|
|
44
|
+
InvalidSnapshotSelectorError,
|
|
45
|
+
InvalidVariantError,
|
|
46
|
+
MissingWildTypeError,
|
|
47
|
+
MutationApplicationError,
|
|
48
|
+
MaveDBSnapshotError,
|
|
49
|
+
MaveDBSnapshotTableError,
|
|
50
|
+
PipelineError,
|
|
51
|
+
SequenceValidationError,
|
|
52
|
+
SourceConfigurationError,
|
|
53
|
+
SnapshotDatasetNotFoundError,
|
|
54
|
+
SupersededSnapshotDatasetError,
|
|
55
|
+
UnknownSourceResourceError,
|
|
56
|
+
UnsupportedSourceResourceError,
|
|
57
|
+
UnsupportedVariantError,
|
|
58
|
+
WildTypeConflictError,
|
|
59
|
+
)
|
|
60
|
+
from dmsroute.acquisition.fetch import fetch_to_cache
|
|
61
|
+
from dmsroute.acquisition.io import (
|
|
62
|
+
download_file,
|
|
63
|
+
ensure_local_copy,
|
|
64
|
+
infer_filename_from_url,
|
|
65
|
+
read_table,
|
|
66
|
+
write_table,
|
|
67
|
+
)
|
|
68
|
+
from dmsroute.core.parsing import (
|
|
69
|
+
apply_mutations,
|
|
70
|
+
count_mutations,
|
|
71
|
+
explode_mutations,
|
|
72
|
+
extract_mutation_tokens,
|
|
73
|
+
extract_positions,
|
|
74
|
+
hgvs_pro_is_indel,
|
|
75
|
+
hgvs_to_sequence,
|
|
76
|
+
is_wildtype_variant,
|
|
77
|
+
parse_hgvs_pro,
|
|
78
|
+
parse_mavedb_hgvs_series,
|
|
79
|
+
parse_variant,
|
|
80
|
+
parse_variant_series,
|
|
81
|
+
parse_variant_token,
|
|
82
|
+
read_fasta_one,
|
|
83
|
+
translate_dna,
|
|
84
|
+
variant_to_sequence,
|
|
85
|
+
)
|
|
86
|
+
from dmsroute.core.transforms import (
|
|
87
|
+
add_minmax,
|
|
88
|
+
add_pseudo_binary_label,
|
|
89
|
+
add_wt_relative_score,
|
|
90
|
+
add_zscore,
|
|
91
|
+
compute_wt_score,
|
|
92
|
+
)
|
|
93
|
+
from dmsroute.pipeline import PipelineResult, run_pipeline
|
|
94
|
+
from dmsroute.sources.mavedb_catalog import MaveDBCatalog
|
|
95
|
+
from dmsroute.sources.mavedb_bulk_catalog import (
|
|
96
|
+
MaveDBBulkCatalog,
|
|
97
|
+
MaveDBDiscoveredExperiment,
|
|
98
|
+
MaveDBDiscoveredScoreSet,
|
|
99
|
+
MaveDBDiscoveryResult,
|
|
100
|
+
)
|
|
101
|
+
from dmsroute.sources.mavedb_snapshots import (
|
|
102
|
+
MaveDBSnapshot,
|
|
103
|
+
MaveDBSnapshotRecord,
|
|
104
|
+
fetch_mavedb_snapshot,
|
|
105
|
+
load_cached_mavedb_snapshot,
|
|
106
|
+
resolve_mavedb_snapshot,
|
|
107
|
+
)
|
|
108
|
+
from dmsroute.sources.mavedb_snapshot_tables import (
|
|
109
|
+
MaveDBSnapshotTable,
|
|
110
|
+
MaveDBSnapshotTableExtractionResult,
|
|
111
|
+
extract_mavedb_snapshot_tables,
|
|
112
|
+
)
|
|
113
|
+
from dmsroute.sources.proteingym_catalog import ProteinGymCatalog
|
|
114
|
+
from dmsroute.sources.proteingym_resources import (
|
|
115
|
+
PROTEINGYM_RESOURCES,
|
|
116
|
+
ProteinGymResource,
|
|
117
|
+
get_proteingym_resource,
|
|
118
|
+
list_proteingym_resources,
|
|
119
|
+
)
|
|
120
|
+
from dmsroute.core.validation import (
|
|
121
|
+
count_invalid_sequences,
|
|
122
|
+
has_wildtype_row,
|
|
123
|
+
validate_column_non_empty,
|
|
124
|
+
validate_consistent_sequence_lengths,
|
|
125
|
+
validate_n_mutations_column,
|
|
126
|
+
validate_required_columns,
|
|
127
|
+
validate_score_column,
|
|
128
|
+
validate_sequence_column,
|
|
129
|
+
validate_standard_dataset,
|
|
130
|
+
validate_status_column,
|
|
131
|
+
validate_variant_column,
|
|
132
|
+
validate_wt_presence,
|
|
133
|
+
validate_wt_sequence,
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
logger = logging.getLogger(__name__)
|
|
137
|
+
logger.addHandler(logging.NullHandler())
|
|
138
|
+
|
|
139
|
+
__all__ = [
|
|
140
|
+
"__version__",
|
|
141
|
+
"build_mavedb_dataset",
|
|
142
|
+
"build_proteingym_dataset",
|
|
143
|
+
"build_proteingym_indel_dataset",
|
|
144
|
+
"DatasetRecord",
|
|
145
|
+
"MaveDBCatalog",
|
|
146
|
+
"MaveDBSnapshot",
|
|
147
|
+
"MaveDBSnapshotRecord",
|
|
148
|
+
"fetch_mavedb_snapshot",
|
|
149
|
+
"load_cached_mavedb_snapshot",
|
|
150
|
+
"resolve_mavedb_snapshot",
|
|
151
|
+
"MaveDBBulkCatalog",
|
|
152
|
+
"MaveDBDiscoveredExperiment",
|
|
153
|
+
"MaveDBDiscoveredScoreSet",
|
|
154
|
+
"MaveDBDiscoveryResult",
|
|
155
|
+
"MaveDBSnapshotTable",
|
|
156
|
+
"MaveDBSnapshotTableExtractionResult",
|
|
157
|
+
"extract_mavedb_snapshot_tables",
|
|
158
|
+
"ProteinGymCatalog",
|
|
159
|
+
"ProteinGymResource",
|
|
160
|
+
"PROTEINGYM_RESOURCES",
|
|
161
|
+
"get_proteingym_resource",
|
|
162
|
+
"list_proteingym_resources",
|
|
163
|
+
"list_datasets",
|
|
164
|
+
"get_dataset_metadata",
|
|
165
|
+
"load_pipeline_config",
|
|
166
|
+
"validate_pipeline_config",
|
|
167
|
+
"run_pipeline",
|
|
168
|
+
"PipelineResult",
|
|
169
|
+
"download_and_standardize_dataset",
|
|
170
|
+
"DatasetDownloadResult",
|
|
171
|
+
"download_and_standardize_datasets",
|
|
172
|
+
"DatasetBatchDownloadEntry",
|
|
173
|
+
"DatasetBatchDownloadResult",
|
|
174
|
+
"FilesystemCache",
|
|
175
|
+
"CacheManifest",
|
|
176
|
+
"CacheInventoryArtifact",
|
|
177
|
+
"CacheInventoryEntry",
|
|
178
|
+
"CacheInventoryIssue",
|
|
179
|
+
"CacheInventoryResult",
|
|
180
|
+
"CacheInventoryError",
|
|
181
|
+
"inventory_cache",
|
|
182
|
+
"fetch_to_cache",
|
|
183
|
+
"parse_variant",
|
|
184
|
+
"parse_variant_token",
|
|
185
|
+
"parse_variant_series",
|
|
186
|
+
"parse_hgvs_pro",
|
|
187
|
+
"parse_mavedb_hgvs_series",
|
|
188
|
+
"count_mutations",
|
|
189
|
+
"is_wildtype_variant",
|
|
190
|
+
"explode_mutations",
|
|
191
|
+
"extract_positions",
|
|
192
|
+
"extract_mutation_tokens",
|
|
193
|
+
"hgvs_pro_is_indel",
|
|
194
|
+
"apply_mutations",
|
|
195
|
+
"variant_to_sequence",
|
|
196
|
+
"hgvs_to_sequence",
|
|
197
|
+
"read_fasta_one",
|
|
198
|
+
"translate_dna",
|
|
199
|
+
"compute_wt_score",
|
|
200
|
+
"add_wt_relative_score",
|
|
201
|
+
"add_pseudo_binary_label",
|
|
202
|
+
"add_zscore",
|
|
203
|
+
"add_minmax",
|
|
204
|
+
"download_file",
|
|
205
|
+
"infer_filename_from_url",
|
|
206
|
+
"ensure_local_copy",
|
|
207
|
+
"read_table",
|
|
208
|
+
"write_table",
|
|
209
|
+
"validate_required_columns",
|
|
210
|
+
"validate_column_non_empty",
|
|
211
|
+
"validate_score_column",
|
|
212
|
+
"validate_variant_column",
|
|
213
|
+
"validate_status_column",
|
|
214
|
+
"validate_wt_sequence",
|
|
215
|
+
"validate_wt_presence",
|
|
216
|
+
"validate_n_mutations_column",
|
|
217
|
+
"validate_sequence_column",
|
|
218
|
+
"validate_consistent_sequence_lengths",
|
|
219
|
+
"validate_standard_dataset",
|
|
220
|
+
"has_wildtype_row",
|
|
221
|
+
"count_invalid_sequences",
|
|
222
|
+
"DMSParserError",
|
|
223
|
+
"CacheError",
|
|
224
|
+
"CatalogError",
|
|
225
|
+
"InvalidCacheEntryError",
|
|
226
|
+
"CorruptCacheManifestError",
|
|
227
|
+
"InvalidCatalogQueryError",
|
|
228
|
+
"DatasetNotFoundError",
|
|
229
|
+
"SourceConfigurationError",
|
|
230
|
+
"UnknownSourceResourceError",
|
|
231
|
+
"UnsupportedSourceResourceError",
|
|
232
|
+
"PipelineError",
|
|
233
|
+
"InvalidPipelineOptionError",
|
|
234
|
+
"MaveDBSnapshotError",
|
|
235
|
+
"MaveDBSnapshotTableError",
|
|
236
|
+
"SnapshotDatasetNotFoundError",
|
|
237
|
+
"SupersededSnapshotDatasetError",
|
|
238
|
+
"InvalidSnapshotSelectorError",
|
|
239
|
+
"InvalidDatasetError",
|
|
240
|
+
"MissingWildTypeError",
|
|
241
|
+
"WildTypeConflictError",
|
|
242
|
+
"InvalidVariantError",
|
|
243
|
+
"InvalidHGVSVariantError",
|
|
244
|
+
"UnsupportedVariantError",
|
|
245
|
+
"SequenceValidationError",
|
|
246
|
+
"MutationApplicationError",
|
|
247
|
+
"DownloadError",
|
|
248
|
+
"FileFormatError",
|
|
249
|
+
]
|
dmsroute/_version.py
ADDED
|
File without changes
|