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:

# TODO

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.9.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.9-cp310-abi3-manylinux_2_34_x86_64.whl (571.7 kB view details)

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

File details

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

File metadata

  • Download URL: delumps-0.1.9.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.9.tar.gz
Algorithm Hash digest
SHA256 82ab73c94f4c8fe6325fe11d73706035513df8d976357574f4ad085ab18a43e6
MD5 1233c13ae41ecfda7b6cad370955957b
BLAKE2b-256 8d23f33f83b2eed83634a1f77f70fec68768d1b10d84831f2af3c80b5a1145c9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for delumps-0.1.9-cp310-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ff01e3f143938716d22c60dc259037cf3d04600c2a3368a0e0df11d11ef15eaf
MD5 b910debc7eeb03e436bf5d2f3d2d9114
BLAKE2b-256 005b4060aae2c7666d1356ec5d8c3a1fbc8d2f91f8bb97c06a622d40ebd64e81

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