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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for studio2ga4gh-0.3.0.tar.gz
Algorithm Hash digest
SHA256 6d2081ae4d6ae981b533320a39a2c7e3fcaf03b4ca9ca584a434ac785c2be483
MD5 b842906eae829e4e53c8cfc791f3403a
BLAKE2b-256 7213f2031b78846c0747bc84f0327e3c290d16e67a825afb3ff51cef937ad2bc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: studio2ga4gh-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 11.0 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3da0d71d648eaec6869453aa73e50e6d677c8e1eee3ac3c5980baef04d9effef
MD5 da45bda88d46f9e4ec787b9f64abea00
BLAKE2b-256 a1c621c20fde409ca102df0c4ceaaefb6785094704d290af616fa48e6c150dba

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