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 Distribution

phenosign-0.1.2.tar.gz (36.4 kB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

Details for the file phenosign-0.1.2.tar.gz.

File metadata

  • Download URL: phenosign-0.1.2.tar.gz
  • Upload date:
  • Size: 36.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for phenosign-0.1.2.tar.gz
Algorithm Hash digest
SHA256 60090417179243c1be8e5aa9d5fd391e92e0a39c7d7032cdbe6e8d771adfc497
MD5 ec54300ff48ae917f52884eaef5b26b2
BLAKE2b-256 b16fb66439ae81ff947d194bd13a09fcdabea7f9e3547a872b107100fff71050

See more details on using hashes here.

File details

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

File metadata

  • Download URL: phenosign-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dfa36080ff59ed5382c6416eaa6f3e7ebfa923f2bdd100a53a0b777ac5fa053a
MD5 0ee7026e0ccd8181552f9baf53c677d6
BLAKE2b-256 2742a8129cf4cb44906ba40034c4ec52843b872c7403178566097b556e70585b

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