sssom 0.0.0__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.
- sssom-0.0.0/LICENSE +22 -0
- sssom-0.0.0/PKG-INFO +191 -0
- sssom-0.0.0/README.md +144 -0
- sssom-0.0.0/pyproject.toml +90 -0
- sssom-0.0.0/src/sssom/__init__.py +51 -0
- sssom-0.0.0/src/sssom/cli.py +793 -0
- sssom-0.0.0/src/sssom/cliques.py +217 -0
- sssom-0.0.0/src/sssom/cliquesummary.py +466 -0
- sssom-0.0.0/src/sssom/constants.py +430 -0
- sssom-0.0.0/src/sssom/context.py +101 -0
- sssom-0.0.0/src/sssom/inverse_map.yaml +15 -0
- sssom-0.0.0/src/sssom/io.py +396 -0
- sssom-0.0.0/src/sssom/obo.epm.json +40142 -0
- sssom-0.0.0/src/sssom/parsers.py +1233 -0
- sssom-0.0.0/src/sssom/py.typed +0 -0
- sssom-0.0.0/src/sssom/rdf_internal.py +1012 -0
- sssom-0.0.0/src/sssom/rdf_util.py +88 -0
- sssom-0.0.0/src/sssom/sparql_util.py +91 -0
- sssom-0.0.0/src/sssom/sssom_document.py +29 -0
- sssom-0.0.0/src/sssom/util.py +1850 -0
- sssom-0.0.0/src/sssom/validators.py +235 -0
- sssom-0.0.0/src/sssom/writers.py +730 -0
sssom-0.0.0/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
The MIT License (MIT)
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2023 Author 1
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in
|
|
14
|
+
all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
+
THE SOFTWARE.
|
sssom-0.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sssom
|
|
3
|
+
Version: 0.0.0
|
|
4
|
+
Summary: Operations on SSSOM mapping tables
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Author: Chris Mungall
|
|
8
|
+
Author-email: cjmungall@lbl.gov
|
|
9
|
+
Maintainer: Nicolas Matentzoglu
|
|
10
|
+
Maintainer-email: nicolas.matentzoglu@gmail.com
|
|
11
|
+
Requires-Python: >=3.10,<4.0.0
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
18
|
+
Provides-Extra: docs
|
|
19
|
+
Provides-Extra: networkx
|
|
20
|
+
Provides-Extra: pansql
|
|
21
|
+
Provides-Extra: rdflib-endpoint
|
|
22
|
+
Provides-Extra: scipy
|
|
23
|
+
Requires-Dist: click (>=8.1.6)
|
|
24
|
+
Requires-Dist: curies (>=0.10.23)
|
|
25
|
+
Requires-Dist: deprecation (>=2.1.0)
|
|
26
|
+
Requires-Dist: fastapi ; extra == "rdflib-endpoint"
|
|
27
|
+
Requires-Dist: httpx ; extra == "rdflib-endpoint"
|
|
28
|
+
Requires-Dist: linkml (>=1.10.0)
|
|
29
|
+
Requires-Dist: linkml-runtime (>=1.10.0)
|
|
30
|
+
Requires-Dist: mkdocs-click (>=0.8.1) ; extra == "docs"
|
|
31
|
+
Requires-Dist: mkdocs-material (>=9.5.0) ; extra == "docs"
|
|
32
|
+
Requires-Dist: mkdocstrings[python] (>=0.24.0) ; extra == "docs"
|
|
33
|
+
Requires-Dist: networkx (>=3.1) ; extra == "networkx"
|
|
34
|
+
Requires-Dist: packaging (>=20.0)
|
|
35
|
+
Requires-Dist: pandas (>=2.0.0)
|
|
36
|
+
Requires-Dist: pansql (>=0.0.1) ; extra == "pansql"
|
|
37
|
+
Requires-Dist: pyyaml (>=6.0.1)
|
|
38
|
+
Requires-Dist: rdflib (>=7.1.3)
|
|
39
|
+
Requires-Dist: rdflib-endpoint ; extra == "rdflib-endpoint"
|
|
40
|
+
Requires-Dist: scipy ; extra == "scipy"
|
|
41
|
+
Requires-Dist: sparqlwrapper (>=2.0.0)
|
|
42
|
+
Requires-Dist: sssom-schema (==1.1.0a4)
|
|
43
|
+
Requires-Dist: uvicorn ; extra == "rdflib-endpoint"
|
|
44
|
+
Requires-Dist: validators (>=0.20.0)
|
|
45
|
+
Description-Content-Type: text/markdown
|
|
46
|
+
|
|
47
|
+
# Python Utilities for SSSOM
|
|
48
|
+
|
|
49
|
+
<p align="center">
|
|
50
|
+
<a href="https://github.com/mapping-commons/sssom-py/actions/workflows/qc.yml">
|
|
51
|
+
<img alt="Tests" src="https://github.com/mapping-commons/sssom-py/actions/workflows/qc.yml/badge.svg" />
|
|
52
|
+
</a>
|
|
53
|
+
<a href="https://pypi.org/project/sssom">
|
|
54
|
+
<img alt="PyPI" src="https://img.shields.io/pypi/v/sssom" />
|
|
55
|
+
</a>
|
|
56
|
+
<a href="https://pypi.org/project/sssom">
|
|
57
|
+
<img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/sssom" />
|
|
58
|
+
</a>
|
|
59
|
+
<a href="https://github.com/mapping-commons/sssom-py/blob/main/LICENSE">
|
|
60
|
+
<img alt="PyPI - License" src="https://img.shields.io/pypi/l/sssom" />
|
|
61
|
+
</a>
|
|
62
|
+
<a href="https://github.com/psf/black">
|
|
63
|
+
<img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code style: black">
|
|
64
|
+
</a>
|
|
65
|
+
<a href="https://doi.org/10.5281/zenodo.14296666"><img src="https://zenodo.org/badge/DOI/10.5281/zenodo.14296666.svg" alt="DOI"></a>
|
|
66
|
+
</p>
|
|
67
|
+
|
|
68
|
+
<img src="https://github.com/tis-lab/closed-illustrations/raw/master/logos/sssom-logos/sssom_logo_black_banner.png" />
|
|
69
|
+
|
|
70
|
+
A Python library and command line interface (CLI) for working with
|
|
71
|
+
[SSSOM (Simple Standard for Sharing Ontology Mappings)](https://github.com/mapping-commons/sssom).
|
|
72
|
+
|
|
73
|
+
## Getting Started
|
|
74
|
+
|
|
75
|
+
A SSSOM TSV can be parsed with
|
|
76
|
+
|
|
77
|
+
```python
|
|
78
|
+
import sssom
|
|
79
|
+
|
|
80
|
+
# other SSSOM files can be found on https://mapping-commons.github.io
|
|
81
|
+
url = "https://raw.githubusercontent.com/mapping-commons/mh_mapping_initiative/master/mappings/mp_hp_eye_impc.sssom.tsv"
|
|
82
|
+
|
|
83
|
+
# TSV can be parsed into a mapping set dataframe object,
|
|
84
|
+
# which includes a pandas DataFrame, a curies.Converter,
|
|
85
|
+
# and metadata
|
|
86
|
+
msdf = sssom.parse_tsv(url)
|
|
87
|
+
|
|
88
|
+
# SSSOM comes with several "write" functions
|
|
89
|
+
sssom.write_tsv(msdf, "test.tsv")
|
|
90
|
+
sssom.write_json(msdf, "test.json")
|
|
91
|
+
sssom.write_owl(msdf, "test.owl")
|
|
92
|
+
sssom.write_rdf(msdf, "test.ttl")
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
> [!WARNING]
|
|
96
|
+
> The export formats (json, rdf) of sssom-py are not yet finalised! Expect changes in future releases.
|
|
97
|
+
|
|
98
|
+
## Documentation
|
|
99
|
+
|
|
100
|
+
See [documentation](https://mapping-commons.github.io/sssom-py/index.html#)
|
|
101
|
+
|
|
102
|
+
### Deploy documentation
|
|
103
|
+
|
|
104
|
+
```console
|
|
105
|
+
$ make sphinx
|
|
106
|
+
$ make deploy-docs
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Schema
|
|
110
|
+
|
|
111
|
+
See the [schema/](schema) folder for source schema in YAML, plus
|
|
112
|
+
derivations to JSON-Schema, ShEx, etc.
|
|
113
|
+
|
|
114
|
+
## Testing
|
|
115
|
+
|
|
116
|
+
`tox` is similar to `make`, but specific for Python software projects. Its
|
|
117
|
+
configuration is stored in [`tox.ini`](tox.ini) in different "environments"
|
|
118
|
+
whose headers look like `[testenv:...]`. All tests can be run with:
|
|
119
|
+
|
|
120
|
+
```console
|
|
121
|
+
$ pip install tox
|
|
122
|
+
$ tox
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
A specific environment can be run using the `-e` flag, such as `tox -e lint` to run
|
|
126
|
+
the linting environment.
|
|
127
|
+
|
|
128
|
+
## Outstanding Contributors
|
|
129
|
+
|
|
130
|
+
Outstanding contributors are groups and institutions that have helped with organising the SSSOM
|
|
131
|
+
Python package's development, providing funding, advice and infrastructure. We are very grateful
|
|
132
|
+
for all your contribution - the project would not exist without you!
|
|
133
|
+
|
|
134
|
+
### Harvard Medical School
|
|
135
|
+
|
|
136
|
+
<img width="250" src="https://hms.harvard.edu/themes/harvardmedical/logo.svg" alt="Harvard Medical School Logo" />
|
|
137
|
+
|
|
138
|
+
The [INDRA Lab](https://indralab.github.io), a part of the
|
|
139
|
+
[Laboratory of Systems Pharmacology](https://hits.harvard.edu/the-program/laboratory-of-systems-pharmacology/about/)
|
|
140
|
+
and the [Harvard Program in Therapeutic Science (HiTS)](https://hits.harvard.edu), is interested in
|
|
141
|
+
natural language processing and large-scale knowledge assembly. Their work on SSSOM is funded by the
|
|
142
|
+
DARPA Young Faculty Award W911NF2010255 (PI: Benjamin M. Gyori).
|
|
143
|
+
|
|
144
|
+
https://indralab.github.io
|
|
145
|
+
|
|
146
|
+
## Citation
|
|
147
|
+
|
|
148
|
+
SSSOM itself can be cited with:
|
|
149
|
+
|
|
150
|
+
```bibtex
|
|
151
|
+
@article{10.1093/database/baac035,
|
|
152
|
+
author = {Matentzoglu, Nicolas and Balhoff, James P and Bello, Susan M and Bizon, Chris and Brush, Matthew and Callahan, Tiffany J and Chute, Christopher G and Duncan, William D and Evelo, Chris T and Gabriel, Davera and Graybeal, John and Gray, Alasdair and Gyori, Benjamin M and Haendel, Melissa and Harmse, Henriette and Harris, Nomi L and Harrow, Ian and Hegde, Harshad B and Hoyt, Amelia L and Hoyt, Charles T and Jiao, Dazhi and Jiménez-Ruiz, Ernesto and Jupp, Simon and Kim, Hyeongsik and Koehler, Sebastian and Liener, Thomas and Long, Qinqin and Malone, James and McLaughlin, James A and McMurry, Julie A and Moxon, Sierra and Munoz-Torres, Monica C and Osumi-Sutherland, David and Overton, James A and Peters, Bjoern and Putman, Tim and Queralt-Rosinach, Núria and Shefchek, Kent and Solbrig, Harold and Thessen, Anne and Tudorache, Tania and Vasilevsky, Nicole and Wagner, Alex H and Mungall, Christopher J},
|
|
153
|
+
title = {A Simple Standard for Sharing Ontological Mappings (SSSOM)},
|
|
154
|
+
journal = {Database},
|
|
155
|
+
volume = {2022},
|
|
156
|
+
pages = {baac035},
|
|
157
|
+
year = {2022},
|
|
158
|
+
month = {05},
|
|
159
|
+
issn = {1758-0463},
|
|
160
|
+
doi = {10.1093/database/baac035},
|
|
161
|
+
url = {https://doi.org/10.1093/database/baac035},
|
|
162
|
+
eprint = {https://academic.oup.com/database/article-pdf/doi/10.1093/database/baac035/43832024/baac035.pdf},
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
To cite the SSSOM-py software package specifically, use:
|
|
167
|
+
|
|
168
|
+
```bibtex
|
|
169
|
+
@software{sssom-py,
|
|
170
|
+
author = {Harshad Hegde and
|
|
171
|
+
Nico Matentzoglu and
|
|
172
|
+
Charles Tapley Hoyt and
|
|
173
|
+
Chris Mungall and
|
|
174
|
+
Joe Flack and
|
|
175
|
+
Benjamin M. Gyori and
|
|
176
|
+
Damien Goutte-Gattat and
|
|
177
|
+
Glass and
|
|
178
|
+
Syphax Bouazzouni},
|
|
179
|
+
title = {mapping-commons/sssom-py: v0.4.15 release (minor
|
|
180
|
+
fixes)
|
|
181
|
+
},
|
|
182
|
+
month = dec,
|
|
183
|
+
year = 2024,
|
|
184
|
+
publisher = {Zenodo},
|
|
185
|
+
version = {v0.4.15},
|
|
186
|
+
doi = {10.5281/zenodo.14296666},
|
|
187
|
+
url = {https://doi.org/10.5281/zenodo.14296666},
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
|
sssom-0.0.0/README.md
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Python Utilities for SSSOM
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="https://github.com/mapping-commons/sssom-py/actions/workflows/qc.yml">
|
|
5
|
+
<img alt="Tests" src="https://github.com/mapping-commons/sssom-py/actions/workflows/qc.yml/badge.svg" />
|
|
6
|
+
</a>
|
|
7
|
+
<a href="https://pypi.org/project/sssom">
|
|
8
|
+
<img alt="PyPI" src="https://img.shields.io/pypi/v/sssom" />
|
|
9
|
+
</a>
|
|
10
|
+
<a href="https://pypi.org/project/sssom">
|
|
11
|
+
<img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/sssom" />
|
|
12
|
+
</a>
|
|
13
|
+
<a href="https://github.com/mapping-commons/sssom-py/blob/main/LICENSE">
|
|
14
|
+
<img alt="PyPI - License" src="https://img.shields.io/pypi/l/sssom" />
|
|
15
|
+
</a>
|
|
16
|
+
<a href="https://github.com/psf/black">
|
|
17
|
+
<img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code style: black">
|
|
18
|
+
</a>
|
|
19
|
+
<a href="https://doi.org/10.5281/zenodo.14296666"><img src="https://zenodo.org/badge/DOI/10.5281/zenodo.14296666.svg" alt="DOI"></a>
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
<img src="https://github.com/tis-lab/closed-illustrations/raw/master/logos/sssom-logos/sssom_logo_black_banner.png" />
|
|
23
|
+
|
|
24
|
+
A Python library and command line interface (CLI) for working with
|
|
25
|
+
[SSSOM (Simple Standard for Sharing Ontology Mappings)](https://github.com/mapping-commons/sssom).
|
|
26
|
+
|
|
27
|
+
## Getting Started
|
|
28
|
+
|
|
29
|
+
A SSSOM TSV can be parsed with
|
|
30
|
+
|
|
31
|
+
```python
|
|
32
|
+
import sssom
|
|
33
|
+
|
|
34
|
+
# other SSSOM files can be found on https://mapping-commons.github.io
|
|
35
|
+
url = "https://raw.githubusercontent.com/mapping-commons/mh_mapping_initiative/master/mappings/mp_hp_eye_impc.sssom.tsv"
|
|
36
|
+
|
|
37
|
+
# TSV can be parsed into a mapping set dataframe object,
|
|
38
|
+
# which includes a pandas DataFrame, a curies.Converter,
|
|
39
|
+
# and metadata
|
|
40
|
+
msdf = sssom.parse_tsv(url)
|
|
41
|
+
|
|
42
|
+
# SSSOM comes with several "write" functions
|
|
43
|
+
sssom.write_tsv(msdf, "test.tsv")
|
|
44
|
+
sssom.write_json(msdf, "test.json")
|
|
45
|
+
sssom.write_owl(msdf, "test.owl")
|
|
46
|
+
sssom.write_rdf(msdf, "test.ttl")
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
> [!WARNING]
|
|
50
|
+
> The export formats (json, rdf) of sssom-py are not yet finalised! Expect changes in future releases.
|
|
51
|
+
|
|
52
|
+
## Documentation
|
|
53
|
+
|
|
54
|
+
See [documentation](https://mapping-commons.github.io/sssom-py/index.html#)
|
|
55
|
+
|
|
56
|
+
### Deploy documentation
|
|
57
|
+
|
|
58
|
+
```console
|
|
59
|
+
$ make sphinx
|
|
60
|
+
$ make deploy-docs
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Schema
|
|
64
|
+
|
|
65
|
+
See the [schema/](schema) folder for source schema in YAML, plus
|
|
66
|
+
derivations to JSON-Schema, ShEx, etc.
|
|
67
|
+
|
|
68
|
+
## Testing
|
|
69
|
+
|
|
70
|
+
`tox` is similar to `make`, but specific for Python software projects. Its
|
|
71
|
+
configuration is stored in [`tox.ini`](tox.ini) in different "environments"
|
|
72
|
+
whose headers look like `[testenv:...]`. All tests can be run with:
|
|
73
|
+
|
|
74
|
+
```console
|
|
75
|
+
$ pip install tox
|
|
76
|
+
$ tox
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
A specific environment can be run using the `-e` flag, such as `tox -e lint` to run
|
|
80
|
+
the linting environment.
|
|
81
|
+
|
|
82
|
+
## Outstanding Contributors
|
|
83
|
+
|
|
84
|
+
Outstanding contributors are groups and institutions that have helped with organising the SSSOM
|
|
85
|
+
Python package's development, providing funding, advice and infrastructure. We are very grateful
|
|
86
|
+
for all your contribution - the project would not exist without you!
|
|
87
|
+
|
|
88
|
+
### Harvard Medical School
|
|
89
|
+
|
|
90
|
+
<img width="250" src="https://hms.harvard.edu/themes/harvardmedical/logo.svg" alt="Harvard Medical School Logo" />
|
|
91
|
+
|
|
92
|
+
The [INDRA Lab](https://indralab.github.io), a part of the
|
|
93
|
+
[Laboratory of Systems Pharmacology](https://hits.harvard.edu/the-program/laboratory-of-systems-pharmacology/about/)
|
|
94
|
+
and the [Harvard Program in Therapeutic Science (HiTS)](https://hits.harvard.edu), is interested in
|
|
95
|
+
natural language processing and large-scale knowledge assembly. Their work on SSSOM is funded by the
|
|
96
|
+
DARPA Young Faculty Award W911NF2010255 (PI: Benjamin M. Gyori).
|
|
97
|
+
|
|
98
|
+
https://indralab.github.io
|
|
99
|
+
|
|
100
|
+
## Citation
|
|
101
|
+
|
|
102
|
+
SSSOM itself can be cited with:
|
|
103
|
+
|
|
104
|
+
```bibtex
|
|
105
|
+
@article{10.1093/database/baac035,
|
|
106
|
+
author = {Matentzoglu, Nicolas and Balhoff, James P and Bello, Susan M and Bizon, Chris and Brush, Matthew and Callahan, Tiffany J and Chute, Christopher G and Duncan, William D and Evelo, Chris T and Gabriel, Davera and Graybeal, John and Gray, Alasdair and Gyori, Benjamin M and Haendel, Melissa and Harmse, Henriette and Harris, Nomi L and Harrow, Ian and Hegde, Harshad B and Hoyt, Amelia L and Hoyt, Charles T and Jiao, Dazhi and Jiménez-Ruiz, Ernesto and Jupp, Simon and Kim, Hyeongsik and Koehler, Sebastian and Liener, Thomas and Long, Qinqin and Malone, James and McLaughlin, James A and McMurry, Julie A and Moxon, Sierra and Munoz-Torres, Monica C and Osumi-Sutherland, David and Overton, James A and Peters, Bjoern and Putman, Tim and Queralt-Rosinach, Núria and Shefchek, Kent and Solbrig, Harold and Thessen, Anne and Tudorache, Tania and Vasilevsky, Nicole and Wagner, Alex H and Mungall, Christopher J},
|
|
107
|
+
title = {A Simple Standard for Sharing Ontological Mappings (SSSOM)},
|
|
108
|
+
journal = {Database},
|
|
109
|
+
volume = {2022},
|
|
110
|
+
pages = {baac035},
|
|
111
|
+
year = {2022},
|
|
112
|
+
month = {05},
|
|
113
|
+
issn = {1758-0463},
|
|
114
|
+
doi = {10.1093/database/baac035},
|
|
115
|
+
url = {https://doi.org/10.1093/database/baac035},
|
|
116
|
+
eprint = {https://academic.oup.com/database/article-pdf/doi/10.1093/database/baac035/43832024/baac035.pdf},
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
To cite the SSSOM-py software package specifically, use:
|
|
121
|
+
|
|
122
|
+
```bibtex
|
|
123
|
+
@software{sssom-py,
|
|
124
|
+
author = {Harshad Hegde and
|
|
125
|
+
Nico Matentzoglu and
|
|
126
|
+
Charles Tapley Hoyt and
|
|
127
|
+
Chris Mungall and
|
|
128
|
+
Joe Flack and
|
|
129
|
+
Benjamin M. Gyori and
|
|
130
|
+
Damien Goutte-Gattat and
|
|
131
|
+
Glass and
|
|
132
|
+
Syphax Bouazzouni},
|
|
133
|
+
title = {mapping-commons/sssom-py: v0.4.15 release (minor
|
|
134
|
+
fixes)
|
|
135
|
+
},
|
|
136
|
+
month = dec,
|
|
137
|
+
year = 2024,
|
|
138
|
+
publisher = {Zenodo},
|
|
139
|
+
version = {v0.4.15},
|
|
140
|
+
doi = {10.5281/zenodo.14296666},
|
|
141
|
+
url = {https://doi.org/10.5281/zenodo.14296666},
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "sssom"
|
|
3
|
+
version = "0.0.0"
|
|
4
|
+
description = "Operations on SSSOM mapping tables"
|
|
5
|
+
authors = [
|
|
6
|
+
{ name = "Chris Mungall", email = "cjmungall@lbl.gov" },
|
|
7
|
+
{ name = "Nicolas Matentzoglu", email = "nicolas.matentzoglu@gmail.com" },
|
|
8
|
+
{ name = "Harshad Hegde", email = "hhegde@lbl.gov" },
|
|
9
|
+
]
|
|
10
|
+
maintainers = [
|
|
11
|
+
{ name = "Nicolas Matentzoglu", email = "nicolas.matentzoglu@gmail.com" },
|
|
12
|
+
{ name = "Charles Tapley Hoyt", email = "cthoyt@gmail.com" },
|
|
13
|
+
{ name = "Damien Goutte-Gattat", email = "dgouttegattat@incenp.org" },
|
|
14
|
+
]
|
|
15
|
+
license = "MIT"
|
|
16
|
+
license-files = ["LICENSE"]
|
|
17
|
+
readme = "README.md"
|
|
18
|
+
requires-python = ">=3.10,<4.0.0"
|
|
19
|
+
|
|
20
|
+
dependencies = [
|
|
21
|
+
"click>=8.1.6",
|
|
22
|
+
"curies>=0.10.23",
|
|
23
|
+
"linkml-runtime>=1.10.0",
|
|
24
|
+
"linkml>=1.10.0",
|
|
25
|
+
"packaging>=20.0",
|
|
26
|
+
"pandas>=2.0.0",
|
|
27
|
+
"sssom-schema==1.1.0a4",
|
|
28
|
+
"sparqlwrapper>=2.0.0",
|
|
29
|
+
"validators>=0.20.0",
|
|
30
|
+
"deprecation>=2.1.0",
|
|
31
|
+
"pyyaml>=6.0.1",
|
|
32
|
+
"rdflib>=7.1.3",
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
# see https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#dependencies-optional-dependencies
|
|
36
|
+
[project.optional-dependencies]
|
|
37
|
+
networkx = [
|
|
38
|
+
"networkx>=3.1",
|
|
39
|
+
]
|
|
40
|
+
pansql = [
|
|
41
|
+
"pansql>=0.0.1",
|
|
42
|
+
]
|
|
43
|
+
scipy = [
|
|
44
|
+
"scipy",
|
|
45
|
+
]
|
|
46
|
+
docs = [
|
|
47
|
+
"mkdocs-material>=9.5.0",
|
|
48
|
+
"mkdocstrings[python]>=0.24.0",
|
|
49
|
+
"mkdocs-click>=0.8.1",
|
|
50
|
+
]
|
|
51
|
+
rdflib-endpoint = [
|
|
52
|
+
"uvicorn",
|
|
53
|
+
"fastapi",
|
|
54
|
+
"rdflib-endpoint",
|
|
55
|
+
"httpx", # only used in tests, but this is small
|
|
56
|
+
]
|
|
57
|
+
|
|
58
|
+
[project.scripts]
|
|
59
|
+
sssom = "sssom.cli:main"
|
|
60
|
+
|
|
61
|
+
[tool.poetry.group.dev.dependencies]
|
|
62
|
+
pytest = {version = ">=7.1.2"}
|
|
63
|
+
tox = {version = ">=3.25.1"}
|
|
64
|
+
|
|
65
|
+
[tool.poetry-dynamic-versioning]
|
|
66
|
+
enable = false
|
|
67
|
+
vcs = "git"
|
|
68
|
+
style = "pep440"
|
|
69
|
+
|
|
70
|
+
[tool.black]
|
|
71
|
+
line-length = 100
|
|
72
|
+
target-version = ["py310", "py311", "py312", "py313"]
|
|
73
|
+
|
|
74
|
+
[[tool.mypy.overrides]]
|
|
75
|
+
module = [
|
|
76
|
+
'sssom.cliquesummary'
|
|
77
|
+
]
|
|
78
|
+
ignore_errors = true
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
[tool.isort]
|
|
82
|
+
profile = "black"
|
|
83
|
+
multi_line_output = 3
|
|
84
|
+
line_length = 100
|
|
85
|
+
include_trailing_comma = true
|
|
86
|
+
reverse_relative = true
|
|
87
|
+
|
|
88
|
+
[build-system]
|
|
89
|
+
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
|
|
90
|
+
build-backend = "poetry_dynamic_versioning.backend"
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"""sssom-py package."""
|
|
2
|
+
|
|
3
|
+
import importlib.metadata
|
|
4
|
+
|
|
5
|
+
try:
|
|
6
|
+
__version__ = importlib.metadata.version(__name__)
|
|
7
|
+
except importlib.metadata.PackageNotFoundError:
|
|
8
|
+
# package is not installed
|
|
9
|
+
__version__ = "0.0.0" # pragma: no cover
|
|
10
|
+
|
|
11
|
+
from sssom_schema import Mapping, MappingSet, slots
|
|
12
|
+
|
|
13
|
+
from sssom.io import get_metadata_and_prefix_map
|
|
14
|
+
from sssom.sssom_document import MappingSetDocument
|
|
15
|
+
from sssom.util import (
|
|
16
|
+
MappingSetDataFrame,
|
|
17
|
+
collapse,
|
|
18
|
+
compare_dataframes,
|
|
19
|
+
dataframe_to_ptable,
|
|
20
|
+
filter_redundant_rows,
|
|
21
|
+
group_mappings,
|
|
22
|
+
reconcile_prefix_and_data,
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
from .constants import generate_mapping_set_id, get_default_metadata
|
|
26
|
+
from .parsers import parse_csv, parse_sssom_table, parse_tsv
|
|
27
|
+
from .writers import write_json, write_owl, write_rdf, write_tsv
|
|
28
|
+
|
|
29
|
+
__all__ = [
|
|
30
|
+
"write_json",
|
|
31
|
+
"write_owl",
|
|
32
|
+
"write_rdf",
|
|
33
|
+
"write_tsv",
|
|
34
|
+
"parse_csv",
|
|
35
|
+
"generate_mapping_set_id",
|
|
36
|
+
"get_default_metadata",
|
|
37
|
+
"parse_sssom_table",
|
|
38
|
+
"parse_tsv",
|
|
39
|
+
"Mapping",
|
|
40
|
+
"MappingSet",
|
|
41
|
+
"MappingSetDocument",
|
|
42
|
+
"MappingSetDataFrame",
|
|
43
|
+
"slots",
|
|
44
|
+
"get_metadata_and_prefix_map",
|
|
45
|
+
"collapse",
|
|
46
|
+
"compare_dataframes",
|
|
47
|
+
"dataframe_to_ptable",
|
|
48
|
+
"filter_redundant_rows",
|
|
49
|
+
"group_mappings",
|
|
50
|
+
"reconcile_prefix_and_data",
|
|
51
|
+
]
|