Skip to main content

Convert GA4GH Pedigree Standard and Phenopackets to Pedigree Studio session JSON

Project description

ga4gh2studio

Convert GA4GH Pedigree Standard and Phenopackets Family files into Pedigree Studio session JSON.

The reverse complement of studio2ga4gh. Together they provide bidirectional interoperability between Pedigree Studio and the GA4GH ecosystem.

Installation

pip install ga4gh2studio

Usage

Command line

# From GA4GH Pedigree only
ga4gh2studio -g pedigree_ga4gh.json -o session.json

# From Phenopackets Family only
ga4gh2studio -p family_phenopackets.json -o session.json

# From both (GA4GH for structure, Phenopackets for disease labels)
ga4gh2studio -g pedigree_ga4gh.json -p family_phenopackets.json -o session.json

Python API

import ga4gh2studio, json

# From GA4GH Pedigree
with open("pedigree_ga4gh.json") as f:
    ga4gh = json.load(f)
result = ga4gh2studio.convert(ga4gh_data=ga4gh)
with open("session.json", "w") as f:
    json.dump(result.session, f, indent=2)

# From both sources
with open("family_phenopackets.json") as f:
    pp = json.load(f)
result = ga4gh2studio.convert(ga4gh_data=ga4gh, phenopackets_data=pp)
print(result.summary)

Input Handling

Input What it provides
GA4GH Pedigree only Full structure: parent-child (biological + adoptive), twins, sex, deceased status, proband
Phenopackets Family only PED-compatible structure (parents, sex, affected status) + disease labels
Both (recommended) GA4GH provides rich structure; Phenopackets enriches with disease names and vital status

Feature Mapping

GA4GH / Phenopackets Pedigree Studio
KIN:027 isBiologicalMotherOf Partnership + solid child link
KIN:028 isBiologicalFatherOf Partnership + solid child link
KIN:022 isAdoptiveParentOf Partnership + dashed child link
KIN:010 isMonozygoticTwin Identical twin link
KIN:011 isDizygoticTwin Non-identical twin link
indexPatients Proband arrow
Individual.deceased Deceased diagonal line
Individual.name / dateOfBirth Annotation text ("Name\nb. 1985")
Disease term labels Legend entries with distinct colours
Shared ancestors Consanguineous partnership (double line)

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

ga4gh2studio-0.2.0.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

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

ga4gh2studio-0.2.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ga4gh2studio-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f0f5a5e73d99cc04e29d27773d863668351525245ea0deb1c2b89b0891fd6bdb
MD5 beb3f291d18980ede2b5bf7b71b3053a
BLAKE2b-256 2f8ec12f15a65f5d0cd3a7462d5346a4ee98a3c9765fc9a96720bf9e2a51a0d9

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for ga4gh2studio-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a424396c60fc3e315c5c4f1b8764b8075f30b3aa9eb00c54fa4902c5f439277e
MD5 1d407d1479366f9f11f1c7b4e1c7f63c
BLAKE2b-256 3ce6acab44b1fdc6df7e3dc42e16fcb6dff3c66589e6feea461af4f745c3b331

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