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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for studio2ga4gh-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5ab55586e782c72a5ee945e094c69b21cc84169fe4c245e5cf676af92b73c255
MD5 1df884d9052ce5be8390e1171bcc8b3a
BLAKE2b-256 050345ab0832ed88174175fd49e6ba8b9a5472414cba4c8f6ca39e09febeda0c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: studio2ga4gh-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.6 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6bc58992d85b4fba34d5d913029460938203e5ded79ba56ec1037e0aaa352a84
MD5 090a93229334b8c4e153e76a3251da20
BLAKE2b-256 bd5dec6c3594d36cea4c02dfcc34df3bc5b08007c632c1b2648884482c13a60e

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