From 1082b907d816f5da52aba6233073737632d0242f Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Mon, 9 Nov 2020 17:20:27 -0500 Subject: Make resource link work for both portable data hashes and sample id Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- bh20simplewebuploader/main.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'bh20simplewebuploader') diff --git a/bh20simplewebuploader/main.py b/bh20simplewebuploader/main.py index 73503b4..405544c 100644 --- a/bh20simplewebuploader/main.py +++ b/bh20simplewebuploader/main.py @@ -675,13 +675,27 @@ sparqlURL='http://sparql.genenetwork.org/sparql/' @app.route('/resource/') def resource(id): """Get a COVID19 resource using identifier""" + query=f""" PREFIX pubseq: PREFIX sio: select distinct ?sample ?geoname ?date ?source ?geo ?sampletype ?institute ?sequenceuri +where {{ {{ ?sample sio:SIO_000115 "{id}" . ?sequenceuri pubseq:sample ?sample . +}} +union +{{ + pubseq:sample ?sample . + ?sequenceuri pubseq:sample ?sample . +}} +union +{{ + pubseq:sample ?sample . + ?sequenceuri pubseq:sample ?sample . +}} + ?sample ?geo . ?geo rdfs:label ?geoname . ?sample ?date . -- cgit v1.2.3