Skip to main content

Provides functions for knowledge graph cleanup and identifier normalization.

Project description

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.)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

universalizer-0.0.4.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

universalizer-0.0.4-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file universalizer-0.0.4.tar.gz.

File metadata

  • Download URL: universalizer-0.0.4.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.8.10 Linux/5.10.102.1-microsoft-standard-WSL2

File hashes

Hashes for universalizer-0.0.4.tar.gz
Algorithm Hash digest
SHA256 b5e4e3092208dfbb061e71d077f9b8c875f814520e02dfe96a6010a559a09ab0
MD5 74b94d1e8a54907711291e0e1f2fff72
BLAKE2b-256 ecc84e64a73c213dfe3a7d8564aed2617033afbba5f7dbfa2275ae6052c86640

See more details on using hashes here.

Provenance

File details

Details for the file universalizer-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: universalizer-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.8.10 Linux/5.10.102.1-microsoft-standard-WSL2

File hashes

Hashes for universalizer-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 03ece01e4ab9d24fa440f1095c04bf9b5d75e9ce4f7c9a93bff65bb6cd2e13c1
MD5 443f3ef8f1e9f66a35eb1cccd9e769b0
BLAKE2b-256 5f17f084b4ddda1a32ee059ebc362786988b4b35d914defeff14a5e7e35c6222

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page