From 727b245c0ec0df71467344eef7d04cb07b00ae9e Mon Sep 17 00:00:00 2001 From: Jules Jacobsen Date: Thu, 23 Jun 2022 16:32:38 +0100 Subject: [PATCH 1/7] Add GA4GH Pedigree implementation --- .../proto/ga4gh/pedigree/v1/pedigree.proto | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 src/main/proto/ga4gh/pedigree/v1/pedigree.proto diff --git a/src/main/proto/ga4gh/pedigree/v1/pedigree.proto b/src/main/proto/ga4gh/pedigree/v1/pedigree.proto new file mode 100644 index 0000000..09cc6a3 --- /dev/null +++ b/src/main/proto/ga4gh/pedigree/v1/pedigree.proto @@ -0,0 +1,53 @@ +syntax = "proto3"; + +package org.ga4gh.pedigree.v1; + +import "phenopackets/schema/v2/phenopackets.proto"; +import "phenopackets/schema/v2/core/base.proto"; + +option java_multiple_files = true; +option java_package = "org.ga4gh.pedigree.v1"; + +// A GA4GH Pedigree - equivalent to the Phenopacket::Family message +message Pedigree { + + // External identifier for the family being investigated + string id = 1; + + // Identified Individual in the family of a health condition of focus being investigated: Proband, Consultand, + // First Person Tested Positive + repeated string index_patients = 2; + + // Collection of Individual who are the members of this pedigree + repeated org.phenopackets.schema.v2.Phenopacket individuals = 3; + + // Collection of Relationship between the individuals who are the members of this pedigree + repeated Relationship relationships = 4; + + // The reason for pedigree collection, a health condition of focus being investigated in the family; if any Individual + // has the affected property defined, it refers to this condition. + string reason = 5; + + // Status of the pedigree resource collection + string status = 6; + + // Summary of the pedigree resource for human interpretation + string narrative = 7; + + // The date the pedigree was collected or last updated, as ISO full or partial date, i.e. YYYY, YYYY-MM, or YYYY-MM-DD + string date = 8; + +} + +message Relationship { + // Identifier of the subject Individual; equivalent to the Biolink "subject" + string individual_id = 1; + + // The relationship the individual has to the relative (e.g., if the individual is the relative's biological mother, + // then relation could be isBiologicalMotherOf [KIN:027]). + // Terms should come from the KIN Ontology (http://purl.org/ga4gh/kin.owl). + org.phenopackets.schema.v2.core.OntologyClass relation = 2; + + // Identifier of the relative Individual; equivalent to the Biolink "object" + string relative_id = 3; +} \ No newline at end of file From 298707fe9b5006628c2e74b8086a1252f068319d Mon Sep 17 00:00:00 2001 From: Jules Jacobsen Date: Wed, 23 Nov 2022 18:59:32 +0000 Subject: [PATCH 2/7] Update pedigree.proto field order to match examples in external docs Add new Ga4ghPedigreeExamplesTest 'test' class --- docs/ga4gh-pedigree.rst | 89 +++++++++++++ pom.xml | 3 +- src/main/java/module-info.java | 2 + .../proto/ga4gh/pedigree/v1/pedigree.proto | 28 ++-- .../v1/Ga4ghPedigreeExamplesTest.java | 124 ++++++++++++++++++ 5 files changed, 231 insertions(+), 15 deletions(-) create mode 100644 docs/ga4gh-pedigree.rst create mode 100644 src/test/java/org/ga4gh/pedigree/v1/Ga4ghPedigreeExamplesTest.java diff --git a/docs/ga4gh-pedigree.rst b/docs/ga4gh-pedigree.rst new file mode 100644 index 0000000..ad77078 --- /dev/null +++ b/docs/ga4gh-pedigree.rst @@ -0,0 +1,89 @@ +.. _rsga4ghpedigree: + +############## +GA4GH Pedigree +############## + + +The Phenopacket-schema includes an implementation of the `GA4GH Pedigree Standard`_. +GA4GH Pedigree defines a conceptual model of individuals and their relationships to allow other standards, such as +Phenopackets to be able to create an implementation of this model using native concepts. For example, the Phenopacket +schema representation of an individual in the GA4GH Pedigree is a ref:`rstphenopacket`. + +The GA4GH Pedigree Standard allows for much greater expressivity of the relationships between individuals compared to the +PED model used in the ref:`rstfamily` message due to defining the relationships using the `Kinship ontology (KIN) `_ + + +Data model +########## + +The data model described here is transcribed from the `documentation `_ + +Pedigree +======== + +.. csv-table:: + :header: Field, Type, Multiplicity, Description + + id, string, 1..1, External identifier for the family being investigated + narrative, string, 0..1, Summary of the pedigree resource for human interpretation + date, string, 0..1, The date the pedigree was collected or last updated, as ISO full or partial date, i.e. YYYY, YYYY-MM, or YYYY-MM-DD + reason, string, 0..1, The reason for pedigree collection, a health condition of focus being investigated in the family; if any Individual has the affected property defined, it refers to this condition. + status, string, 0..1, Status of the pedigree resource collection + index_patients, string, 0..*, Identified Individual(s) in the family of a health condition of focus being investigated: Proband, Consultand, First Person Tested Positive + individuals, ref:`rstphenopacket`, 0..*, Collection of Individual who are the members of this pedigree + relationships, ref:`rsga4ghrelationship`, 0..*, Collection of Relationship between the individuals who are the members of this pedigree + + +.. _rsga4ghrelationship: + +Relationship +============ + +.. csv-table:: + :header: Field, Type, Multiplicity, Description + + individual, string, 1..1, Identifier of the subject Individual; equivalent to the Biolink "subject" + relation, ref:`rstontologyclass`, 1..1, The relationship the individual has to the relative (e.g., if the individual is the relative's biological mother, then relation could be isBiologicalMotherOf [KIN:027]); terms should come from the `KIN Ontology `_. + relative, string, 1..1, Identifier of the relative Individual; equivalent to the Biolink "object" + + +The identifier values used in the ``individual`` and ``relative`` fields **must** match a value in the **id** element +used in the :ref:`rstindividual` ``subject`` of the phenopackets listed in the ``pedigree`` ``individuals`` field. + + +Example +####### + +In this example we have simplified the phenopackets to include only the minimum required information to make a pedigree. +Ordinarily there should be more fields (e.g. the metadata) within the Phenopacket. + +.. code-block:: yaml + + --- + id: "FAM1" + narrative: "A Phenopacket GA4GHPedigree of a trio with an affected child" + date: "2022-11-22" + indexPatients: + - "CHILD" + individuals: + - subject: + id: "MOTHER" + sex: "FEMALE" + - subject: + id: "FATHER" + sex: "MALE" + - subject: + id: "CHILD" + relationships: + - individualId: "MOTHER" + relation: + id: "KIN:027" + label: "isBiologicalMother" + relativeId: "CHILD" + - individualId: "FATHER" + relation: + id: "KIN:028" + label: "isBiologicalFather" + relativeId: "CHILD" + diff --git a/pom.xml b/pom.xml index a9a94d5..298235e 100644 --- a/pom.xml +++ b/pom.xml @@ -212,8 +212,9 @@ org.apache.maven.plugins maven-surefire-plugin - 2.22.2 + 3.0.0-M7 + false **/FooTest.java diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java index 641712c..49855f3 100644 --- a/src/main/java/module-info.java +++ b/src/main/java/module-info.java @@ -9,4 +9,6 @@ exports org.ga4gh.vrs.v1; exports org.ga4gh.vrsatile.v1; + + exports org.ga4gh.pedigree.v1; } \ No newline at end of file diff --git a/src/main/proto/ga4gh/pedigree/v1/pedigree.proto b/src/main/proto/ga4gh/pedigree/v1/pedigree.proto index 09cc6a3..7bf0934 100644 --- a/src/main/proto/ga4gh/pedigree/v1/pedigree.proto +++ b/src/main/proto/ga4gh/pedigree/v1/pedigree.proto @@ -14,28 +14,28 @@ message Pedigree { // External identifier for the family being investigated string id = 1; - // Identified Individual in the family of a health condition of focus being investigated: Proband, Consultand, - // First Person Tested Positive - repeated string index_patients = 2; - - // Collection of Individual who are the members of this pedigree - repeated org.phenopackets.schema.v2.Phenopacket individuals = 3; + // Summary of the pedigree resource for human interpretation + string narrative = 2; - // Collection of Relationship between the individuals who are the members of this pedigree - repeated Relationship relationships = 4; + // The date the pedigree was collected or last updated, as ISO full or partial date, i.e. YYYY, YYYY-MM, or YYYY-MM-DD + string date = 3; // The reason for pedigree collection, a health condition of focus being investigated in the family; if any Individual // has the affected property defined, it refers to this condition. - string reason = 5; + string reason = 4; // Status of the pedigree resource collection - string status = 6; + string status = 5; - // Summary of the pedigree resource for human interpretation - string narrative = 7; + // Identified Individual in the family of a health condition of focus being investigated: Proband, Consultand, + // First Person Tested Positive + repeated string index_patients = 6; - // The date the pedigree was collected or last updated, as ISO full or partial date, i.e. YYYY, YYYY-MM, or YYYY-MM-DD - string date = 8; + // Collection of Individual who are the members of this pedigree + repeated org.phenopackets.schema.v2.Phenopacket individuals = 7; + + // Collection of Relationship between the individuals who are the members of this pedigree + repeated Relationship relationships = 8; } diff --git a/src/test/java/org/ga4gh/pedigree/v1/Ga4ghPedigreeExamplesTest.java b/src/test/java/org/ga4gh/pedigree/v1/Ga4ghPedigreeExamplesTest.java new file mode 100644 index 0000000..7863738 --- /dev/null +++ b/src/test/java/org/ga4gh/pedigree/v1/Ga4ghPedigreeExamplesTest.java @@ -0,0 +1,124 @@ +package org.ga4gh.pedigree.v1; + +import org.junit.jupiter.api.Test; +import org.phenopackets.schema.v2.Phenopacket; +import org.phenopackets.schema.v2.core.*; + +import java.io.IOException; + +import static org.phenopackets.schema.v2.PhenoPacketTestUtil.ontologyClass; + +/** + * Test cases / examples for the Phenopackets implementation of the GA4GH-Pedigree conceptual model + */ +class Ga4ghPedigreeExamplesTest { + + private static final OntologyClass BIOLOGICAL_MOTHER_OF = ontologyClass("KIN:027", "isBiologicalMother"); + private static final OntologyClass BIOLOGICAL_FATHER_OF = ontologyClass("KIN:028", "isBiologicalFather"); + private static final OntologyClass MONOZYGOTIC_TWIN_OF = ontologyClass("KIN:010", "isMonozygoticMultipleBirthSiblingOf"); + private static final OntologyClass ADOPTIVE_PARENT_OF = ontologyClass("KIN:022", "isAdoptiveParentOf"); + private static final OntologyClass GESTATIONAL_CARRIER_OF = ontologyClass("KIN:005", "isGestationalCarrierOf"); + private static final OntologyClass OVUM_DONOR_OF = ontologyClass("KIN:038", "isOvumDonorOf"); + + private static Relationship.Builder relationship(Phenopacket subject, OntologyClass relationship, Phenopacket relative) { + return Relationship.newBuilder() + .setIndividualId(subject.getSubject().getId()) + .setRelation(relationship) + .setRelativeId(relative.getSubject().getId()); + } + + @Test + void simpleTrio() throws IOException { + Phenopacket mother = Phenopacket.newBuilder().setId("1").setSubject(Individual.newBuilder().setId("MOTHER").setSex(Sex.FEMALE)).build(); + Phenopacket father = Phenopacket.newBuilder().setId("2").setSubject(Individual.newBuilder().setId("FATHER").setSex(Sex.MALE)).build(); + Phenopacket proband = Phenopacket.newBuilder().setId("3").setSubject(Individual.newBuilder().setId("CHILD").setSex(Sex.UNKNOWN_SEX)).build(); + + Pedigree pedigree = Pedigree.newBuilder() + .setId("FAM1") + .setNarrative("A Phenopacket GA4GHPedigree of a trio with an affected child") + .setDate("2022-06-23") + .addIndexPatients(proband.getSubject().getId()) + .addIndividuals(mother) + .addIndividuals(father) + .addIndividuals(proband) + .addRelationships(relationship(mother, BIOLOGICAL_MOTHER_OF, proband)) + .addRelationships(relationship(father, BIOLOGICAL_FATHER_OF, proband)) + .build(); + +// System.out.println(FormatMapper.messageToYaml(pedigree)); + } + + @Test + void twins() throws IOException { + Phenopacket mother = Phenopacket.newBuilder().setId("1").setSubject(Individual.newBuilder().setId("MOTHER").setSex(Sex.FEMALE)).build(); + Phenopacket father = Phenopacket.newBuilder().setId("2").setSubject(Individual.newBuilder().setId("FATHER").setSex(Sex.MALE)).build(); + Phenopacket twin1 = Phenopacket.newBuilder().setId("3").setSubject(Individual.newBuilder().setId("TWIN1").setSex(Sex.UNKNOWN_SEX)).build(); + Phenopacket twin2 = Phenopacket.newBuilder().setId("4").setSubject(Individual.newBuilder().setId("TWIN2").setSex(Sex.UNKNOWN_SEX)).build(); + + Pedigree pedigree = Pedigree.newBuilder() + .setId("FAM2") + .setNarrative("A Phenopacket GA4GHPedigree of a couple with identical twins") + .setDate("2022-06-23") + .addIndividuals(mother) + .addIndividuals(father) + .addIndividuals(twin1) + .addIndividuals(twin2) + .addRelationships(relationship(mother, BIOLOGICAL_MOTHER_OF, twin1)) + .addRelationships(relationship(mother, BIOLOGICAL_MOTHER_OF, twin2)) + .addRelationships(relationship(father, BIOLOGICAL_FATHER_OF, twin1)) + .addRelationships(relationship(father, BIOLOGICAL_FATHER_OF, twin2)) + .addRelationships(relationship(twin1, MONOZYGOTIC_TWIN_OF, twin2)) + .addRelationships(relationship(twin2, MONOZYGOTIC_TWIN_OF, twin1)) + .build(); + +// System.out.println(FormatMapper.messageToYaml(pedigree)); + } + + @Test + void adoption() throws IOException { + Phenopacket mother = Phenopacket.newBuilder().setId("1").setSubject(Individual.newBuilder().setId("MOTHER").setSex(Sex.FEMALE)).build(); + Phenopacket father = Phenopacket.newBuilder().setId("3").setSubject(Individual.newBuilder().setId("FATHER").setSex(Sex.MALE)).build(); + Phenopacket biologicalMother = Phenopacket.newBuilder().setId("2").setSubject(Individual.newBuilder().setId("BIOLOGICAL_MOTHER").setSex(Sex.FEMALE)).build(); + Phenopacket child = Phenopacket.newBuilder().setId("4").setSubject(Individual.newBuilder().setId("CHILD").setSex(Sex.UNKNOWN_SEX)).build(); + + Pedigree pedigree = Pedigree.newBuilder() + .setId("FAM3") + .setNarrative("A Phenopacket GA4GHPedigree of a child with an adoptive mother") + .setDate("2022-06-23") + .addIndividuals(mother) + .addIndividuals(biologicalMother) + .addIndividuals(father) + .addIndividuals(child) + .addRelationships(relationship(mother, ADOPTIVE_PARENT_OF, child)) + .addRelationships(relationship(biologicalMother, BIOLOGICAL_MOTHER_OF, child)) + .addRelationships(relationship(father, BIOLOGICAL_FATHER_OF, child)) + .build(); + +// System.out.println(FormatMapper.messageToYaml(pedigree)); + } + + @Test + void ivf() throws IOException { + Phenopacket mother = Phenopacket.newBuilder().setId("1").setSubject(Individual.newBuilder().setId("MOTHER").setSex(Sex.FEMALE)).build(); + Phenopacket father = Phenopacket.newBuilder().setId("3").setSubject(Individual.newBuilder().setId("FATHER").setSex(Sex.MALE)).build(); + Phenopacket surrogate = Phenopacket.newBuilder().setId("2").setSubject(Individual.newBuilder().setId("SURROGATE").setSex(Sex.FEMALE)).build(); + Phenopacket child = Phenopacket.newBuilder().setId("4").setSubject(Individual.newBuilder().setId("CHILD").setSex(Sex.UNKNOWN_SEX)).build(); + + Pedigree pedigree = Pedigree.newBuilder() + .setId("FAM4") + .setNarrative("A Phenopacket GA4GHPedigree of a child with an egg donor, gestational carrier, and biological father") + .setDate("2022-06-23") + .addIndividuals(mother) + .addIndividuals(surrogate) + .addIndividuals(father) + .addIndividuals(child) + .addRelationships(relationship(mother, OVUM_DONOR_OF, child)) + .addRelationships(relationship(surrogate, GESTATIONAL_CARRIER_OF, child)) + .addRelationships(relationship(father, BIOLOGICAL_FATHER_OF, child)) + .build(); + +// System.out.println(FormatMapper.messageToYaml(pedigree)); + } +} + + From 2e596170dfcf11b73512dc1cf998dd5d7e4068fb Mon Sep 17 00:00:00 2001 From: Jules Jacobsen Date: Wed, 23 Nov 2022 19:01:54 +0000 Subject: [PATCH 3/7] Add new ga4gh-interoperability.rst Update index.rst --- docs/ga4gh-interoperability.rst | 8 ++++++++ docs/index.rst | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 docs/ga4gh-interoperability.rst diff --git a/docs/ga4gh-interoperability.rst b/docs/ga4gh-interoperability.rst new file mode 100644 index 0000000..5364ba3 --- /dev/null +++ b/docs/ga4gh-interoperability.rst @@ -0,0 +1,8 @@ +###################### +GA4GH Interoperability +###################### + +.. toctree:: + :maxdepth: 1 + + GA4GH Pedigree Standard diff --git a/docs/index.rst b/docs/index.rst index 296860c..6e7698a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -29,4 +29,4 @@ use `this link `_. recommended-ontologies working examples - + ga4gh-interoperability From c1522ccc602f5def400da0ea3421bd2159835627 Mon Sep 17 00:00:00 2001 From: Jules Jacobsen Date: Wed, 23 Nov 2022 21:10:11 +0000 Subject: [PATCH 4/7] Remove outdated pedigree::reason from pedigree.proto Update example in docs to match pedigree docs examples --- docs/ga4gh-pedigree.rst | 11 +++++++---- src/main/proto/ga4gh/pedigree/v1/pedigree.proto | 4 ---- .../ga4gh/pedigree/v1/Ga4ghPedigreeExamplesTest.java | 3 ++- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/ga4gh-pedigree.rst b/docs/ga4gh-pedigree.rst index ad77078..2ef9078 100644 --- a/docs/ga4gh-pedigree.rst +++ b/docs/ga4gh-pedigree.rst @@ -63,17 +63,20 @@ Ordinarily there should be more fields (e.g. the metadata) within the Phenopacke --- id: "FAM1" narrative: "A Phenopacket GA4GHPedigree of a trio with an affected child" - date: "2022-11-22" + date: "2022-06-23" indexPatients: - "CHILD" individuals: - - subject: + - id: "1" + subject: id: "MOTHER" sex: "FEMALE" - - subject: + - id: "2" + subject: id: "FATHER" sex: "MALE" - - subject: + - id: "3" + subject: id: "CHILD" relationships: - individualId: "MOTHER" diff --git a/src/main/proto/ga4gh/pedigree/v1/pedigree.proto b/src/main/proto/ga4gh/pedigree/v1/pedigree.proto index 7bf0934..7f61a29 100644 --- a/src/main/proto/ga4gh/pedigree/v1/pedigree.proto +++ b/src/main/proto/ga4gh/pedigree/v1/pedigree.proto @@ -20,10 +20,6 @@ message Pedigree { // The date the pedigree was collected or last updated, as ISO full or partial date, i.e. YYYY, YYYY-MM, or YYYY-MM-DD string date = 3; - // The reason for pedigree collection, a health condition of focus being investigated in the family; if any Individual - // has the affected property defined, it refers to this condition. - string reason = 4; - // Status of the pedigree resource collection string status = 5; diff --git a/src/test/java/org/ga4gh/pedigree/v1/Ga4ghPedigreeExamplesTest.java b/src/test/java/org/ga4gh/pedigree/v1/Ga4ghPedigreeExamplesTest.java index 7863738..4551ed6 100644 --- a/src/test/java/org/ga4gh/pedigree/v1/Ga4ghPedigreeExamplesTest.java +++ b/src/test/java/org/ga4gh/pedigree/v1/Ga4ghPedigreeExamplesTest.java @@ -3,6 +3,7 @@ import org.junit.jupiter.api.Test; import org.phenopackets.schema.v2.Phenopacket; import org.phenopackets.schema.v2.core.*; +import org.phenopackets.schema.v2.io.FormatMapper; import java.io.IOException; @@ -45,7 +46,7 @@ void simpleTrio() throws IOException { .addRelationships(relationship(father, BIOLOGICAL_FATHER_OF, proband)) .build(); -// System.out.println(FormatMapper.messageToYaml(pedigree)); + System.out.println(FormatMapper.messageToYaml(pedigree)); } @Test From fdcd873fb6ffa8525d65969d83e6763c640f4205 Mon Sep 17 00:00:00 2001 From: Jules Jacobsen Date: Thu, 24 Nov 2022 10:35:49 +0000 Subject: [PATCH 5/7] Update ga4gh-pedigree.rst and examples for clarity and grammar. --- docs/ga4gh-pedigree.rst | 32 ++++++++++++++----- .../v1/Ga4ghPedigreeExamplesTest.java | 8 ++--- 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/docs/ga4gh-pedigree.rst b/docs/ga4gh-pedigree.rst index 2ef9078..cc0dd7a 100644 --- a/docs/ga4gh-pedigree.rst +++ b/docs/ga4gh-pedigree.rst @@ -5,12 +5,12 @@ GA4GH Pedigree ############## -The Phenopacket-schema includes an implementation of the `GA4GH Pedigree Standard`_. +The Phenopacket-schema includes an implementation of the `GA4GH Pedigree Standard `_. GA4GH Pedigree defines a conceptual model of individuals and their relationships to allow other standards, such as Phenopackets to be able to create an implementation of this model using native concepts. For example, the Phenopacket schema representation of an individual in the GA4GH Pedigree is a ref:`rstphenopacket`. -The GA4GH Pedigree Standard allows for much greater expressivity of the relationships between individuals compared to the +The GA4GH Pedigree Standard enables much greater expressivity of the relationships between individuals compared to the PED model used in the ref:`rstfamily` message due to defining the relationships using the `Kinship ontology (KIN) `_ @@ -27,14 +27,20 @@ Pedigree id, string, 1..1, External identifier for the family being investigated narrative, string, 0..1, Summary of the pedigree resource for human interpretation - date, string, 0..1, The date the pedigree was collected or last updated, as ISO full or partial date, i.e. YYYY, YYYY-MM, or YYYY-MM-DD - reason, string, 0..1, The reason for pedigree collection, a health condition of focus being investigated in the family; if any Individual has the affected property defined, it refers to this condition. + date, string, 0..1, The date the pedigree was collected or last updated as ISO full or partial date i.e. YYYY or YYYY-MM or YYYY-MM-DD status, string, 0..1, Status of the pedigree resource collection - index_patients, string, 0..*, Identified Individual(s) in the family of a health condition of focus being investigated: Proband, Consultand, First Person Tested Positive + index_patients, string, 0..*, Identified Individual(s) in the family of a health condition of focus being investigated. individuals, ref:`rstphenopacket`, 0..*, Collection of Individual who are the members of this pedigree relationships, ref:`rsga4ghrelationship`, 0..*, Collection of Relationship between the individuals who are the members of this pedigree +index_patients +~~~~~~~~~~~~~~ + +A list of identifiers for the individual(s) in the family affected with the health condition being investigated. These +individuals(s) are often termed the Proband, Consultand or First Person Tested Positive. + + .. _rsga4ghrelationship: Relationship @@ -44,25 +50,35 @@ Relationship :header: Field, Type, Multiplicity, Description individual, string, 1..1, Identifier of the subject Individual; equivalent to the Biolink "subject" - relation, ref:`rstontologyclass`, 1..1, The relationship the individual has to the relative (e.g., if the individual is the relative's biological mother, then relation could be isBiologicalMotherOf [KIN:027]); terms should come from the `KIN Ontology `_. + relation, ref:`rstontologyclass`, 1..1, The relationship the individual has to the relative. relative, string, 1..1, Identifier of the relative Individual; equivalent to the Biolink "object" +individual and relative +~~~~~~~~~~~~~~~~~~~~~~~ + The identifier values used in the ``individual`` and ``relative`` fields **must** match a value in the **id** element used in the :ref:`rstindividual` ``subject`` of the phenopackets listed in the ``pedigree`` ``individuals`` field. +relation +~~~~~~~~ + +An ref:`rstontologyclass` from the `KIN Ontology `_ indicating the relationship the +``individual`` has to the ``relative`` e.g. if the individual is the relative's biological mother, then relation should +be isBiologicalMotherOf [KIN:027]. + Example ####### In this example we have simplified the phenopackets to include only the minimum required information to make a pedigree. -Ordinarily there should be more fields (e.g. the metadata) within the Phenopacket. +Ordinarily there should be more fields (e.g. the ref:`rstmetadata`) within the phenopacket. .. code-block:: yaml --- id: "FAM1" - narrative: "A Phenopacket GA4GHPedigree of a trio with an affected child" + narrative: "A Phenopacket GA4GH Pedigree of a trio with an affected child" date: "2022-06-23" indexPatients: - "CHILD" diff --git a/src/test/java/org/ga4gh/pedigree/v1/Ga4ghPedigreeExamplesTest.java b/src/test/java/org/ga4gh/pedigree/v1/Ga4ghPedigreeExamplesTest.java index 4551ed6..9bff1d6 100644 --- a/src/test/java/org/ga4gh/pedigree/v1/Ga4ghPedigreeExamplesTest.java +++ b/src/test/java/org/ga4gh/pedigree/v1/Ga4ghPedigreeExamplesTest.java @@ -36,7 +36,7 @@ void simpleTrio() throws IOException { Pedigree pedigree = Pedigree.newBuilder() .setId("FAM1") - .setNarrative("A Phenopacket GA4GHPedigree of a trio with an affected child") + .setNarrative("A Phenopacket Schema GA4GH Pedigree of a trio with an affected child") .setDate("2022-06-23") .addIndexPatients(proband.getSubject().getId()) .addIndividuals(mother) @@ -58,7 +58,7 @@ void twins() throws IOException { Pedigree pedigree = Pedigree.newBuilder() .setId("FAM2") - .setNarrative("A Phenopacket GA4GHPedigree of a couple with identical twins") + .setNarrative("A Phenopacket Schema GA4GH Pedigree of a couple with identical twins") .setDate("2022-06-23") .addIndividuals(mother) .addIndividuals(father) @@ -84,7 +84,7 @@ void adoption() throws IOException { Pedigree pedigree = Pedigree.newBuilder() .setId("FAM3") - .setNarrative("A Phenopacket GA4GHPedigree of a child with an adoptive mother") + .setNarrative("A Phenopacket Schema GA4GH Pedigree of a child with an adoptive mother") .setDate("2022-06-23") .addIndividuals(mother) .addIndividuals(biologicalMother) @@ -107,7 +107,7 @@ void ivf() throws IOException { Pedigree pedigree = Pedigree.newBuilder() .setId("FAM4") - .setNarrative("A Phenopacket GA4GHPedigree of a child with an egg donor, gestational carrier, and biological father") + .setNarrative("A Phenopacket Schema GA4GH Pedigree of a child with an egg donor, gestational carrier, and biological father") .setDate("2022-06-23") .addIndividuals(mother) .addIndividuals(surrogate) From 20ec333ccce9f7f05d191a617c85e5c0ae571c16 Mon Sep 17 00:00:00 2001 From: Jules Jacobsen Date: Thu, 24 Nov 2022 10:36:43 +0000 Subject: [PATCH 6/7] Delete vestigial pharmaceutical-treatment.rst and version2.rst files form docs --- docs/pharmaceutical-treatment.rst | 82 ------------------------------- docs/version2.rst | 40 --------------- 2 files changed, 122 deletions(-) delete mode 100644 docs/pharmaceutical-treatment.rst delete mode 100644 docs/version2.rst diff --git a/docs/pharmaceutical-treatment.rst b/docs/pharmaceutical-treatment.rst deleted file mode 100644 index 946e31f..0000000 --- a/docs/pharmaceutical-treatment.rst +++ /dev/null @@ -1,82 +0,0 @@ -.. _rstpharmaceuticaltreatment: - -======================== -Pharmaceutical treatment -======================== - - -This represents treatment with a pharmaceutical agent, broadly defined -as prescription and over-the-counter -medicines, vaccines, and large-molecule biologic therapies. - - -**Data model** - - -.. list-table:: Definition of the ``PharmaceuticalTreatment`` element - :widths: 25 25 50 50 - :header-rows: 1 - - * - Field - - Type - - Status - - Description - * - drug - - OntologyClass - - required - - The drug. - * - route_of_administration - - OntologyClass - - recommended - - How was the drug administered? - * - dose_intervals - - DoseInterval (list) - - recommended - - dosages - * - drug_type - - DrugType - - optional - - Context of the drug administration - * - stop_reason_id - - StopReason - - optional - - reason to stop taking the drug - - -drug -~~~~ -An ontology term representing the pharmaceutical agent. This can be -a term from `DrugCentral `_, -`RxNorm `_, -`Drugbank `_, -`ChEBI `_, or other ontologies. - - -route_of_administration -~~~~~~~~~~~~~~~~~~~~~~~ -How the drug is administered, e.g., by mouth or intravenously. This can be -specified by ontology terms from the NCIT subhierarchy for -`Route of Administration `_. - - -dose_intervals -~~~~~~~~~~~~~~ -block of time in which the dosage of a medication was -constant, e.g., 30 mg/day for an interval of 10 days. -See :ref:`rstdoseinterval`. - - -drug_type -~~~~~~~~~ -The context in which a drug was administered. -See :ref:`rstdrugtype`. - - - -stop_reason_id -~~~~~~~~~~~~~~ -the reason for which a medication was discontinued. -See :ref:`rststopreason`. -Todo -- if the medication is still ongoing, we will need to represent this. - - diff --git a/docs/version2.rst b/docs/version2.rst deleted file mode 100644 index 9de7503..0000000 --- a/docs/version2.rst +++ /dev/null @@ -1,40 +0,0 @@ -.. _rstversion2: - -===================== -Phenopacket version 2 -===================== - -Version 1 of phenopackets was approved by GA4GH in `October, 2019 `_. -Based on initial experiences and feedback from multiple sources, we are planning to -extend version 1 to include better representation of the time course of disease, treatment, -and cancer-related data. Discussions are planned in the GA4GH -Clin/Pheno Full WS & Phenopackets Subgroups. Newcomers are welcome, please contact -the `GA4GH `_ to get involved! - -A number of new elements are now open for discussion by the community in the -`v1.1 branch `_ of -the phenopackets GitHub repository. - - -Version 2.0 -~~~~~~~~~~~ - -.. toctree:: - :maxdepth: 1 - - apiversion - dose-interval - drug-type - exposure - interval - medical-action - pharmaceutical-treatment - quantity - stop-reason - time-element - vital-status - - -We anticipate that version 2.0 will contain a very few breaking (backwards-incompatible) -changes affecting the representation of time and dates. These changes will be brought to the -GA4GH steering committee before release. \ No newline at end of file From 6d6e780655cdd9ace1c75847f8898041d066ae46 Mon Sep 17 00:00:00 2001 From: Jules Jacobsen Date: Thu, 24 Nov 2022 10:40:47 +0000 Subject: [PATCH 7/7] Fix broken refs in ga4gh-pedigree.rst --- docs/ga4gh-pedigree.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/ga4gh-pedigree.rst b/docs/ga4gh-pedigree.rst index cc0dd7a..71b0e53 100644 --- a/docs/ga4gh-pedigree.rst +++ b/docs/ga4gh-pedigree.rst @@ -8,10 +8,10 @@ GA4GH Pedigree The Phenopacket-schema includes an implementation of the `GA4GH Pedigree Standard `_. GA4GH Pedigree defines a conceptual model of individuals and their relationships to allow other standards, such as Phenopackets to be able to create an implementation of this model using native concepts. For example, the Phenopacket -schema representation of an individual in the GA4GH Pedigree is a ref:`rstphenopacket`. +schema representation of an individual in the GA4GH Pedigree is a :ref:`rstphenopacket`. The GA4GH Pedigree Standard enables much greater expressivity of the relationships between individuals compared to the -PED model used in the ref:`rstfamily` message due to defining the relationships using the `Kinship ontology (KIN) `_ +PED model used in the :ref:`rstfamily` message due to defining the relationships using the `Kinship ontology (KIN) `_ Data model @@ -30,8 +30,8 @@ Pedigree date, string, 0..1, The date the pedigree was collected or last updated as ISO full or partial date i.e. YYYY or YYYY-MM or YYYY-MM-DD status, string, 0..1, Status of the pedigree resource collection index_patients, string, 0..*, Identified Individual(s) in the family of a health condition of focus being investigated. - individuals, ref:`rstphenopacket`, 0..*, Collection of Individual who are the members of this pedigree - relationships, ref:`rsga4ghrelationship`, 0..*, Collection of Relationship between the individuals who are the members of this pedigree + individuals, :ref:`rstphenopacket`, 0..*, Collection of Individual who are the members of this pedigree + relationships, :ref:`rstga4ghrelationship`, 0..*, Collection of Relationship between the individuals who are the members of this pedigree index_patients @@ -41,7 +41,7 @@ A list of identifiers for the individual(s) in the family affected with the heal individuals(s) are often termed the Proband, Consultand or First Person Tested Positive. -.. _rsga4ghrelationship: +.. _rstga4ghrelationship: Relationship ============ @@ -50,7 +50,7 @@ Relationship :header: Field, Type, Multiplicity, Description individual, string, 1..1, Identifier of the subject Individual; equivalent to the Biolink "subject" - relation, ref:`rstontologyclass`, 1..1, The relationship the individual has to the relative. + relation, :ref:`rstontologyclass`, 1..1, The relationship the individual has to the relative. relative, string, 1..1, Identifier of the relative Individual; equivalent to the Biolink "object" @@ -63,7 +63,7 @@ used in the :ref:`rstindividual` ``subject`` of the phenopackets listed in the ` relation ~~~~~~~~ -An ref:`rstontologyclass` from the `KIN Ontology `_ indicating the relationship the +An :ref:`rstontologyclass` from the `KIN Ontology `_ indicating the relationship the ``individual`` has to the ``relative`` e.g. if the individual is the relative's biological mother, then relation should be isBiologicalMotherOf [KIN:027]. @@ -72,7 +72,7 @@ Example ####### In this example we have simplified the phenopackets to include only the minimum required information to make a pedigree. -Ordinarily there should be more fields (e.g. the ref:`rstmetadata`) within the phenopacket. +Ordinarily there should be more fields (e.g. the :ref:`rstmetadata`) within the phenopacket. .. code-block:: yaml