Skip to main content

A Python package for synergy and correlation analysis of HPO annotations in GA4GH phenopacket cohorts

Project description

phenosign

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

Installation

pip install phenosign

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 (Phi Coefficient)
  • 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 pathlib import Path
import json
from phenosign import (
    PhenotypeDatasetBuilder,
    HPOCorrelationAnalyzer,
)

# Load phenopackets
phenopacket_dir = Path("path/to/your/fbn1_phenopackets/")

phenopackets = []
for file_path in phenopacket_dir.glob("*.json"):
    with open(file_path, "r", encoding="utf-8") as f:
        data: str = f.read()
        phenopacket: Phenopacket = Parse(data, Phenopacket())
        phenopackets.append(phenopacket)

# Build dataset
dataset = PhenotypeDatasetBuilder(phenopackets).build()

# Run correlation analysis
analyzer = HPOCorrelationAnalyzer(dataset)
results = analyzer.compute_correlation_matrix()
results.result_table.head()

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phenosign-0.1.1-py3-none-any.whl (44.3 kB view details)

Uploaded Python 3

File details

Details for the file phenosign-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: phenosign-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 44.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for phenosign-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 74a171ce7fcaeb9471bbce723a1d7994af1b9371ca690e36a662ec68588a0612
MD5 fa940a22a8123b4ed3a918b6805d3427
BLAKE2b-256 144f160ab952907179e6b2acf36649371b66beee55c00ddc83ed62e9d9c02e8e

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