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.

We can run the tests to verify that the installation went well:

pytest

Use with C2S2

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

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 C2S2 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.10.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.10-cp310-abi3-manylinux_2_34_x86_64.whl (575.1 kB view details)

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

File details

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

File metadata

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

File hashes

Hashes for delumps-0.1.10.tar.gz
Algorithm Hash digest
SHA256 cd111bc4cfad0df9f525e3350434dc9d61a20e9237af61b8fcc4de493beb1e9a
MD5 7350decd3032916fa416ce97360a6d48
BLAKE2b-256 5a0a3c0a44839a22a2a0bb46fed7035d4b12576ec270ac450d28c5d029964670

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for delumps-0.1.10-cp310-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 98f463f68545bf24d837482a927dd55bf0174bd04a055630105e62f05e014192
MD5 9528c04c6fb07d839fadcb9b39bccd64
BLAKE2b-256 cb4fe537ee2a690262bae88648c8fcefa9b7dcdb5a0df04dba44ecd8ead8a157

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