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

Fix vrs schema link #190

Merged
merged 14 commits into from
Dec 12, 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
6 changes: 3 additions & 3 deletions framework/json/configuration/beaconMapSchema.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"filteringTermsUrl": {
"description": "Optional. Returns the list of filtering terms that could be applied to this entry type. It is added here for convenience of the Beacon clients, so they don't need to parse the OpenAPI endpoints definition to get that endpoint. Also, in very simple Beacons, that endpoint could be the one of the few implemented, together with \u00b4rootUrl` and \u00b4singleEntryUrl`, in which case the whole map of endpoints is found in the current Map.",
"format": "uri",
"format": "uri-template",
"type": "string"
},
"openAPIEndpointsDefinition": {
Expand All @@ -30,7 +30,7 @@
},
"singleEntryUrl": {
"description": "Optional, but recommended. Returns only one instance of this entry, identified by an `id`. It is added here for convenience of the Beacon clients, so they don't need to parse the OpenAPI endpoints definition to get that base endpoint. Also, in very simple Beacons, that endpoint could be the only one implemented, together with \u00b4rootUrl`, in which case the whole map of endpoints is found in the current Map.",
"format": "uri",
"format": "uri-template",
"type": "string"
}
},
Expand All @@ -48,7 +48,7 @@
},
"url": {
"description": "Endpoint URL",
"format": "uri",
"format": "uri-template",
"type": "string"
}
},
Expand Down
31 changes: 21 additions & 10 deletions framework/json/configuration/entryTypeDefinition.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
{
"$comment": "TO DO: The tagged parts should reference to `common/ontologizedElement.json`. But that configuration fails to validate. Further investigation is required, but should not affect the resulting schema.",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": true,
"description": "Definition of an element or entry type including the Beacon v2 required and suggested attributes. This schema purpose is to describe each type of entities included in a Beacon, hence Beacon clients could have some metadata about such entities.\n\nThe `id` attribute is the key that should be used in other parts of the Beacon Model to allow Beacon clients to identify the different parts (e.g. endpoints, filteringTerms, request parameters, etc.) that fully describe an entry type.",
"description": "Definition of an element or scope of the element, to describe each type of entry type included in a beacon. The `id` attribute is the key that should be used in other parts of the data model to allow Beacon clients to identify the different parts (e.g. endpoints, filtering terms, request parameters, etc.) that are relvant for an entry type.",
"properties": {
"$schema": {
"$ref": "../common/beaconCommonComponents.json#/$defs/$schema"
},
"aCollectionOf": {
"description": "If the entry type is a collection of other entry types, (e.g. a Dataset is a collection of Records), then this attribute must list the entry types that could be included. One collection type could be defined as included more than one entry type (e.g. a Dataset could include Individuals or Genomic Variants), in such cases the entries are alternative, meaning that a given instance of this entry type could be of only one of the types (e.g. a given Dataset contains Individuals, while another Dataset could contain Genomic Variants, but not both at once).",
"description": "If the entry type is a collection of other entities, (e.g. a Dataset is a collection of Records), then this attribute must list the entities that can be included. One _collection_ can include more than one entry type (e.g. a Dataset in teh Beacon cdefault model could include Individuals, Biosamples, GenomicVariations, Analyses amnd Runs). In such cases in each individual response (e.g. `resultSetsResponse` of collections of type \"dataset\") will contain entries of a single entry type (e.g. biosamples) even if a dataset may contain records of multiple types.",
"includedConcepts": {
"$ref": "../common/basicElement.json",
"type": "array"
Expand All @@ -30,13 +29,17 @@
"type": "string"
},
"filteringTerms": {
"$comment": "TO DO: Double-check the proper way of referencing a path or relative path. 'format: uri' is throwing validation errors for relative file paths",
"description": "Reference to the file with the list of filtering terms that could be used to filter this concept in this instance of Beacon. The referenced file could be used to populate the `filteringTerms`endpoint. Having it independently should allow for updating the list of accepted filtering terms when it is necessary.",
"$comment": "TO DO: Evaluate switch this to `url` or a more specific way for allowing URLs and local file paths (is this necessary?).",
"description": "Reference to the list of filtering terms that could be used to filter records of this entry type in this beacon.",
"type": "string"
},
"id": {
"$comments": "++++++ THIS IS THE START OF THE ontologized element ++++++",
"description": "A (unique) identifier of the element.",
"description": "A unique identifier of the element.",
"examples": [
"biosample",
"individual",
"dataset"
],
"type": "string"
},
"name": {
Expand All @@ -47,8 +50,17 @@
"$ref": "../common/beaconCommonComponents.json#/$defs/NonFilteredQueriesAllowed"
},
"ontologyTermForThisType": {
"$comments": "++++++ THIS IS THE END OF THE ontologized element ++++++",
"$ref": "../common/ontologyTerm.json"
"$ref": "../common/ontologyTerm.json",
"examples": [
{
"id": "EFO:0000542",
"label": "individual"
},
{
"id": "OBI:0000747",
"label": "material sample"
}
]
},
"partOfSpecification": {
"description": "This is label to group together entry types that are part of the same specification.",
Expand All @@ -59,7 +71,6 @@
"required": [
"id",
"name",
"ontologyTermForThisType",
"partOfSpecification",
"defaultSchema"
],
Expand Down
6 changes: 3 additions & 3 deletions framework/src/configuration/beaconMapSchema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ $defs:
be the only one implemented, together with ´rootUrl`, in which case the
whole map of endpoints is found in the current Map.
type: string
format: uri
format: uri-template
filteringTermsUrl:
description: Optional. Returns the list of filtering terms that could be applied
to this entry type. It is added here for convenience of the Beacon clients,
Expand All @@ -55,7 +55,7 @@ $defs:
the few implemented, together with ´rootUrl` and ´singleEntryUrl`, in which
case the whole map of endpoints is found in the current Map.
type: string
format: uri
format: uri-template
endpoints:
description: Optional. A list describing additional endpoints implemented
by this Beacon instance for that entry type. Additional details on the endpoint
Expand All @@ -74,7 +74,7 @@ $defs:
url:
description: Endpoint URL
type: string
format: uri
format: uri-template
returnedEntryType:
description: Which entry type is returned by querying this endpoint. It MUST
match one of the entry types defined in the Beacon configuration file (`beaconConfiguration.json`).
Expand Down
59 changes: 31 additions & 28 deletions framework/src/configuration/entryTypeDefinition.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
$schema: https://json-schema.org/draft/2020-12/schema
title: ''
description: "Definition of an element or entry type including the Beacon v2 required\
\ and suggested attributes. This schema purpose is to describe each type of entities\
\ included in a Beacon, hence Beacon clients could have some metadata about such\
\ entities.\n\nThe `id` attribute is the key that should be used in other parts\
\ of the Beacon Model to allow Beacon clients to identify the different parts (e.g.\
\ endpoints, filteringTerms, request parameters, etc.) that fully describe an entry\
\ type."
description: >-
Definition of an element or scope of the element, to describe each type of entry type included
in a beacon.
The `id` attribute is the key that should be used in other parts of the data model
to allow Beacon clients to identify the different parts (e.g. endpoints, filtering
terms, request parameters, etc.) that are relvant for an entry type.
type: object
$comment: 'TO DO: The tagged parts should reference to `common/ontologizedElement.json`.
But that configuration fails to validate. Further investigation is required, but
should not affect the resulting schema.'
properties:
$schema:
$ref: ../common/beaconCommonComponents.yaml#/$defs/$schema
id:
$comments: ++++++ THIS IS THE START OF THE ontologized element ++++++
type: string
description: A (unique) identifier of the element.
description: A unique identifier of the element.
examples:
- biosample
- individual
- dataset
name:
type: string
description: A distinctive name for the element.
Expand All @@ -26,7 +25,11 @@ properties:
description: A textual description for the element.
ontologyTermForThisType:
$ref: ../common/ontologyTerm.yaml
$comments: ++++++ THIS IS THE END OF THE ontologized element ++++++
examples:
- id: EFO:0000542
label: individual
- id: OBI:0000747
label: material sample
partOfSpecification:
description: This is label to group together entry types that are part of the
same specification.
Expand All @@ -42,31 +45,31 @@ properties:
items:
$ref: ../common/referenceToAnSchema.yaml
aCollectionOf:
description: If the entry type is a collection of other entry types, (e.g. a Dataset
is a collection of Records), then this attribute must list the entry types that
could be included. One collection type could be defined as included more than
one entry type (e.g. a Dataset could include Individuals or Genomic Variants),
in such cases the entries are alternative, meaning that a given instance of
this entry type could be of only one of the types (e.g. a given Dataset contains
Individuals, while another Dataset could contain Genomic Variants, but not both
at once).
description: >-
If the entry type is a collection of other entities, (e.g. a Dataset
is a collection of Records), then this attribute must list the entities that
can be included. One _collection_ can include more than one entry type
(e.g. a Dataset in teh Beacon cdefault model could include Individuals, Biosamples,
GenomicVariations, Analyses amnd Runs). In such cases in each individual
response (e.g. `resultSetsResponse` of collections of type "dataset") will
contain entries of a single entry type (e.g. biosamples) even if a dataset
may contain records of multiple types.
includedConcepts:
type: array
$ref: ../common/basicElement.yaml
filteringTerms:
description: Reference to the file with the list of filtering terms that could
be used to filter this concept in this instance of Beacon. The referenced file
could be used to populate the `filteringTerms`endpoint. Having it independently
should allow for updating the list of accepted filtering terms when it is necessary.
description: >-
Reference to the list of filtering terms that could be used to filter records
of this entry type in this beacon.
type: string
$comment: "TO DO: Double-check the proper way of referencing a path or relative\
\ path. 'format: uri' is throwing validation errors for relative file paths"
$comment: >-
TO DO: Evaluate switch this to `url` or a more specific way for allowing
URLs and local file paths (is this necessary?).
nonFilteredQueriesAllowed:
$ref: ../common/beaconCommonComponents.yaml#/$defs/NonFilteredQueriesAllowed
required:
- id
- name
- ontologyTermForThisType
- partOfSpecification
- defaultSchema
additionalProperties: true
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$comment": "version: ga4gh-beacon-variant-v2.0.0",
"$comment": "version: ga4gh-beacon-variant-v2.1.0",
"$defs": {
"CaseLevelVariant": {
"description": "",
Expand Down Expand Up @@ -272,7 +272,7 @@
"type": "string"
},
"location": {
"$ref": "https://w3id.org/ga4gh/schema/vrs/1.2/vrs.json#/definitions/Location"
"$ref": "https://w3id.org/ga4gh/schema/vrs/1.3/vrs.json#/definitions/Location"
},
"referenceBases": {
"description": "Reference bases for this variant (starting from `start`). * Accepted values: IUPAC codes for nucleotides (e.g. `https://www.bioinformatics.org/sms/iupac.html`). * N is a wildcard, that denotes the position of any base, and can be used\n as a standalone base of any type or within a partially known sequence.\n* an *empty value* is used in the case of insertions with the maximally\n trimmed, inserted sequence being indicated in `AlternateBases`.",
Expand Down Expand Up @@ -557,10 +557,10 @@
"variation": {
"oneOf": [
{
"$ref": "https://w3id.org/ga4gh/schema/vrs/1.2/vrs.json#/definitions/MolecularVariation"
"$ref": "https://w3id.org/ga4gh/schema/vrs/1.3/vrs.json#/definitions/MolecularVariation"
},
{
"$ref": "https://w3id.org/ga4gh/schema/vrs/1.2/vrs.json#/definitions/SystemicVariation"
"$ref": "https://w3id.org/ga4gh/schema/vrs/1.3/vrs.json#/definitions/SystemicVariation"
},
{
"$ref": "#/$defs/LegacyVariation"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$schema: https://json-schema.org/draft/2020-12/schema
title: Genomic Variation
$comment: 'version: ga4gh-beacon-variant-v2.0.0'
$comment: 'version: ga4gh-beacon-variant-v2.1.0'
description: >-
Schema for a genomic variant entry.
type: object
Expand All @@ -10,8 +10,8 @@ required:
properties:
variation:
oneOf:
- $ref: https://w3id.org/ga4gh/schema/vrs/1.2/vrs.json#/definitions/MolecularVariation
- $ref: https://w3id.org/ga4gh/schema/vrs/1.2/vrs.json#/definitions/SystemicVariation
- $ref: https://w3id.org/ga4gh/schema/vrs/1.3/vrs.json#/definitions/MolecularVariation
- $ref: https://w3id.org/ga4gh/schema/vrs/1.3/vrs.json#/definitions/SystemicVariation
- $ref: '#/$defs/LegacyVariation'
variantInternalId:
description: >-
Expand Down Expand Up @@ -51,7 +51,7 @@ $defs:
- location
properties:
location:
$ref: https://w3id.org/ga4gh/schema/vrs/1.2/vrs.json#/definitions/Location
$ref: https://w3id.org/ga4gh/schema/vrs/1.3/vrs.json#/definitions/Location
variantType:
description: >-
The `variantType` declares the nature of the variation in relation
Expand Down
Loading