# universalizer
The KG-Hub Universalizer provides functions for knowledge graph cleanup and identifier normalization.
## Installation
Install with `pip`:
```
pip install universalizer
```
OR
Install with Poetry.
```
git clone https://github.com/Knowledge-Graph-Hub/universalizer.git
cd universalizer
poetry install
```
## Usage
With KGX format node and edge files in the same directory:
```
universalizer run path/to/directory
```
Or, if they're in a single tar.gz file:
```
universalizer run -c graph.tar.gz
```
### ID and category mapping
SSSOM-format maps are supported. Use a single map file:
```
univeralizer run -m poro-mp-exact-1.0.sssom.tsv path/to/directory
```
or a whole directory of them:
```
univeralizer run -m path/to/mapfiles path/to/directory
```
To map node categories as well as identifiers, use the `-u` flag:
```
univeralizer run -m path/to/mapfiles path/to/directory -u
```
For SSSOM maps from `subject_id` to `object_id`, subject node IDs will be remapped to object IDs.
If the `object_category` value is specified the node's category ID will be remapped as well.
Note that this will complete node normalization *and* ID remapping.
Maps should use the normalized form (e.g., specify "FBbt:00005201", not "FBBT:00005201", even if the latter form is in the input graph.)
Raw data
{
"_id": null,
"home_page": "https://github.com/Knowledge-Graph-Hub/universalizer",
"name": "universalizer",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9,<3.12",
"maintainer_email": "",
"keywords": "kg-hub,knowledgegraphs,ontology",
"author": "caufieldjh",
"author_email": "j.harry.caufield@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/0a/2f/6a875f0ed10cd1bf1db2547c4b88edbdb24c85c90226a988360d5182e61f/universalizer-0.0.11.tar.gz",
"platform": null,
"description": "# universalizer\n\nThe KG-Hub Universalizer provides functions for knowledge graph cleanup and identifier normalization.\n\n## Installation\n\nInstall with `pip`:\n\n```\npip install universalizer\n```\n\nOR\n\nInstall with Poetry.\n\n```\ngit clone https://github.com/Knowledge-Graph-Hub/universalizer.git\ncd universalizer\npoetry install\n```\n\n## Usage\n\nWith KGX format node and edge files in the same directory:\n\n```\nuniversalizer run path/to/directory\n```\n\nOr, if they're in a single tar.gz file:\n\n```\nuniversalizer run -c graph.tar.gz\n```\n\n### ID and category mapping\n\nSSSOM-format maps are supported. Use a single map file:\n\n```\nuniveralizer run -m poro-mp-exact-1.0.sssom.tsv path/to/directory\n```\n\nor a whole directory of them:\n\n```\nuniveralizer run -m path/to/mapfiles path/to/directory\n```\n\nTo map node categories as well as identifiers, use the `-u` flag:\n\n```\nuniveralizer run -m path/to/mapfiles path/to/directory -u\n```\n\nFor SSSOM maps from `subject_id` to `object_id`, subject node IDs will be remapped to object IDs.\n\nIf the `object_category` value is specified the node's category ID will be remapped as well.\n\nNote that this will complete node normalization *and* ID remapping.\n\nMaps should use the normalized form (e.g., specify \"FBbt:00005201\", not \"FBBT:00005201\", even if the latter form is in the input graph.)\n",
"bugtrack_url": null,
"license": "BSD-3",
"summary": "Provides functions for knowledge graph cleanup and identifier normalization.",
"version": "0.0.11",
"project_urls": {
"Homepage": "https://github.com/Knowledge-Graph-Hub/universalizer",
"Repository": "https://github.com/Knowledge-Graph-Hub/universalizer"
},
"split_keywords": [
"kg-hub",
"knowledgegraphs",
"ontology"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e1d3fd0a57ab196a75d476ec8b83d8e04402f0cde1f0882f59a310bdf0d23fef",
"md5": "ad6418d7345f1321270213cd3e5419a1",
"sha256": "ae36ebf91a773f696b504147f2a6df0a465151dcabae1375bfe4018de8c5ff94"
},
"downloads": -1,
"filename": "universalizer-0.0.11-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ad6418d7345f1321270213cd3e5419a1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9,<3.12",
"size": 12860,
"upload_time": "2023-12-13T17:21:38",
"upload_time_iso_8601": "2023-12-13T17:21:38.387605Z",
"url": "https://files.pythonhosted.org/packages/e1/d3/fd0a57ab196a75d476ec8b83d8e04402f0cde1f0882f59a310bdf0d23fef/universalizer-0.0.11-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0a2f6a875f0ed10cd1bf1db2547c4b88edbdb24c85c90226a988360d5182e61f",
"md5": "e04b62e1743b3fa49f89993d9c8820de",
"sha256": "0862bd1fdbfc923a4222ea422e64b95ab9d8ff71adcfe1e5c798a90dbd41c28a"
},
"downloads": -1,
"filename": "universalizer-0.0.11.tar.gz",
"has_sig": false,
"md5_digest": "e04b62e1743b3fa49f89993d9c8820de",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9,<3.12",
"size": 10786,
"upload_time": "2023-12-13T17:21:39",
"upload_time_iso_8601": "2023-12-13T17:21:39.771618Z",
"url": "https://files.pythonhosted.org/packages/0a/2f/6a875f0ed10cd1bf1db2547c4b88edbdb24c85c90226a988360d5182e61f/universalizer-0.0.11.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-13 17:21:39",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Knowledge-Graph-Hub",
"github_project": "universalizer",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "universalizer"
}