Skip to content

Commit 501ca00

Browse files
authored
Merge pull request #221 from EGA-archive/develop
Develop
2 parents 931470a + 8f576dc commit 501ca00

File tree

8 files changed

+80
-157
lines changed

8 files changed

+80
-157
lines changed

beacon/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
beacon_id = 'org.ega-archive.ga4gh-approval-beacon-test' # ID of the Beacon
1313
beacon_name = 'GA4GH Approval Beacon Test' # Name of the Beacon service
1414
api_version = 'v2.0.0' # Version of the Beacon implementation
15-
uri = 'https://beacon-apis-test.ega-archive.org/api/'
15+
uri = 'https://beacon-apis-demo.ega-archive.org/api/'
1616

1717
#
1818
# Beacon granularity
@@ -34,7 +34,7 @@
3434
'08003 Barcelona, Spain')
3535
org_welcome_url = 'https://ega-archive.org/'
3636
org_contact_url = 'mailto:[email protected]'
37-
org_logo_url = 'https://ega-archive.org/images/logo.png'
37+
org_logo_url = 'https://legacy.ega-archive.org/images/logo.png'
3838
org_info = ''
3939

4040
#

beacon/db/individuals.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ def include_resultset_responses(query: Dict[str, List[dict]], qparams: RequestPa
4444

4545
def apply_request_parameters(query: Dict[str, List[dict]], qparams: RequestParams):
4646
LOG.debug("Request parameters len = {}".format(len(qparams.query.request_parameters)))
47+
v_list=[]
4748
query_2={}
4849
for k, v in qparams.query.request_parameters.items():
4950
LOG.debug(k)
@@ -81,6 +82,17 @@ def apply_request_parameters(query: Dict[str, List[dict]], qparams: RequestParam
8182
query_2["$or"].append({'id': case["biosampleId"]})
8283

8384
LOG.debug(query_2)
85+
86+
elif ',' in v:
87+
v_list =v.split(',')
88+
LOG.debug(v_list)
89+
else:
90+
v_list.append(v)
91+
for id in v_list:
92+
v_dict={}
93+
v_dict['id']=id
94+
qparams.query.filters.append(v_dict)
95+
8496

8597

8698

beacon/response/framework.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def get_entry_types():
2626
"defaultSchema": {
2727
"id": DefaultSchemas.ANALYSES.value['schema'],
2828
"name": "Default schema for a bioinformatics analysis",
29-
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2-Models/main/BEACON-V2-Model/analyses/defaultSchema.json",
29+
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/analyses/defaultSchema.json",
3030
"schemaVersion": "v2.0.0"
3131
},
3232
"additionallySupportedSchemas": []
@@ -43,7 +43,7 @@ def get_entry_types():
4343
"defaultSchema": {
4444
"id": DefaultSchemas.BIOSAMPLES.value['schema'],
4545
"name": "Default schema for a biological sample",
46-
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2-Models/main/BEACON-V2-Model/biosamples/defaultSchema.json",
46+
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/biosamples/defaultSchema.json",
4747
"schemaVersion": "v2.0.0"
4848
},
4949
"additionallySupportedSchemas": []
@@ -60,7 +60,7 @@ def get_entry_types():
6060
"defaultSchema": {
6161
"id": DefaultSchemas.COHORTS.value['schema'],
6262
"name": "Default schema for cohorts",
63-
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2-Models/main/BEACON-V2-Model/cohorts/defaultSchema.json",
63+
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/cohorts/defaultSchema.json",
6464
"schemaVersion": "v2.0.0"
6565
},
6666
"aCollectionOf": [{"id": "individual", "name": "Individuals"}],
@@ -78,7 +78,7 @@ def get_entry_types():
7878
"defaultSchema": {
7979
"id": DefaultSchemas.DATASETS.value['schema'],
8080
"name": "Default schema for datasets",
81-
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2-Models/main/BEACON-V2-Model/datasets/defaultSchema.json",
81+
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/datasets/defaultSchema.json",
8282
"schemaVersion": "v2.0.0"
8383
},
8484
"aCollectionOf": [{"id": "genomicVariation", "name": "Genomic Variants"}],
@@ -96,7 +96,7 @@ def get_entry_types():
9696
"defaultSchema": {
9797
"id": DefaultSchemas.GENOMICVARIATIONS.value['schema'],
9898
"name": "Default schema for a genomic variation",
99-
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2-Models/main/BEACON-V2-Model/genomicVariations/defaultSchema.json",
99+
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/genomicVariations/defaultSchema.json",
100100
"schemaVersion": "v2.0.0"
101101
},
102102
"additionallySupportedSchemas": []
@@ -113,7 +113,7 @@ def get_entry_types():
113113
"defaultSchema": {
114114
"id": DefaultSchemas.INDIVIDUALS.value['schema'],
115115
"name": "Default schema for an individual",
116-
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2-Models/main/BEACON-V2-Model/individuals/defaultSchema.json",
116+
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/individuals/defaultSchema.json",
117117
"schemaVersion": "v2.0.0"
118118
},
119119
"additionallySupportedSchemas": []
@@ -130,7 +130,7 @@ def get_entry_types():
130130
"defaultSchema": {
131131
"id": DefaultSchemas.RUNS.value['schema'],
132132
"name": "Default schema for a sequencing run",
133-
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2-Models/main/BEACON-V2-Model/runs/defaultSchema.json",
133+
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/runs/defaultSchema.json",
134134
"schemaVersion": "v2.0.0"
135135
},
136136
"additionallySupportedSchemas": []
@@ -200,7 +200,7 @@ async def beacon_map(request):
200200
"endpointSets": {
201201
"analysis": {
202202
"entryType": "analysis",
203-
"openAPIEndpointsDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2-Models/main/BEACON-V2-Model/analyses/endpoints.json",
203+
"openAPIEndpointsDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/analyses/endpoints.json",
204204
"rootUrl": conf.uri + "analyses",
205205
"singleEntryUrl": conf.uri + "analyses/{id}",
206206
"endpoints": {
@@ -212,7 +212,7 @@ async def beacon_map(request):
212212
},
213213
"biosample": {
214214
"entryType": "biosample",
215-
"openAPIEndpointsDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2-Models/main/BEACON-V2-Model/biosamples/endpoints.json",
215+
"openAPIEndpointsDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/biosamples/endpoints.json",
216216
"rootUrl": conf.uri + "biosamples",
217217
"singleEntryUrl": conf.uri + "biosamples/{id}",
218218
"endpoints": {
@@ -232,7 +232,7 @@ async def beacon_map(request):
232232
},
233233
"cohort": {
234234
"entryType": "cohort",
235-
"openAPIEndpointsDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2-Models/main/BEACON-V2-Model/cohorts/endpoints.json",
235+
"openAPIEndpointsDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/cohorts/endpoints.json",
236236
"rootUrl": conf.uri + "cohorts",
237237
"singleEntryUrl": conf.uri + "cohorts/{id}",
238238
"filteringTermsUrl": conf.uri + "cohorts/filtering_terms",
@@ -253,7 +253,7 @@ async def beacon_map(request):
253253
},
254254
"dataset": {
255255
"entryType": "dataset",
256-
"openAPIEndpointsDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2-Models/main/BEACON-V2-Model/datasets/endpoints.json",
256+
"openAPIEndpointsDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/datasets/endpoints.json",
257257
"rootUrl": conf.uri + "datasets",
258258
"singleEntryUrl": conf.uri + "datasets/{id}",
259259
"filteringTermsUrl": conf.uri + "datasets/filtering_terms",
@@ -282,7 +282,7 @@ async def beacon_map(request):
282282
},
283283
"genomicVariant": {
284284
"entryType": "genomicVariant",
285-
"openAPIEndpointsDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2-Models/main/BEACON-V2-Model/genomicVariations/endpoints.json",
285+
"openAPIEndpointsDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/genomicVariations/endpoints.json",
286286
"rootUrl": conf.uri + "g_variants",
287287
"singleEntryUrl": conf.uri + "g_variants/{variantInternalId}",
288288
"endpoints": {
@@ -306,7 +306,7 @@ async def beacon_map(request):
306306
},
307307
"individual": {
308308
"entryType": "individual",
309-
"openAPIEndpointsDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2-Models/main/BEACON-V2-Model/individuals/endpoints.json",
309+
"openAPIEndpointsDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/individuals/endpoints.json",
310310
"rootUrl": conf.uri + "individuals",
311311
"singleEntryUrl": conf.uri + "individuals/{id}",
312312
"filteringTermsUrl": conf.uri + "individuals/filtering_terms",
@@ -331,7 +331,7 @@ async def beacon_map(request):
331331
},
332332
"run": {
333333
"entryType": "run",
334-
"openAPIEndpointsDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2-Models/main/BEACON-V2-Model/runs/endpoints.json",
334+
"openAPIEndpointsDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/runs/endpoints.json",
335335
"rootUrl": conf.uri + "runs",
336336
"singleEntryUrl": conf.uri + "runs/{id}",
337337
"endpoints": {

deploy/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
beacon_id = 'org.ega-archive.ga4gh-approval-beacon-test' # ID of the Beacon
77
beacon_name = 'GA4GH Approval Beacon Test' # Name of the Beacon service
88
api_version = 'v2.0.0' # Version of the Beacon implementation
9-
uri = 'https://beacon-apis-test.ega-archive.org/api/'
9+
uri = 'https://beacon-apis-demo.ega-archive.org/api/'
1010

1111
#
1212
# Beacon granularity
@@ -28,7 +28,7 @@
2828
'08003 Barcelona, Spain')
2929
org_welcome_url = 'https://ega-archive.org/'
3030
org_contact_url = 'mailto:[email protected]'
31-
org_logo_url = 'https://ega-archive.org/images/logo.png'
31+
org_logo_url = 'https://legacy.ega-archive.org/images/logo.png'
3232
org_info = ''
3333

3434
#

0 commit comments

Comments
 (0)