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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ga4gh2studio-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c98a78efe6f5d86c997c0645f9ab74037e6e9ca5810d3872b971c59fcf5e420b
MD5 f5393d51e57a6561c6f033dc7f969e4c
BLAKE2b-256 72b5c5c9c64017413708878d49c38871c48e22d58bfb7fabfb11f62ce60e53a9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ga4gh2studio-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.6 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7564fb0341e1f7f54e5346effc2cfbf859a83a1cead7a187df3968091fbc5e0f
MD5 8d1fe79b50bc7d43b712ce691a4475a6
BLAKE2b-256 53b816968e3ed6f2517767870440bc1eae5ec3cb4420d9c780cf9a1248c0aeb7

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