Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example implementation of is_a #171

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 13 additions & 29 deletions schema/va-spec/core-im/core-im-source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ namespaces:
catvrs: ../../catvrs/catvrs.json#/$defs/
vrs: ../../vrs/vrs.json#/$defs/

$slotdefs:
subject:
description: The subject slot of a class using the SPOQ terms.
predicate:
description: The predicate slot of a class using the SPOQ terms.
object:
description: The object slot of a class using the SPOQ terms.
qualifier:
description: A qualifier slot of a class using the SPOQ terms.

$defs:
InformationEntity:
inherits: gks.common:Entity
Expand Down Expand Up @@ -302,35 +312,10 @@ $defs:
inherits: InformationEntity
description: >-
A Statement (aka "Assertion") represents a claim of purported truth as made by a particular agent,
on a particular occasion.
on a particular occasion. In addition to the properties shared by all Statements, statements MUST
also have properties inheriting from Subject<ref> and Predicate<ref>, MAY also have a property inheriting
from Object<ref> and MAY also have one or more properties inheriting from Qualifier<ref>.
heritableProperties:
subject:
oneOf:
- type: string
description: The subject of the Statement.
predicate:
type: string
description: The predicate of the Statement.
object:
oneOf:
- type: string
description: The object of the Statement.
# Note that the `qualifier` property below is a *placeholder* that should not be inherited or used
# as is in dervied Statement profiles. It is meant to be specialized into more specifc properties
# that are defined to capture a specifc kind of qualifying information relevant to a particular
# Statement profile. e.g. for a VariantPathogenicityStatement, it is specalized into
# 'modeOfInheritanceQualifier' and 'geneContextQualifier' properties.
# Commenting out this property for now to aviod its unwanted inheritance in Statement profiles.
# Ww will re-instate this property once we determine if/how the metaschema processer can evolve to support
# the use case described in the 'comment' below, and discussed in va-spec issue #134.
#
# qualifier:
# type: object
# placeholder: true # example of what a flag on core-im properties meant to be placeholders might look like
# description: >-
# An additional piece of information that extends or refines the meaning of the core
# subject-predicate-object 'triple' - by providing additional details, precision, or
# constraining the statement to apply in a particular context.
direction:
type: string
enum:
Expand Down Expand Up @@ -397,7 +382,6 @@ $defs:
a Statement directly to a piece of evidence supporting it, bypassing the Evidence Line class
when used data creators do not utilize an Evidence Line object.
heritableRequired:
- subject
- direction

StudyResult:
Expand Down
40 changes: 28 additions & 12 deletions schema/va-spec/profiles/json/VariantPathogenicityStatement
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@
"default": "VariantPathogenicityStatement",
"description": "MUST be \"VariantPathogenicityStatement\"."
},
"subjectVariant": {
"variant": {
"is_a": {
"$ref": "../core-im/core-im.json#/$slotdefs/subject"
},
"oneOf": [
{
"$ref": "/ga4gh/schema/catvrs/1.x/json/CategoricalVariation"
Expand All @@ -168,12 +171,16 @@
],
"description": "A variant that is the subject of the Statement."
},
"predicate": {
"type": "string",
"description": "The predicate of the Statement.",
"causality": {
"is_a": {
"$ref": "../core-im/core-im.json#/$slotdefs/predicate"
},
"const": "isCausalFor"
},
"objectCondition": {
"condition": {
"is_a": {
"$ref": "../core-im/core-im.json#/$slotdefs/object"
},
"oneOf": [
{
"$ref": "/ga4gh/schema/gks-common/1.x/json/IRI"
Expand All @@ -184,7 +191,10 @@
],
"description": "The Condition for which the variant impact is stated."
},
"penetranceQualifier": {
"penetrance": {
"is_a": {
"$ref": "../core-im/core-im.json#/$slotdefs/qualifier"
},
"type": "string",
"enum": [
"high",
Expand All @@ -193,7 +203,10 @@
],
"description": "Extends the statement to report 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."
},
"modeOfInheritanceQualifier": {
"modeOfInheritance": {
"is_a": {
"$ref": "../core-im/core-im.json#/$slotdefs/qualifier"
},
"type": "string",
"enum": [
"autosomal dominant",
Expand All @@ -204,18 +217,21 @@
],
"description": "Reports a pattern of inheritance expected for the pathogenic effect of the variant. "
},
"geneContextQualifier": {
"geneContext": {
"is_a": {
"$ref": "../core-im/core-im.json#/$slotdefs/qualifier"
},
"description": "Reports the gene through which the pathogenic effect asserted for the variant is mediated (i.e. it is the variant's impact on this gene that is responsible for causing the condition).",
"$ref": "/ga4gh/schema/gks-domain-entities/1.x/json/Gene"
}
},
"required": [
"causality",
"condition",
"direction",
"id",
"objectCondition",
"predicate",
"subjectVariant",
"type"
"type",
"variant"
],
"additionalProperties": false
}
58 changes: 34 additions & 24 deletions schema/va-spec/profiles/profiles-source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ imports:

namespaces:
va.core: ../core-im/core-im.json#/$defs/
va.core.slots: ../core-im/core-im.json#/$slotdefs/
gks.common: ../../gks-common/common.json#/$defs/
gks.domain-entities: ../../gks-domain-entities/domain-entities.json#/$defs/
catvrs: ../../catvrs/catvrs.json#/$defs/
Expand Down Expand Up @@ -153,19 +154,19 @@ $defs:
default: "VariantDiagnosticStudyStatement"
description: MUST be "VariantDiagnosticStudyStatement".
subjectVariant:
extends: subject
# extends: subject
oneOf:
- $refCurie: vrs:Variation
- $refCurie: catvrs:CategoricalVariation
- $refCurie: gks.common:IRI
description: A variant that is the subject of the Statement.
predicate:
extends: predicate
# extends: predicate
enum:
- positive
- negative
objectDisease:
extends: object
# extends: object
oneOf:
- $refCurie: gks.domain-entities:Condition
- $refCurie: gks.common:IRI
Expand Down Expand Up @@ -216,20 +217,20 @@ $defs:
default: "VariantOncogenicityStatement"
description: MUST be "VariantOncogenicityStatement".
subjectVariant:
extends: subject
# extends: subject
oneOf:
- $refCurie: vrs:Variation
- $refCurie: catvrs:CategoricalVariation
- $refCurie: gks.common:IRI
description: A variant that is the subject of the Statement.
predicate:
extends: predicate
# extends: predicate
enum:
- isOncogenicFor
- isProtectiveFor
- isPredisposingFor
objectTumorType:
extends: object
# extends: object
oneOf:
- $refCurie: gks.domain-entities:Condition
- $refCurie: gks.common:IRI
Expand Down Expand Up @@ -279,23 +280,28 @@ $defs:
const: "VariantPathogenicityStatement"
default: "VariantPathogenicityStatement"
description: MUST be "VariantPathogenicityStatement".
subjectVariant:
extends: subject
variant:
is_a:
$refCurie: va.core.slots:subject
oneOf:
- $refCurie: vrs:Variation
- $refCurie: catvrs:CategoricalVariation
- $refCurie: gks.common:IRI
description: A variant that is the subject of the Statement.
predicate:
extends: predicate
causality:
is_a:
$refCurie: va.core.slots:predicate
const: isCausalFor
objectCondition:
extends: object
condition:
is_a:
$refCurie: va.core.slots:object
oneOf:
- $refCurie: gks.domain-entities:Condition
- $refCurie: gks.common:IRI
description: The :ref:`Condition` for which the variant impact is stated.
penetranceQualifier:
penetrance:
is_a:
$refCurie: va.core.slots:qualifier
type: string
enum:
- high
Expand All @@ -305,7 +311,9 @@ $defs:
Extends the statement to report 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.
modeOfInheritanceQualifier:
modeOfInheritance:
is_a:
$refCurie: va.core.slots:qualifier
type: string
enum:
- autosomal dominant
Expand All @@ -315,15 +323,17 @@ $defs:
- mitochondrial
description: >-
Reports a pattern of inheritance expected for the pathogenic effect of the variant.
geneContextQualifier:
geneContext:
is_a:
$refCurie: va.core.slots:qualifier
description: >-
Reports the gene through which the pathogenic effect asserted for the variant is mediated
(i.e. it is the variant's impact on this gene that is responsible for causing the condition).
$refCurie: gks.domain-entities:Gene
required:
- subjectVariant
- predicate
- objectCondition
- variant
- causality
- condition

# Variant Prognostic Study Statement
VariantPrognosticStudyStatement:
Expand All @@ -340,19 +350,19 @@ $defs:
default: "VariantPrognosticStudyStatement"
description: MUST be "VariantPrognosticStudyStatement".
subjectVariant:
extends: subject
# extends: subject
oneOf:
- $refCurie: vrs:Variation
- $refCurie: catvrs:CategoricalVariation
- $refCurie: gks.common:IRI
description: A variant that is the subject of the Statement.
predicate:
extends: predicate
# extends: predicate
enum:
- Better Outcome
- Worse Outcome
objectDisease:
extends: object
# extends: object
oneOf:
- $refCurie: gks.domain-entities:Condition
- $refCurie: gks.common:IRI
Expand Down Expand Up @@ -401,21 +411,21 @@ $defs:
default: "VariantTherapeuticResponseStudyStatement"
description: MUST be "VariantTherapeuticResponseStudyStatement".
subjectVariant:
extends: subject
# extends: subject
oneOf:
- $refCurie: vrs:Variation
- $refCurie: catvrs:CategoricalVariation
- $refCurie: gks.common:IRI
description: A variant that is the subject of the Statement.
predicate:
extends: predicate
# extends: predicate
enum:
- predictsSensitivityTo
- predictsResistanceTo
objectTherapeutic:
description: A drug administration or other therapeutic procedure that the neoplasm
is intended to respond to.
extends: object
# extends: object
oneOf:
- $refCurie: gks.domain-entities:TherapeuticProcedure
- $refCurie: gks.common:IRI
Expand Down
Loading