Skip to content

P2GX/ppkt2synergy

Repository files navigation

ppkt2synergy

ppkt2synergy is a Python library for analyzing correlations and synergy in GA4GH Phenopacket cohorts.

Installation

pip install ppkt2synergy

Overview

This package enables the identification of pairwise associations and higher-order interactions between phenotypic features, helping to uncover biologically meaningful patterns in rare disease data.


Features

  • Correlation analysis of HPO features (Spearman, Kendall, Phi)
  • Synergy analysis to detect non-additive interactions between phenotypic features with respect to a target variable (e.g., variant effects or disease)
  • Support for GA4GH phenopacket data
  • Structured dataset construction from phenotypic profiles
  • Visualization utilities (e.g., correlation heatmaps)

Quickstart

from ppkt2synergy import (
    load_phenopackets_by_cohort,
    PhenotypeDatasetBuilder,
    HPOCorrelationAnalyzer,
    CorrelationType,
)
from gpsea.model import VariantEffect

# Load phenopackets
phenopackets = load_phenopackets_by_cohort("FBN1")

# Build dataset
dataset = PhenotypeDatasetBuilder(phenopackets).build(
    mane_tx_id="NM_000138.5",
    variant_effect_type=VariantEffect.MISSENSE_VARIANT,
)

# Run correlation analysis
analyzer = HPOCorrelationAnalyzer(dataset)
analyzer.compute_correlation_matrix(
    correlation_type=CorrelationType.SPEARMAN
)

For a complete workflow and advanced options, see the documentation.


About

Phenopacket to Synergy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages