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

merged data-types to core-im (tests and schemas) #74

Merged
merged 1 commit into from
Oct 10, 2024
Merged
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
File renamed without changes.
6 changes: 1 addition & 5 deletions schema/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
all: gks-data-types gks-core-im gks-domain-entities

gks-data-types:
(cd data-types; make all)
all: gks-core-im gks-domain-entities

gks-core-im:
(cd core-im; make all)
Expand All @@ -10,6 +7,5 @@ gks-domain-entities:
(cd domain-entities; make all)

clean:
(cd data-types; make clean)
(cd core-im; make clean)
(cd domain-entities; make clean)
142 changes: 122 additions & 20 deletions schema/core-im/core-im-source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ $schema: "https://json-schema.org/draft/2020-12/schema"
$id: "https://w3id.org/ga4gh/schema/gks-common/1.x/core-im/core-im-source.yaml"
title: GKS Commons Core Information Class Definitions

imports:
gks.data-types: ../data-types/data-types-source.yaml

$defs:
Entity:
Expand Down Expand Up @@ -48,7 +46,7 @@ $defs:
type: array
ordered: false
items:
$ref: "/ga4gh/schema/gks-common/1.x/data-types/json/Extension"
$ref: "#/$defs/Extension"
description: >-
A list of extensions to the Entity, that allow for capture of information not directly
supported by elements defined in the model.
Expand All @@ -72,7 +70,7 @@ $defs:
type: array
ordered: false
items:
$ref: "/ga4gh/schema/gks-common/1.x/data-types/json/ConceptMapping"
$ref: "#/$defs/ConceptMapping"
description: >-
A list of mappings to concepts in terminologies or code systems. Each mapping should
include a coding and a relation.
Expand All @@ -98,7 +96,7 @@ $defs:
specifiedBy:
oneOf:
- $ref: "#/$defs/Method"
- $ref: "/ga4gh/schema/gks-common/1.x/data-types/json/IRI"
- $ref: "#/$defs/IRI"
description: >-
A specification that describes all or part of the process that led to creation of the
Information Entity
Expand Down Expand Up @@ -126,7 +124,7 @@ $defs:
items:
oneOf:
- $ref: "#/$defs/Document"
- $ref: "/ga4gh/schema/gks-common/1.x/data-types/json/IRI"
- $ref: "#/$defs/IRI"
description: A document in which the the Information Entity is reported.
dateAuthored:
type: string
Expand Down Expand Up @@ -171,7 +169,7 @@ $defs:
default: Method
description: MUST be "Method".
subtype:
$ref: "/ga4gh/schema/gks-common/1.x/data-types/json/Coding"
$ref: "#/$defs/Coding"
description: >-
A specific type of method that a Method instance represents (e.g. 'Variant Interpretation
Guideline', or 'Experimental Protocol').
Expand Down Expand Up @@ -207,7 +205,7 @@ $defs:
default: Document
description: Must be "Document"
subtype:
$ref: "/ga4gh/schema/gks-common/1.x/data-types/json/Coding"
$ref: "#/$defs/Coding"
description: >-
A specific type of document that a Document instance represents (e.g. 'publication',
'patent', 'pathology report')
Expand Down Expand Up @@ -273,7 +271,7 @@ $defs:
Activities may use, generate, modify, move, or destroy one or more entities.
heritableProperties:
subtype:
$ref: "/ga4gh/schema/gks-common/1.x/data-types/json/Coding"
$ref: "#/$defs/Coding"
description: >-
A specific type of activity the Activity instance represents.
$comment: >-
Expand Down Expand Up @@ -328,7 +326,7 @@ $defs:
If multiple Agents contributed to an entity, a separate Contribution instances MUST be
created for each.
activityType:
$ref: "/ga4gh/schema/gks-common/1.x/data-types/json/Coding"
$ref: "#/$defs/Coding"
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,
Expand Down Expand Up @@ -446,8 +444,8 @@ $defs:
(supports, disputes, neutral)
strengthOfEvidenceProvided:
oneOf:
- $ref: "/ga4gh/schema/gks-common/1.x/data-types/json/Coding"
- $ref: "/ga4gh/schema/gks-common/1.x/data-types/json/IRI"
- $ref: "#/$defs/Coding"
- $ref: "#/$defs/IRI"
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.
Expand Down Expand Up @@ -580,8 +578,8 @@ $defs:
values that don't commit to one or the other if they don't want to make the distinction (e.g. 'high' vs
'medium' vs 'low').
oneOf:
- $ref: "/ga4gh/schema/gks-common/1.x/data-types/json/Coding"
- $ref: "/ga4gh/schema/gks-common/1.x/data-types/json/IRI"
- $ref: "#/$defs/Coding"
- $ref: "#/$defs/IRI"
score:
type: number
description: >-
Expand Down Expand Up @@ -619,8 +617,8 @@ $defs:
# using the 'subject', 'predicate', 'object', and 'qualifier' properties defined in the Statement object itself.
classification:
oneOf:
- $ref: "/ga4gh/schema/gks-common/1.x/data-types/json/Coding"
- $ref: "/ga4gh/schema/gks-common/1.x/data-types/json/IRI"
- $ref: "#/$defs/Coding"
- $ref: "#/$defs/IRI"
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
Expand Down Expand Up @@ -678,7 +676,7 @@ $defs:
default: DataSet
description: MUST be "DataSet".
subtype:
$ref: "/ga4gh/schema/gks-common/1.x/data-types/json/Coding"
$ref: "#/$defs/Coding"
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',
Expand Down Expand Up @@ -732,8 +730,8 @@ $defs:
focus:
oneOf:
- $ref: "#/$defs/DomainEntity"
- $ref: "/ga4gh/schema/gks-common/1.x/data-types/json/Coding"
- $ref: "/ga4gh/schema/gks-common/1.x/data-types/json/IRI"
- $ref: "#/$defs/Coding"
- $ref: "#/$defs/IRI"
description: >-
The specific subject or experimental unit in a Study that data in the StudyResult object is about -
e.g. a particular variant in a population allele frequency dataset like ExAC or gnomAD.
Expand Down Expand Up @@ -914,7 +912,7 @@ $defs:
# description: The Entity or concept about which the Proposition is made.
# predicate:
# type:
# $ref: "/ga4gh/schema/gks-common/1.x/data-types/json/Coding"
# $ref: "#/$defs/Coding"
# description: The relationship asserted to hold between the subject and the object of the Proposition.
# object:
# type:
Expand All @@ -929,3 +927,107 @@ $defs:
# - subject
# - predicate
# - object


Coding:
type: object
maturity: draft
description: >-
A structured representation of a code for a defined concept in a terminology or code system.
properties:
label:
type: string
description: The human-readable name for the coded concept, as defined by the code system.
system:
type: string
description: >-
The terminology/code system that defined the code. May be reported as a free-text name
(e.g. 'Sequence Ontology'), but it is preferable to provide a uri/url for the system.
When the 'code' is reported as a CURIE, the 'system' should be reported as the uri that
the CURIE's prefix expands to (e.g. 'http://purl.obofoundry.org/so.owl/' for the
Sequence Ontology).
systemVersion:
type: string
description: Version of the terminology or code system that provided the code.
code:
$ref: '#/$defs/Code'
description: >-
A symbol uniquely identifying the concept, as in a syntax defined by the code system.
CURIE format is preferred where possible (e.g. 'SO:0000704' is the CURIE form of the
Sequence Ontology code for 'gene').
required:
- system
- code

ConceptMapping:
type: object
maturity: draft
description: >-
A mapping to a concept in a terminology or code system.
properties:
coding:
$ref: '#/$defs/Coding'
description: >-
A structured representation of a code for a defined concept in a terminology or code system.
relation:
description: >-
A mapping relation between concepts as defined by the Simple Knowledge Organization System (SKOS).
type: string
enum:
- closeMatch
- exactMatch
- broadMatch
- narrowMatch
- relatedMatch
required:
- relation
- coding

Extension:
type: object
maturity: draft
description: >-
The Extension class provides entities with a means to include
additional attributes that are outside of the specified standard
but needed by a given content provider or system implementer.
These extensions are not expected to be natively understood, but
may be used for pre-negotiated exchange of message attributes
between systems.
properties:
name:
type: string
description: >-
A name for the Extension. Should be indicative of its meaning and/or the type of
information it value represents.
value:
type: [ "number", "string", "boolean", "object", "array", "null" ]
description: The value of the Extension - can be any primitive or structured object
additionalProperties: true
description:
type: string
description: >-
A description of the meaning or utility of the Extension, to explain
the type of information it is meant to hold.
required:
- name
- value

Code:
type: string
maturity: draft
description: >-
Indicates that the value is taken from a set of controlled strings defined elsewhere.
Technically, a code is restricted to a string which has at least one character and no leading or
trailing whitespace, and where there is no whitespace other than single spaces in the contents.
pattern: '\S+( \S+)*'
example: ENSG00000139618

IRI:
type: string
maturity: draft
description: >-
An IRI Reference (either an IRI or a relative-reference), according to `RFC3986 section 4.1
<https://datatracker.ietf.org/doc/html/rfc3986#section-4.1>`_ and `RFC3987 section 2.1
<https://datatracker.ietf.org/doc/html/rfc3987#section-2.1>`_. MAY be a JSON Pointer as an IRI fragment, as
described by `RFC6901 section 6 <https://datatracker.ietf.org/doc/html/rfc6901#section-6>`_.
format: iri-reference
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions schema/core-im/def/StudyResult.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ Some StudyResult attributes are inherited from :ref:`InformationEntity`.
* - ancillaryResults
- object
- 0..1
-
-
* - qualityMeasures
- object
- 0..1
-
-
2 changes: 1 addition & 1 deletion schema/core-im/json/Agent
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"type": "array",
"ordered": false,
"items": {
"$ref": "/ga4gh/schema/gks-common/1.x/data-types/json/Extension"
"$ref": "/ga4gh/schema/gks-common/1.x/core-im/json/Extension"
},
"description": "A list of extensions to the Entity, that allow for capture of information not directly supported by elements defined in the model.",
"$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."
Expand Down
2 changes: 1 addition & 1 deletion schema/data-types/json/Code → schema/core-im/json/Code
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://w3id.org/ga4gh/schema/gks-common/1.x/data-types/json/Code",
"$id": "https://w3id.org/ga4gh/schema/gks-common/1.x/core-im/json/Code",
"title": "Code",
"type": "string",
"maturity": "draft",
Expand Down
7 changes: 3 additions & 4 deletions schema/data-types/json/Coding → schema/core-im/json/Coding
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://w3id.org/ga4gh/schema/gks-common/1.x/data-types/json/Coding",
"$id": "https://w3id.org/ga4gh/schema/gks-common/1.x/core-im/json/Coding",
"title": "Coding",
"type": "object",
"maturity": "draft",
Expand All @@ -19,13 +19,12 @@
"description": "Version of the terminology or code system that provided the code."
},
"code": {
"$ref": "/ga4gh/schema/gks-common/1.x/data-types/json/Code",
"$ref": "/ga4gh/schema/gks-common/1.x/core-im/json/Code",
"description": "A symbol uniquely identifying the concept, as in a syntax defined by the code system. CURIE format is preferred where possible (e.g. 'SO:0000704' is the CURIE form of the Sequence Ontology code for 'gene')."
}
},
"required": [
"code",
"system"
],
"additionalProperties": false
]
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://w3id.org/ga4gh/schema/gks-common/1.x/data-types/json/ConceptMapping",
"$id": "https://w3id.org/ga4gh/schema/gks-common/1.x/core-im/json/ConceptMapping",
"title": "ConceptMapping",
"type": "object",
"maturity": "draft",
"description": "A mapping to a concept in a terminology or code system.",
"properties": {
"coding": {
"$ref": "/ga4gh/schema/gks-common/1.x/data-types/json/Coding",
"$ref": "/ga4gh/schema/gks-common/1.x/core-im/json/Coding",
"description": "A structured representation of a code for a defined concept in a terminology or code system."
},
"relation": {
Expand All @@ -25,6 +25,5 @@
"required": [
"coding",
"relation"
],
"additionalProperties": false
]
}
6 changes: 3 additions & 3 deletions schema/core-im/json/Contribution
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
"type": "array",
"ordered": false,
"items": {
"$ref": "/ga4gh/schema/gks-common/1.x/data-types/json/Extension"
"$ref": "/ga4gh/schema/gks-common/1.x/core-im/json/Extension"
},
"description": "A list of extensions to the Entity, that allow for capture of information not directly supported by elements defined in the model.",
"$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-common/1.x/data-types/json/Coding",
"$ref": "/ga4gh/schema/gks-common/1.x/core-im/json/Coding",
"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."
},
Expand Down Expand Up @@ -74,7 +74,7 @@
"$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 for each."
},
"activityType": {
"$ref": "/ga4gh/schema/gks-common/1.x/data-types/json/Coding",
"$ref": "/ga4gh/schema/gks-common/1.x/core-im/json/Coding",
"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))."
}
},
Expand Down
Loading
Loading