Skip to main content

XL-mHG Lite

Useful links: Documentation | Source code | Bug reports | PyPI version | Python versions supported | Build status | Downloads | License

xlmhg is an efficient Python/Cython implementation of the semiparametric XL-mHG test for enrichment in ranked lists. The XL-mHG test is an extension of the nonparametric mHG test, which was developed by Dr. Zohar Yakhini and colleagues.

xlmhglite is a fork of the original xlmhg package (which is unfortunately no longer being maintained). This fork was updated to support modern Python versions (Python >=3.8), fix bugs in the original implementation, and reduce the mandatory dependencies of the project to a minimum. To that end, the plotting functionality of xlmhg is not part of the core xlmhglite package, instead being an optional requirement.

Installation

To install the core (“lite”) version of xlmhglite: .. code-block:: bash

$ pip install xlmhglite

To install the complete version of xlmhglite (including the plotting functionality): .. code-block:: bash

$ pip install xlmhglite[‘all’]

Getting started

The xlmhglite package provides two functions (one simple and more more advanced) for performing XL-mHG tests. These functions are documented in the User Manual. Here’s a quick example using the “simple” test function:

import xlmhglite
stat, cutoff, pval = xlmhglite.xlmhg_test(v, X, L)

Where: v is the ranked list of 0’s and 1’s, represented by a NumPy array of integers, X and L are the XL-mHG parameters, and the return values have the following meanings:

  • stat: The XL-mHG test statistic

  • cutoff: The cutoff at which XL-mHG test statistic was attained

  • pval: The XL-mHG p-value

XL-mHG Lite Documentation

Please refer to the XL-mHG User Manual.

Citing XL-mHG

If you use the XL-mHG test in your research, please cite Eden et al. (PLoS Comput Biol, 2007) and Wagner (PLoS One, 2015).

History

1.1.1 (2024-06-30)

xlmhglite now runs on numpy version 2 and above.

1.1.0 (2023-06-11)

This version improves clarity of warning messages and addresses some additional bugs. Moreover, the project has been transitioned to use pyproject.toml and setup.cfg, and old code was cleaned up for better maintainability.

Changed

  • Warning messages regarding failed import of the cython module were made more informative.

  • Transitioned the project to use pyproject.toml and setup.cfg, and cleaned up legacy code from setup.py.

Fixed

  • Fixed bug where calculating enrichment scores using the pure Python implementation would raise an AttributeError.

  • Fixed bug where the pure Python implementation would raise an ImportError if numba is not already installed on the system.

1.0.1 (2023-06-11)

Minor patch addressing installation issues.

1.0.0 (2023-06-10)

First stable release.

Metadata

Release files for xlmhglite 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xlmhglite 1.1.1
File Size Uploaded Provenance Actions
xlmhglite-1.1.1.tar.gz 261.4 kB Without provenance Details for xlmhglite-1.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for xlmhglite 1.1.1
File Interpreter ABI Platform Actions
xlmhglite-1.1.1-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for xlmhglite-1.1.1-cp311-cp311-win_amd64.whl

Total release size: 344.8 kB

Release files / xlmhglite-1.1.1.tar.gz

Download URL xlmhglite-1.1.1.tar.gz
Size 261.4 kB
Tags Source
SHA-256 checksum
How to use checksums
01855fd1f6664d0ecdaa7d02c3ad9db15343192bfcd550f98ac3f8833fe74d49
BLAKE2b-256 checksum
How to use checksums
d045471a45e2f685f88be80d4c2f0957e17579eca08085efe207dbd0489f2017
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.5

Release files / xlmhglite-1.1.1-cp311-cp311-win_amd64.whl

Download URL xlmhglite-1.1.1-cp311-cp311-win_amd64.whl
Size 83.4 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
0fc9173393d419b5459f5adef978a95d2ff101d75ed1f60ea209cd0bdd4c4c7d
BLAKE2b-256 checksum
How to use checksums
11229d039b20c5be536178166b2df17805bbacb95181b2952ad478737aa64e55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.5

Security for xlmhglite 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page