Skip to content

Commit

Permalink
update to refcurie (#233)
Browse files Browse the repository at this point in the history
* update to refcurie

* process refCuries on containers
  • Loading branch information
ahwagner authored Nov 27, 2024
1 parent 0bc7d16 commit 997fe50
Show file tree
Hide file tree
Showing 14 changed files with 103 additions and 86 deletions.
2 changes: 1 addition & 1 deletion .requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pytest
sphinx ~= 7.2
sphinx-rtd-theme ~= 1.3
pyyaml
ga4gh.gks.metaschema==0.3.0b17
ga4gh.gks.metaschema==0.3.1
jsonschema
referencing
jupyterlab
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ imports:
vrs: ../../vrs/vrs-source.yaml
gks-core: ../../gks-core/gks-core-source.yaml

namespaces:
gks.core: /ga4gh/schema/gks-core/1.x/json/
vrs: /ga4gh/schema/vrs/2.x/json/
cat-vrs: /ga4gh/schema/cat-vrs/1.x/json/

$defs:
CohortAlleleFrequencyStudyResult:
inherits: va-core:StudyResult
Expand All @@ -28,8 +33,8 @@ $defs:
extends: focus
description: The Allele for which frequency results are reported.
oneOf:
- $ref: "/ga4gh/schema/vrs/2.x/json/Allele"
- $ref: "/ga4gh/schema/gks-core/1.x/json/iriReference"
- $refCurie: vrs:Allele
- $refCurie: gks.core:iriReference
focusAlleleCount:
type: integer
description: The number of occurrences of the focusAllele in the cohort.
Expand Down
13 changes: 8 additions & 5 deletions schema/va-spec/base/domain-entities-source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ strict: true
imports:
gks-core: ../../gks-core/gks-core-source.yaml

namespaces:
gks.core: /ga4gh/schema/gks-core/1.x/json/

$defs:
# Condition data structure for consolidating the different forms of conditions, individual vs co-occurring traits
Condition:
Expand All @@ -14,7 +17,7 @@ $defs:
A set of traits (TraitSet) or a single trait (Disease, Phenotype, etc.) that represents
the object of a Variant Pathogenicity statement.
oneOf:
- $ref: "/ga4gh/schema/gks-core/1.x/json/MappableConcept"
- $refCurie: gks.core:MappableConcept
- $ref: "#/$defs/TraitSet"

# TraitSet data structure to provide support for co-occuring traits (i.e. diseases, phenotypes, etc.)
Expand All @@ -29,7 +32,7 @@ $defs:
type: array
ordered: false
items:
$ref: "/ga4gh/schema/gks-core/1.x/json/MappableConcept"
$refCurie: gks.core:MappableConcept
description: >-
A list of conditions (diseases, phenotypes, traits) that are co-occurring.
minItems: 2
Expand All @@ -40,7 +43,7 @@ $defs:
description: >-
A group of therapies (TherapyGroup) or a single therapy (drug, procedure, behavioral intervention, etc.).
oneOf:
- $ref: "/ga4gh/schema/gks-core/1.x/json/MappableConcept"
- $refCurie: gks.core:MappableConcept
- $ref: "#/$defs/TherapyGroup"

# TherapyGroup data structure to provide support for combination therapies (i.e. drug treatment, etc.)
Expand All @@ -52,13 +55,13 @@ $defs:
A group of therapies that are applied together to treat a condition.
properties:
groupType:
$ref: "/ga4gh/schema/gks-core/1.x/json/MappableConcept"
$refCurie: gks.core:MappableConcept
description: The type of the therapy group.
therapies:
type: array
ordered: false
items:
$ref: "/ga4gh/schema/gks-core/1.x/json/MappableConcept"
$refCurie: gks.core:MappableConcept
description: >-
A list of therapies that are applied together to treat a condition.
minItems: 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ imports:
vrs: ../../vrs/vrs-source.yaml
gks-core: ../../gks-core/gks-core-source.yaml

namespaces:
gks.core: /ga4gh/schema/gks-core/1.x/json/
vrs: /ga4gh/schema/vrs/2.x/json/

$defs:
ExperimentalVariantFunctionalImpactStudyResult:
inherits: va-core:StudyResult
Expand All @@ -24,8 +28,8 @@ $defs:
focusVariant:
extends: focus
oneOf:
- $ref: "/ga4gh/schema/vrs/2.x/json/MolecularVariation"
- $ref: "/ga4gh/schema/gks-core/1.x/json/iriReference"
- $refCurie: vrs:MolecularVariation
- $refCurie: gks.core:iriReference
description: The genetic variant for which a functional impact score is generated.
functionalImpactScore:
type: number
Expand Down
12 changes: 6 additions & 6 deletions schema/va-spec/base/json/Contribution
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@
"$comment": "Extension objects have a key-value data structure that allows definition of custom fields in the data itself. Extensions are not expected to be natively understood, but may be used for pre-negotiated exchange of message attributes between systems."
},
"subtype": {
"$ref": "/ga4gh/schema/gks-core/1.x/json/MappableConcept",
"description": "A specific type of activity the Activity instance represents.",
"$comment": "This attribute can be used to report a specific type for the Activity in cases where a model does not define Activity subclasses for this purpose. Implementers can define their own set of data set type codes/terms, to match the needs of the domain or application."
"$comment": "This attribute can be used to report a specific type for the Activity in cases where a model does not define Activity subclasses for this purpose. Implementers can define their own set of data set type codes/terms, to match the needs of the domain or application.",
"$ref": "/ga4gh/schema/gks-core/1.x/json/MappableConcept"
},
"date": {
"$ref": "/ga4gh/schema/gks-core/1.x/json/date",
"description": "The date that the Activity was completed.",
"$comment": "By convention, populate this attribute with the date the activity was completed (e.g. in cases where the activity spans multiple days). The date MUST be formatted as a date string in ISO8601 format \"YYYY-MM-DD\"."
"$comment": "By convention, populate this attribute with the date the activity was completed (e.g. in cases where the activity spans multiple days). The date MUST be formatted as a date string in ISO8601 format \"YYYY-MM-DD\".",
"$ref": "/ga4gh/schema/gks-core/1.x/json/date"
},
"specifiedBy": {
"type": "array",
Expand Down Expand Up @@ -73,8 +73,8 @@
"$comment": "Note that this MUST be a single agent (which can be a Person, or an Organization). If multiple Agents contributed to an entity, a separate Contribution instances MUST be created to describe each."
},
"activityType": {
"$ref": "/ga4gh/schema/gks-core/1.x/json/MappableConcept",
"description": "The specific type of activity performed or role played by an agent in making the contribution (e.g. for a publication, agents may contribute as a primary author, editor, figure designer, data generator, etc.). Values of this property may be framed as activities, or as contribution roles (e.g. using terms from the Contribution Role Ontology (CRO))."
"description": "The specific type of activity performed or role played by an agent in making the contribution (e.g. for a publication, agents may contribute as a primary author, editor, figure designer, data generator, etc.). Values of this property may be framed as activities, or as contribution roles (e.g. using terms from the Contribution Role Ontology (CRO)).",
"$ref": "/ga4gh/schema/gks-core/1.x/json/MappableConcept"
}
},
"required": [
Expand Down
12 changes: 6 additions & 6 deletions schema/va-spec/base/json/DataSet
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
"subtype": {
"maturity": "draft",
"$comment": "This attribute can be used to report a specific type for the DataSet, in cases where a model does not define DataSet subclasses for this purpose. Implementers can define their own set of data set type codes/terms, to match the needs of the domain or application.",
"$ref": "/ga4gh/schema/gks-core/1.x/json/MappableConcept",
"description": "A specific type of data set the DataSet instance represents (e.g. a 'clinical data set', a 'sequencing data set', a 'gene expression data set', a 'genome annotation data set')"
"description": "A specific type of data set the DataSet instance represents (e.g. a 'clinical data set', a 'sequencing data set', a 'gene expression data set', a 'genome annotation data set')",
"$ref": "/ga4gh/schema/gks-core/1.x/json/MappableConcept"
},
"reportedIn": {
"oneOf": [
Expand All @@ -62,19 +62,19 @@
"description": "A document in which the the Method is reported."
},
"releaseDate": {
"$ref": "/ga4gh/schema/gks-core/1.x/json/date",
"description": "Indicates the date a version of a DataSet was formally released.",
"$comment": "This attribute may apply to version and distribution-level DataSet representations. It refers to when the data set was released, which may be different than the data set was generated."
"$comment": "This attribute may apply to version and distribution-level DataSet representations. It refers to when the data set was released, which may be different than the data set was generated.",
"$ref": "/ga4gh/schema/gks-core/1.x/json/date"
},
"version": {
"type": "string",
"description": "The version of the DataSet, as assigned by its creator.",
"$comment": "This property can capture version information for resources such as data sets and documents that get published and released as a unit for community use. These may go through rounds of revisions that add or modify content, but don\u2019t change the identity of the resource. Use this attribute in cases where version is not reflected in an identifier associated with the data set."
},
"license": {
"$ref": "/ga4gh/schema/gks-core/1.x/json/MappableConcept",
"description": "A specific license that dictates legal permissions for how a data set can be used (by whom, where, for what purposes, with what additional requirements, etc.)",
"$comment": "Where possible, provide a URL pointing to the license or a description of it (e.g. \"https://creativecommons.org/licenses/by/4.0/\"). Otherwise, provide a free-text name or description of the license (e.g. \"CC-BY\")."
"$comment": "Where possible, provide a URL pointing to the license or a description of it (e.g. \"https://creativecommons.org/licenses/by/4.0/\"). Otherwise, provide a free-text name or description of the license (e.g. \"CC-BY\").",
"$ref": "/ga4gh/schema/gks-core/1.x/json/MappableConcept"
}
},
"required": [
Expand Down
4 changes: 2 additions & 2 deletions schema/va-spec/base/json/Document
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
"subtype": {
"maturity": "draft",
"$comment": "This attribute can be used to report a specific type for the Document, in cases where a model does not define Document subclasses for this purpose. Implementers can define their own set of document type codes/terms, to match the needs of their application.",
"$ref": "/ga4gh/schema/gks-core/1.x/json/MappableConcept",
"description": "A specific type of document that a Document instance represents (e.g. 'publication', 'patent', 'pathology report')"
"description": "A specific type of document that a Document instance represents (e.g. 'publication', 'patent', 'pathology report')",
"$ref": "/ga4gh/schema/gks-core/1.x/json/MappableConcept"
},
"title": {
"type": "string",
Expand Down
8 changes: 4 additions & 4 deletions schema/va-spec/base/json/EvidenceLine
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,17 @@
"description": "The direction of support that the Evidence Line is determined to provide toward its target Proposition (supports, disputes, neutral)"
},
"strengthOfEvidenceProvided": {
"$ref": "/ga4gh/schema/gks-core/1.x/json/MappableConcept",
"description": "The strength of support that an Evidence Line is determined to provide for or against its target Proposition, evaluated relative to the direction indicated by the directionOfEvidenceProvided value.",
"$comment": "Values of this attribute can be defined by for a given profile based on domain/application needs, but should be framed in qualitative terms (e.g. 'strong', 'moderate', 'weak'). The 'scoreOfEvidenceProvided' attribute can be used to report quantitative assessments of evidence provided."
"$comment": "Values of this attribute can be defined by for a given profile based on domain/application needs, but should be framed in qualitative terms (e.g. 'strong', 'moderate', 'weak'). The 'scoreOfEvidenceProvided' attribute can be used to report quantitative assessments of evidence provided.",
"$ref": "/ga4gh/schema/gks-core/1.x/json/MappableConcept"
},
"scoreOfEvidenceProvided": {
"type": "number",
"description": "A quantitative score indicating the strength of support that an Evidence Line is determined to provide for or against its target Proposition, evaluated relative to the direction indicated by the directionOfEvidenceProvided value."
},
"evidenceOutcome": {
"$ref": "/ga4gh/schema/gks-core/1.x/json/MappableConcept",
"description": "A term summarizing the overall outcome of the evidence assessment represented by the Evidence Line, in terms of the direction and strength of support it provides for or against the target Proposition."
"description": "A term summarizing the overall outcome of the evidence assessment represented by the Evidence Line, in terms of the direction and strength of support it provides for or against the target Proposition.",
"$ref": "/ga4gh/schema/gks-core/1.x/json/MappableConcept"
}
},
"required": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
}
],
"description": "The assay that was performed to generate the reported functional impact score.",
"$comment": "Examples - a specific experimental protocol or data analysis specification that describe how data were generated, or an evidence interpretation guideline that describes steps taken to interpret data in making a variant pathogenicity classification. Note that this attribute captures specific *instances* of specifications/methods (e.g. the specific electron microscopy method described in https://doi.org/10.1002/cpz1.1045) - as opposed to reporting a *type* of method applied (e.g. 'Transmission Electron Microscopy')."
"$comment": "Examples: a specific experimental protocol or data analysis specification that describes how data were generated; an evidence interpretation guideline that describes steps taken to interpret data in making a variant pathogenicity classification; a method for using electron microscopy to image cell membrane proteins. Note that this attribute captures a specific *instance* of a specification or method (e.g. the specific electron microscopy method described in https://doi.org/10.1002/cpz1.1045) - as opposed to reporting a *type* of method applied (e.g. 'Transmission Electron Microscopy')."
},
"sourceDataSet": {
"$ref": "/ga4gh/schema/va-spec/1.x/base/json/DataSet",
Expand Down
4 changes: 2 additions & 2 deletions schema/va-spec/base/json/Method
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
"default": "Method"
},
"subtype": {
"$ref": "/ga4gh/schema/gks-core/1.x/json/MappableConcept",
"description": "A specific type of method that a Method instance represents (e.g. 'Variant Interpretation Guideline', or 'Experimental Protocol').",
"$comment": "This attribute can be used to report a specific type for the Method, in cases where a model does not define Method subclasses for this purpose. Implementers can define their own set of method type codes/terms, to match the needs of their application."
"$comment": "This attribute can be used to report a specific type for the Method, in cases where a model does not define Method subclasses for this purpose. Implementers can define their own set of method type codes/terms, to match the needs of their application.",
"$ref": "/ga4gh/schema/gks-core/1.x/json/MappableConcept"
},
"reportedIn": {
"oneOf": [
Expand Down
4 changes: 2 additions & 2 deletions schema/va-spec/base/json/Statement
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@
"description": "A quantitative score that indicates the strength of a Proposition's assessment in the direction indicated (i.e. how strongly supported or disputed the Proposition is believed to be). Depending on its implementation, a score may reflect how *confident* that agent is that the Proposition is true or false, or the *strength of evidence* they believe supports or disputes it. Instructions for how to interpret the menaing of a given score may be gleaned from the method or document referenced in 'specifiedBy' attribute. "
},
"classification": {
"$ref": "/ga4gh/schema/gks-core/1.x/json/MappableConcept",
"description": "A single term or phrase summarizing the outcome of direction and strength assessments of a Statement's Proposition, in terms of a classification of its subject.",
"$comment": "Permissible values for this attribute are typically selected to be succinct and familiar in the target community of practice - and can be provided to report of a statement's conclusion in user-friendly terms. For example, in a Statement assessing the proposition that \"BRCA2 c.8023A>G is pathogenic for Breast Cancer\", and reporting a direction of 'supports' and strength of 'likely', the term 'likely pathogenic' from the ACMG Variant Interpretation Guidelines would be used as a subject classification."
"$comment": "Permissible values for this attribute are typically selected to be succinct and familiar in the target community of practice - and can be provided to report of a statement's conclusion in user-friendly terms. For example, in a Statement assessing the proposition that \"BRCA2 c.8023A>G is pathogenic for Breast Cancer\", and reporting a direction of 'supports' and strength of 'likely', the term 'likely pathogenic' from the ACMG Variant Interpretation Guidelines would be used as a subject classification.",
"$ref": "/ga4gh/schema/gks-core/1.x/json/MappableConcept"
},
"hasEvidenceLines": {
"type": "array",
Expand Down
4 changes: 2 additions & 2 deletions schema/va-spec/base/json/TherapyGroup
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"$comment": "Extension objects have a key-value data structure that allows definition of custom fields in the data itself. Extensions are not expected to be natively understood, but may be used for pre-negotiated exchange of message attributes between systems."
},
"groupType": {
"$ref": "/ga4gh/schema/gks-core/1.x/json/MappableConcept",
"description": "The type of the therapy group."
"description": "The type of the therapy group.",
"$ref": "/ga4gh/schema/gks-core/1.x/json/MappableConcept"
},
"therapies": {
"type": "array",
Expand Down
8 changes: 4 additions & 4 deletions schema/va-spec/base/json/VariantPathogenicityProposition
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@
"$comment": "The object of a Proposition can be any Entity or concept that is related to the subject. When the subject is a genetic variation, the object is often a disease, phenotype, therapeutic intervention, or gene."
},
"penetranceQualifier": {
"$ref": "/ga4gh/schema/gks-core/1.x/json/MappableConcept",
"description": "Reports the penetrance of the pathogenic effect - i.e. the extent to which the variant impact is expressed by individuals carrying it as a measure of the proportion of carriers exhibiting the condition. "
"description": "Reports the penetrance of the pathogenic effect - i.e. the extent to which the variant impact is expressed by individuals carrying it as a measure of the proportion of carriers exhibiting the condition. ",
"$ref": "/ga4gh/schema/gks-core/1.x/json/MappableConcept"
},
"modeOfInheritanceQualifier": {
"$ref": "/ga4gh/schema/gks-core/1.x/json/MappableConcept",
"description": "Reports a pattern of inheritance expected for the pathogenic effect of the variant. HPO terms within the hierarchy of 'HP:0000005' (mode of inheritance) are recommended to specify."
"description": "Reports a pattern of inheritance expected for the pathogenic effect of the variant. HPO terms within the hierarchy of 'HP:0000005' (mode of inheritance) are recommended to specify.",
"$ref": "/ga4gh/schema/gks-core/1.x/json/MappableConcept"
}
},
"required": [
Expand Down
Loading

0 comments on commit 997fe50

Please sign in to comment.