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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ga4gh2studio-0.3.0.tar.gz
Algorithm Hash digest
SHA256 5b1dce35f6f0754f6b5038042b2aff87e00a2076251895be09c08144277f5b9c
MD5 37a6e8be5a5bbd0f5a8ffde6b51665e9
BLAKE2b-256 b7aba786f190d64f09f1c32ca331324f141f34d0d114c62c59d62eae8d48b056

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ga4gh2studio-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 12.2 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8299b8ded88f2aff67c5f18c95e49993229cf89107d5918e2b68c41c9f5c4837
MD5 8f474e521da642eef7df0d54737a6dc3
BLAKE2b-256 d19bbf33854b33c90e52107c01e801e87d89e7418e5cb3af4203eaeaac09fb09

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