Skip to main content

Convert Pedigree Studio sessions to GA4GH Pedigree Standard and Phenopackets

Project description

studio2ga4gh

Convert Pedigree Studio session JSON files to GA4GH interoperability formats:

  • GA4GH Pedigree Standard — relationship-graph model using the Kinship Ontology (KIN)
  • Phenopackets Family — PED-compatible pedigree with disease information

Installation

pip install studio2ga4gh

Usage

Command line

studio2ga4gh session.json
studio2ga4gh session.json -o my_family -d ./output/

This produces two files per pedigree:

  • {name}_ga4gh.json — GA4GH Pedigree (relationship graph with KIN ontology codes)
  • {name}_phenopackets.json — Phenopackets Family (PED-compatible pedigree + diseases)

Python API

import studio2ga4gh, json

with open("session.json") as f:
    session = json.load(f)

result = studio2ga4gh.convert(session)
print(result.summary)
for filename, content in result.files:
    print(f"--- {filename} ---")
    print(content[:200])

What Each Output Contains

GA4GH Pedigree (_ga4gh.json)

The rich graph-based format from the GA4GH Pedigree Standard. It represents each parent-child and twin relationship as an explicit edge with a KIN ontology code:

Relationship KIN Code Label
Biological mother KIN:027 isBiologicalMotherOf
Biological father KIN:028 isBiologicalFatherOf
Adoptive parent KIN:022 isAdoptiveParentOf
Identical twin KIN:010 isMonozygoticMultipleBirthSiblingOf
Non-identical twin KIN:011 isDizygoticMultipleBirthSiblingOf

Dashed child lines in Pedigree Studio (adoption) are exported as isAdoptiveParentOf rather than biological parent relationships.

Phenopackets Family (_phenopackets.json)

The GA4GH Phenopackets schema Family element, containing:

  • A PED-compatible pedigree with Person records (familyId, individualId, parents, sex, affectedStatus)
  • A proband Phenopacket with disease terms extracted from the legend
  • relatives Phenopackets for affected family members with their diseases
  • consanguinousParents flag if any consanguineous partnerships exist

Phenotype Mapping

Disease/condition names are taken from the Pedigree Studio legend labels. The converter maps visual markers to affected status using the same logic as studio2ped.

Multiple Pedigrees

If the session contains disconnected pedigrees, numbered file pairs are produced:

pedigree_1_ga4gh.json
pedigree_1_phenopackets.json
pedigree_2_ga4gh.json
pedigree_2_phenopackets.json

License

MIT

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

studio2ga4gh-0.2.0.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

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

studio2ga4gh-0.2.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file studio2ga4gh-0.2.0.tar.gz.

File metadata

  • Download URL: studio2ga4gh-0.2.0.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for studio2ga4gh-0.2.0.tar.gz
Algorithm Hash digest
SHA256 05ce91032e62a96b473e4e36abd86566b219542287ab89ddf0e0215f8a90dee0
MD5 b465d32f01d4c46a2945172fff06e00d
BLAKE2b-256 1c93e93802e90e373ce59a2d881a912eeb81ac51de21c17c3343e0963316f3fc

See more details on using hashes here.

File details

Details for the file studio2ga4gh-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: studio2ga4gh-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for studio2ga4gh-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6ea4c7c3cf932f47b93ced51881fa63589aba69ce7729c97e3f874b0209b46ad
MD5 ea3a02366227a356ad9a4889d12fe542
BLAKE2b-256 68ace78b9230d97660d9e0987f10ecfd7ff41671cb180ee872e87f7448cfc76d

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