Skip to main content

phenosign

phenosign is a Python library for analyzing pairwise relationships between Human Phenotype Ontology (HPO) features in GA4GH Phenopacket cohorts.

It provides two complementary analyses:

  1. Pairwise association analysis, which measures associations between binary phenotype annotations using the phi coefficient and Fisher's exact test.
  2. Target-specific synergy analysis, which evaluates whether a pair of phenotype features provides joint information about a predefined target beyond the information provided by the individual features.

Installation

pip install phenosign

Features

  • Construction of phenotype matrices from GA4GH Phenopackets, with separate representation of observed, excluded, and unreported HPO annotations
  • Ontology-aware propagation of phenotype annotations
  • Pairwise phenotype association analysis using the phi coefficient, Fisher's exact test, and Benjamini–Hochberg correction, with exclusion of ancestor–descendant HPO term pairs
  • Mutual-information-based phenotype-pair synergy analysis with permutation testing and Benjamini–Hochberg correction, supporting targets such as disease diagnosis, variant effect, and sex
  • Tabular results and interactive heatmaps, including contingency counts, effective sample sizes, adjusted p-values, and publication provenance where available

Quickstart

from pathlib import Path
from google.protobuf.json_format import Parse
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(build_gpsea_cohort=False)

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

For complete workflows, synergy analysis, visualization options, and API details, see the Documentation.

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.5.tar.gz (38.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.5-py3-none-any.whl (45.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: phenosign-0.1.5.tar.gz
  • Upload date:
  • Size: 38.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.5.tar.gz
Algorithm Hash digest
SHA256 534db36b67462b4cee76e2d6fc807e2ad639b056babedac8a50c7293e182fb87
MD5 bb07d268bde5d355eae7dd3e54290452
BLAKE2b-256 03163a89a2270aa762fb4ee6fbee8474dc162c6b75bd9c59be542079e4e5b760

See more details on using hashes here.

File details

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

File metadata

  • Download URL: phenosign-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 45.5 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c0d3f44ad694a8cf77dbfdce6476899a4b3a65fa626d9b6997b204a66e168035
MD5 8b285c417448e87e11025d000cf8eaae
BLAKE2b-256 084c52d7d60880d3c3fd8ea9d0c81c5e7d1e81b38c8bef4ed811ac7c9be8e119

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

1 file

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