Skip to main content

Run Pytest Coverage Ruff License: CC BY-NC-SA 4.0

ProDiphy

Python package that implements probabilistic models to compare (sub-)populations.

Installation

Note: currently the package has not been deposited in a repository, so it needs to be installed through GitHub.

To install ProDiphy, conda is required (or miniconda).

First, clone the repository to create a local copy in the current directory.

git clone https://github.com/raeslab/prodiphy

Then navigate to the source code, create an environment using the yaml file in the folder docs/dev, activate it and install the local copy of the code.

cd prodiphy
conda create -n prodiphy python=3.12
conda activate prodiphy
pip install -e .

Note that creating the environment can take a few minutes as there are some fairly sizeable dependencies required for Prodiphy.

Quick Start

The following code snippet shows how to use the ProDir model to compare two populations. The model is used here to compare the prevalence of species in two ecosystems, one polluted and one unpolluted. The model will estimate the prevalence of each species in both ecosystems and provide a credible interval for the difference in prevalence.

from prodiphy import ProDir

if __name__ == "__main__":
    reference_counts = [100, 30, 20, 10]
    polluted_counts = [90, 20, 5, 10]
    
    labels = ["SpeciesA", "SpeciesB", "SpeciesC", "SpeciesD"]
    
    model = ProDir()
    model.fit(reference_counts, polluted_counts, labels)
    
    summary = model.get_stats()

For more details including the output of this example, see the ProDir documentation.

Usage

The Prodiphy package contains various models each with their own specific use case. The following models are currently available:

  • ProDir: Model to compare the prevalence of specific classes in two populations. (Probabilistic alternative to a chi-square test)
  • CorProDir: Model to compare the prevalence of specific classes in two populations while correcting for covariates.
  • DeltaSlope: Model to compare the slope, intercept and spread of a linear regression between two groups.
  • DMM: Dirichlet Multinomial Mixture model to detect clusters with different prevalence of classes.
  • GMvM: Gaussian Multivariate Mixture model for clustering continuous multivariate data.
  • ACORN: Adjusted CORrelations, Negative-binomial. Hierarchical model testing whether every feature in a count table is associated with a continuous marker, adjusted for covariates.

Contributing

Any contributions you make are greatly appreciated.

  • Found a bug or have some suggestions? Open an issue.
  • Pull requests are welcome! Though open an issue first to discuss which features/changes you wish to implement.

Contact

ProDiphy was developed by Sebastian Proost at the RaesLab. ProDiphy is available under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International license.

For commercial access inquiries, please contact Jeroen Raes.

Metadata

Release files for prodiphy 0.2.0

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

Source distribution (sdist)

Source distribution for prodiphy 0.2.0
File Size Uploaded
prodiphy-0.2.0.tar.gz 30.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for prodiphy 0.2.0
File Interpreter ABI Platform
prodiphy-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 55.3 kB

Release files / prodiphy-0.2.0.tar.gz

Download URL prodiphy-0.2.0.tar.gz
Size 30.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0ad5caf6fec1e791a07ffa6d2cf68226e10e6a43963565f8c5d9965c740cc087
BLAKE2b-256 checksum
How to use checksums
673180d93a2ebfc236e95695b20e6768b8068ea6b27bea7953b74a35d2e67534
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / prodiphy-0.2.0-py3-none-any.whl

Download URL prodiphy-0.2.0-py3-none-any.whl
Size 25.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
547a2af816247c72e095e8fc060e9b0b2f7743f6edf542a5b4c490c1d1d141fd
BLAKE2b-256 checksum
How to use checksums
287ecfd61968a6adf34274758d049732ae5d312d53be66e04b7e706e0cff2b58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

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