Skip to content

Commit 948fc17

Browse files
authored
Merge pull request #212 from ga4gh-beacon/schema-urgent-fixes-filteringTerms-scope-definitions
filteringTerms scope definition modification
2 parents 7473786 + 355bf49 commit 948fc17

2 files changed

Lines changed: 36 additions & 14 deletions

File tree

framework/json/requests/filteringTerms.json

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$defs": {
33
"AlphanumericFilter": {
4-
"description": "Filter results based on operators and values applied to alphanumeric fields.",
4+
"description": "Filter results based on operators and values applied to alphanumeric\nfields.",
55
"properties": {
66
"id": {
77
"description": "Field identfier to be queried.",
@@ -23,8 +23,10 @@
2323
"type": "string"
2424
},
2525
"scope": {
26-
"description": "The entry type to which the filter applies",
27-
"example": "individuals",
26+
"description": "The entry type in the model to which the filter should be applied. It\nis good practice to use unanimous `id` values (e.g. `ageAtDiagnosis`\ninstead of `age`) and avoid the use of the `scope` parameter.",
27+
"examples": [
28+
"individuals"
29+
],
2830
"type": "string"
2931
},
3032
"value": {
@@ -49,8 +51,10 @@
4951
"type": "string"
5052
},
5153
"scope": {
52-
"description": "The entry type to which the filter applies",
53-
"example": "individuals",
54+
"description": "The entry type in the model to which the filter should be applied.",
55+
"examples": [
56+
"individuals"
57+
],
5458
"type": "string"
5559
}
5660
},
@@ -86,8 +90,10 @@
8690
"type": "boolean"
8791
},
8892
"scope": {
89-
"description": "The entry type to which the filter applies",
90-
"example": "biosamples",
93+
"description": "The entry type in the model to which the filter should be applied. For\nexample, the use of `NCIT:C4013` (Malignant Head and Neck Neoplasm) can\nw/o specified scope mean both \"match cancer samples\" or \"match individuals\"\nwith the disease\" which - in the case of individuals - could then lead\nto matching germline and cancer variants while a scope of `biosamples`\nwould limit the response to variants observed in the cancer tissue.\nNote: It is good practice to avoid ambiguous terms, _i.e._ use different\nvocabularies for different entry types.",
94+
"examples": [
95+
"biosamples"
96+
],
9197
"type": "string"
9298
},
9399
"similarity": {

framework/src/requests/filteringTerms.yaml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,20 @@ $defs:
4545
of 'high', 'medium' and 'low' similarity.
4646
scope:
4747
type: string
48-
description: The entry type to which the filter applies
49-
example: biosamples
48+
description: |-
49+
The entry type in the model to which the filter should be applied. For
50+
example, the use of `NCIT:C4013` (Malignant Head and Neck Neoplasm) can
51+
w/o specified scope mean both "match cancer samples" or "match individuals"
52+
with the disease" which - in the case of individuals - could then lead
53+
to matching germline and cancer variants while a scope of `biosamples`
54+
would limit the response to variants observed in the cancer tissue.
55+
Note: It is good practice to avoid ambiguous terms, _i.e._ use different
56+
vocabularies for different entry types.
57+
examples:
58+
- biosamples
5059
AlphanumericFilter:
51-
description: Filter results based on operators and values applied to alphanumeric
60+
description: |-
61+
Filter results based on operators and values applied to alphanumeric
5262
fields.
5363
type: object
5464
required:
@@ -81,8 +91,12 @@ $defs:
8191
example: P70Y
8292
scope:
8393
type: string
84-
description: The entry type to which the filter applies
85-
example: individuals
94+
description: |-
95+
The entry type in the model to which the filter should be applied. It
96+
is good practice to use unanimous `id` values (e.g. `ageAtDiagnosis`
97+
instead of `age`) and avoid the use of the `scope` parameter.
98+
examples:
99+
- individuals
86100
CustomFilter:
87101
type: object
88102
description: Filter results to include records that contain a custom term defined
@@ -96,6 +110,8 @@ $defs:
96110
example: demographic.ethnicity:asian
97111
scope:
98112
type: string
99-
description: The entry type to which the filter applies
100-
example: individuals
113+
description: |-
114+
The entry type in the model to which the filter should be applied.
115+
examples:
116+
- individuals
101117
additionalProperties: true

0 commit comments

Comments
 (0)