Skip to main content

Rust extension module for Scone semantic similarity library

Project description

README

Delumps is an Rust extension module for computing semantic similarity between individuals within C2S2, a tool for phenotype-driven identification of disease subgroups.

Setup

We deploy Delumps to Python Package Index (PyPi), so installation with PIP should be possible:

python3 -m pip install delumps

Install in production mode

Alternatively, Delumps can be installed from sources:

cd crates/delumps  # Change to the extension directory

python3 -m pip install .

Note, the installation may fail if Rust toolchain is not available on your system.

Install in development mode

For package developers, the package is installed into the active virtual environment by running:

maturin develop -E test
# or
python3 -m pip install -e .[test]

The package is installed in editable mode along with the test extras, that include Pytest and Numpy.

The tests are run from the workspace folder:

pytest

Use with Stratiphy

Delumps provides a delumps.SimilarityMatrixCreatorFactory that can create a delumps.SimilarityMatrixCreator to use with Stratiphy.

import delumps

fpath_hpo = '/path/to/hp.json'
fpath_ic_mica = '/path/to/term-pair-similarity.csv.gz'

factory = delumps.SimilarityMatrixCreatorFactory.from_hpo_and_ic_mica(fpath_hpo, fpath_ic_mica)

The factory needs path to a HPO JSON file and an IC MICA file with precomputed information content (IC) for the most informative common ancestor (MICA) term of an HPO term pair.

Then, similarity matrix creator that uses the Phenomizer semantic similarity measure can be configured by running:

phenomizer_smc = factory.create_phenomizer_smc()

phenomizer_smc can be used as a SimilarityMatrixCreator component of the Stratiphy framework.

Release

We deploy Delumps to PyPi:

cd crates/delumps

maturin publish

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

delumps-0.1.11.tar.gz (2.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

delumps-0.1.11-cp310-abi3-manylinux_2_34_x86_64.whl (675.8 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.34+ x86-64

File details

Details for the file delumps-0.1.11.tar.gz.

File metadata

  • Download URL: delumps-0.1.11.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.12.6

File hashes

Hashes for delumps-0.1.11.tar.gz
Algorithm Hash digest
SHA256 aee215dc6b957a2ddd3fd2a437752a29a1c041b274274f47c16b80e6353f382c
MD5 dc28f8b62c084406f6ad976b0fcbb74c
BLAKE2b-256 604294ec852bad5ece1cab992ae146a25698272e3f91984e67e44f7fd72bce2f

See more details on using hashes here.

File details

Details for the file delumps-0.1.11-cp310-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for delumps-0.1.11-cp310-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 cb073ccfbee3f6a9913ec750a6b7a3a2207239b0ea7981a9aa91c72816b00628
MD5 0812510b81d177c5efd41042f01bc4ee
BLAKE2b-256 f28c794a80947f97b00ff5d3b9c28a83c63ac156158205b6efc5975c5504df5b

See more details on using hashes here.

Supported by

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