ga4gh / pedigree

Repository for the family history/pedigree project
https://pedigree.readthedocs.io/
11 stars 3 forks source link

The phenopacket examples are not valid phenopackets #37

Open cmungall opened 2 months ago

cmungall commented 2 months ago

I'm looking at the documentation to see if I can understand whether the proposed Conceptual Model is equivalent to or more expressive than the Phenopackets Pedigree element.

The examples page here https://pedigree.readthedocs.io/en/latest/examples.html is potentially useful here, but I'm confused by it. It says

"As a Phenopacket GA4GHPedigree message:"

and then gives:

id: FAM1
narrative: A Phenopacket GA4GHPedigree of a trio with an affected child
date: 2022-06-23
individuals:
  - id: 1
    subject:
      id: MOTHER
      sex: FEMALE
  - id: 2
    subject:
      id: FATHER
      sex: MALE
  - id: 3
    subject:
      id: CHILD
      sex: UNKNOWN
relationships:
  - individual_id: MOTHER
    relation:
      id: KIN:027
      label: isBiologicalMotherOf
    relative_id: CHILD
  - individual_id: FATHER
    relation:
      id: KIN:028
      label: isBiologicalFatherOf
    relative_id: CHILD
index_patients:
  - CHILD

But this doesn't seem to be conformant with the phenopacket spec

It looks more like a variant of the CM here (but differs in the cardinality of individual_id).

I think it would be very useful to look at examples of the same familiar relationships in different data models side by side, but I'm not totally sure what I am looking at here

cmungall commented 2 months ago

It looks like this is phenopackets is for an unreleased v1, not the current v2 standard.

Here is v1 on the pedigree branch: https://github.com/phenopackets/phenopacket-schema/blob/pedigree/src/main/proto/ga4gh/pedigree/v1/pedigree.proto

v2 is simpler: https://github.com/phenopackets/phenopacket-schema/blob/master/src/main/proto/phenopackets/schema/v2/core/pedigree.proto

julesjacobsen commented 2 months ago

The GA4GH Pedigree has been in flux for a while and I was trying to keep up with things using Phenopacket semantics for the conceptual model (https://github.com/phenopackets/phenopacket-schema/issues/333) rather than a standalone Pedigree schema which was originally proposed. The current Phenopacket-schema pedigree message (https://github.com/phenopackets/phenopacket-schema/blob/master/src/main/proto/phenopackets/schema/v2/core/pedigree.proto) predates the GA4GH Pedigree working group as it is the same as the Phenopacket-schema v1 pedigree (https://github.com/phenopackets/phenopacket-schema/blob/a22a652c9445de84e35eff9d393e9ec172442ec4/src/main/proto/phenopackets/schema/v1/base.proto#L367-L383) which is identical to a PED file.

cmungall commented 2 months ago

OK, so I think the docs in this repo at least need qualified. It should say "here is an example of a pedigree in a proposed extension to the current phenopackets standard"