Skip to content

Commit

Permalink
Merge branch 'develop' into frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
Gemma Milla authored Oct 10, 2023
2 parents 1b5e835 + 8f576dc commit 668dcff
Show file tree
Hide file tree
Showing 68 changed files with 88 additions and 38,619 deletions.
4 changes: 2 additions & 2 deletions beacon/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
beacon_id = 'org.ega-archive.ga4gh-approval-beacon-test' # ID of the Beacon
beacon_name = 'GA4GH Approval Beacon Test' # Name of the Beacon service
api_version = 'v2.0.0' # Version of the Beacon implementation
uri = 'https://beacon-apis-test.ega-archive.org/api/'
uri = 'https://beacon-apis-demo.ega-archive.org/api/'

#
# Beacon granularity
Expand All @@ -34,7 +34,7 @@
'08003 Barcelona, Spain')
org_welcome_url = 'https://ega-archive.org/'
org_contact_url = 'mailto:[email protected]'
org_logo_url = 'https://ega-archive.org/images/logo.png'
org_logo_url = 'https://legacy.ega-archive.org/images/logo.png'
org_info = ''

#
Expand Down
12 changes: 12 additions & 0 deletions beacon/db/individuals.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def include_resultset_responses(query: Dict[str, List[dict]], qparams: RequestPa

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

LOG.debug(query_2)

elif ',' in v:
v_list =v.split(',')
LOG.debug(v_list)
else:
v_list.append(v)
for id in v_list:
v_dict={}
v_dict['id']=id
qparams.query.filters.append(v_dict)




Expand Down
28 changes: 14 additions & 14 deletions beacon/response/framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def get_entry_types():
"defaultSchema": {
"id": DefaultSchemas.ANALYSES.value['schema'],
"name": "Default schema for a bioinformatics analysis",
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2-Models/main/BEACON-V2-Model/analyses/defaultSchema.json",
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/analyses/defaultSchema.json",
"schemaVersion": "v2.0.0"
},
"additionallySupportedSchemas": []
Expand All @@ -43,7 +43,7 @@ def get_entry_types():
"defaultSchema": {
"id": DefaultSchemas.BIOSAMPLES.value['schema'],
"name": "Default schema for a biological sample",
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2-Models/main/BEACON-V2-Model/biosamples/defaultSchema.json",
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/biosamples/defaultSchema.json",
"schemaVersion": "v2.0.0"
},
"additionallySupportedSchemas": []
Expand All @@ -60,7 +60,7 @@ def get_entry_types():
"defaultSchema": {
"id": DefaultSchemas.COHORTS.value['schema'],
"name": "Default schema for cohorts",
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2-Models/main/BEACON-V2-Model/cohorts/defaultSchema.json",
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/cohorts/defaultSchema.json",
"schemaVersion": "v2.0.0"
},
"aCollectionOf": [{"id": "individual", "name": "Individuals"}],
Expand All @@ -78,7 +78,7 @@ def get_entry_types():
"defaultSchema": {
"id": DefaultSchemas.DATASETS.value['schema'],
"name": "Default schema for datasets",
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2-Models/main/BEACON-V2-Model/datasets/defaultSchema.json",
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/datasets/defaultSchema.json",
"schemaVersion": "v2.0.0"
},
"aCollectionOf": [{"id": "genomicVariation", "name": "Genomic Variants"}],
Expand All @@ -96,7 +96,7 @@ def get_entry_types():
"defaultSchema": {
"id": DefaultSchemas.GENOMICVARIATIONS.value['schema'],
"name": "Default schema for a genomic variation",
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2-Models/main/BEACON-V2-Model/genomicVariations/defaultSchema.json",
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/genomicVariations/defaultSchema.json",
"schemaVersion": "v2.0.0"
},
"additionallySupportedSchemas": []
Expand All @@ -113,7 +113,7 @@ def get_entry_types():
"defaultSchema": {
"id": DefaultSchemas.INDIVIDUALS.value['schema'],
"name": "Default schema for an individual",
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2-Models/main/BEACON-V2-Model/individuals/defaultSchema.json",
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/individuals/defaultSchema.json",
"schemaVersion": "v2.0.0"
},
"additionallySupportedSchemas": []
Expand All @@ -130,7 +130,7 @@ def get_entry_types():
"defaultSchema": {
"id": DefaultSchemas.RUNS.value['schema'],
"name": "Default schema for a sequencing run",
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2-Models/main/BEACON-V2-Model/runs/defaultSchema.json",
"referenceToSchemaDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/runs/defaultSchema.json",
"schemaVersion": "v2.0.0"
},
"additionallySupportedSchemas": []
Expand Down Expand Up @@ -200,7 +200,7 @@ async def beacon_map(request):
"endpointSets": {
"analysis": {
"entryType": "analysis",
"openAPIEndpointsDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2-Models/main/BEACON-V2-Model/analyses/endpoints.json",
"openAPIEndpointsDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/analyses/endpoints.json",
"rootUrl": conf.uri + "analyses",
"singleEntryUrl": conf.uri + "analyses/{id}",
"endpoints": {
Expand All @@ -212,7 +212,7 @@ async def beacon_map(request):
},
"biosample": {
"entryType": "biosample",
"openAPIEndpointsDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2-Models/main/BEACON-V2-Model/biosamples/endpoints.json",
"openAPIEndpointsDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/biosamples/endpoints.json",
"rootUrl": conf.uri + "biosamples",
"singleEntryUrl": conf.uri + "biosamples/{id}",
"endpoints": {
Expand All @@ -232,7 +232,7 @@ async def beacon_map(request):
},
"cohort": {
"entryType": "cohort",
"openAPIEndpointsDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2-Models/main/BEACON-V2-Model/cohorts/endpoints.json",
"openAPIEndpointsDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/cohorts/endpoints.json",
"rootUrl": conf.uri + "cohorts",
"singleEntryUrl": conf.uri + "cohorts/{id}",
"filteringTermsUrl": conf.uri + "cohorts/filtering_terms",
Expand All @@ -253,7 +253,7 @@ async def beacon_map(request):
},
"dataset": {
"entryType": "dataset",
"openAPIEndpointsDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2-Models/main/BEACON-V2-Model/datasets/endpoints.json",
"openAPIEndpointsDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/datasets/endpoints.json",
"rootUrl": conf.uri + "datasets",
"singleEntryUrl": conf.uri + "datasets/{id}",
"filteringTermsUrl": conf.uri + "datasets/filtering_terms",
Expand Down Expand Up @@ -282,7 +282,7 @@ async def beacon_map(request):
},
"genomicVariant": {
"entryType": "genomicVariant",
"openAPIEndpointsDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2-Models/main/BEACON-V2-Model/genomicVariations/endpoints.json",
"openAPIEndpointsDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/genomicVariations/endpoints.json",
"rootUrl": conf.uri + "g_variants",
"singleEntryUrl": conf.uri + "g_variants/{variantInternalId}",
"endpoints": {
Expand All @@ -306,7 +306,7 @@ async def beacon_map(request):
},
"individual": {
"entryType": "individual",
"openAPIEndpointsDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2-Models/main/BEACON-V2-Model/individuals/endpoints.json",
"openAPIEndpointsDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/individuals/endpoints.json",
"rootUrl": conf.uri + "individuals",
"singleEntryUrl": conf.uri + "individuals/{id}",
"filteringTermsUrl": conf.uri + "individuals/filtering_terms",
Expand All @@ -331,7 +331,7 @@ async def beacon_map(request):
},
"run": {
"entryType": "run",
"openAPIEndpointsDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2-Models/main/BEACON-V2-Model/runs/endpoints.json",
"openAPIEndpointsDefinition": "https://raw.githubusercontent.com/ga4gh-beacon/beacon-v2/main/models/json/beacon-v2-default-model/runs/endpoints.json",
"rootUrl": conf.uri + "runs",
"singleEntryUrl": conf.uri + "runs/{id}",
"endpoints": {
Expand Down
4 changes: 2 additions & 2 deletions deploy/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
beacon_id = 'org.ega-archive.ga4gh-approval-beacon-test' # ID of the Beacon
beacon_name = 'GA4GH Approval Beacon Test' # Name of the Beacon service
api_version = 'v2.0.0' # Version of the Beacon implementation
uri = 'https://beacon-apis-test.ega-archive.org/api/'
uri = 'https://beacon-apis-demo.ega-archive.org/api/'

#
# Beacon granularity
Expand All @@ -28,7 +28,7 @@
'08003 Barcelona, Spain')
org_welcome_url = 'https://ega-archive.org/'
org_contact_url = 'mailto:[email protected]'
org_logo_url = 'https://ega-archive.org/images/logo.png'
org_logo_url = 'https://legacy.ega-archive.org/images/logo.png'
org_info = ''

#
Expand Down
Loading

0 comments on commit 668dcff

Please sign in to comment.