From 2448b39a9fc3ab910fa4005196688b3f75be41ce Mon Sep 17 00:00:00 2001 From: lltommy Date: Thu, 11 Jun 2020 18:43:54 +0200 Subject: Fixing #65 and adding additional country information --- bh20simplewebuploader/main.py | 4 +- semantic_enrichment/countries.ttl | 99 ++++++++++++++++++++++++++++++++------- 2 files changed, 84 insertions(+), 19 deletions(-) diff --git a/bh20simplewebuploader/main.py b/bh20simplewebuploader/main.py index 81fe571..0cc22df 100644 --- a/bh20simplewebuploader/main.py +++ b/bh20simplewebuploader/main.py @@ -493,12 +493,12 @@ def getAllaccessions(): # parameter must be encoded e.g. http://arvados.org/keep:6e6276698ed8b0e6cd21f523e4f91179+123/sequence.fasta must become -# http%3A%2F%2Farvados.org%2Fkeep%3A6e6276698ed8b0e6cd21f523e4f91179%2B123%2Fsequence.fasta +# http%3A%2F%2Fcollections.lugli.arvadosapi.com%2Fc%3D00a6af865453564f6a59b3d2c81cc7c1%2B123%2Fsequence.fasta @app.route('/api/getDetailsForSeq', methods=['GET']) def getDetailsForSeq(): seq_id = request.args.get('seq') query="""SELECT DISTINCT ?key ?key_label ?value WHERE { - ?x [?key ?value] . + ?x [?key ?value] . OPTIONAL {?key ?key_tmp_label } . BIND(IF(BOUND(?key_tmp_label),?key_tmp_label, ?key) as ?key_label)}""" query=query.replace("placeholder", seq_id) diff --git a/semantic_enrichment/countries.ttl b/semantic_enrichment/countries.ttl index 0f364fc..416567f 100644 --- a/semantic_enrichment/countries.ttl +++ b/semantic_enrichment/countries.ttl @@ -112,10 +112,6 @@ ns1:P17 ; ns1:P625 "Point(-100.0 41.5)" . - rdfs:label "Kansas" ; - ns1:P17 ; - ns1:P625 "Point(-98.0 38.5)" . - rdfs:label "Missouri" ; ns1:P17 ; ns1:P625 "Point(-92.5 38.5)" . @@ -128,15 +124,22 @@ ns1:P17 ; ns1:P625 "Point(113.258976 23.128795)" . + rdfs:label "Khyber Pakhtunkhwa" ; + ns1:P17 ; + ns1:P625 "Point(71.32 34.0)" . + rdfs:label "Ho Chi Minh City" ; ns1:P17 ; - ns1:P625 "Point(106.62965 10.82302)", - "Point(106.633333333 10.816666666)" . + ns1:P625 "Point(106.633333333 10.816666666)" . rdfs:label "Zhuozhou" ; ns1:P17 ; ns1:P625 "Point(115.99176 39.48873)" . + rdfs:label "District of Columbia" ; + ns1:P17 ; + ns1:P625 "Point(-77.008611111 38.916944444)" . + rdfs:label "Victoria" ; ns1:P17 ; ns1:P625 "Point(144.0 -37.0)" . @@ -149,10 +152,18 @@ ns1:P17 ; ns1:P625 "Point(120.1675 30.25)" . + rdfs:label "Gilgit" ; + ns1:P17 ; + ns1:P625 "Point(74.289166666 35.921944444)" . + rdfs:label "San Francisco" ; ns1:P17 ; ns1:P625 "Point(-122.416388888 37.7775)" . + rdfs:label "Los Angeles" ; + ns1:P17 ; + ns1:P625 "Point(-118.24368 34.05223)" . + rdfs:label "New Hampshire" ; ns1:P17 ; ns1:P625 "Point(-71.5 44.0)" . @@ -189,6 +200,10 @@ ns1:P17 ; ns1:P625 "Point(-111.5 39.5)" . + rdfs:label "Hong Kong" ; + ns1:P17 ; + ns1:P625 "Point(114.158611111 22.278333333)" . + rdfs:label "Shanghai" ; ns1:P17 ; ns1:P625 "Point(121.466666666 31.166666666)" . @@ -205,75 +220,125 @@ ns1:P17 ; ns1:P625 "Point(-120.0 37.0)" . - rdfs:label "France" ; - ns1:P17 ; - ns1:P625 "Point(2.0 47.0)" . + rdfs:label "Africa" . rdfs:label "Brazil" ; ns1:P17 ; + ns1:P30 ; ns1:P625 "Point(-53.0 -14.0)" . - rdfs:label "South Africa" . + rdfs:label "Czech Republic" ; + ns1:P17 ; + ns1:P30 ; + ns1:P625 "Point(16.0 50.0)" . - rdfs:label "Spain" . + rdfs:label "South Africa" ; + ns1:P30 . rdfs:label "Finland" ; ns1:P17 ; + ns1:P30 ; ns1:P625 "Point(27.0 65.0)" . rdfs:label "Sweden" ; ns1:P17 ; + ns1:P30 ; ns1:P625 "Point(15.0 61.0)" . rdfs:label "Italy" ; ns1:P17 ; + ns1:P30 ; ns1:P625 "Point(12.5 42.5)" . - rdfs:label "Australia" . + rdfs:label "Australia" ; + ns1:P30 . rdfs:label "Greece" ; ns1:P17 ; + ns1:P30 ; ns1:P625 "Point(23.0 38.5)" . rdfs:label "Peru" ; ns1:P17 ; + ns1:P30 ; ns1:P625 "Point(-76.0 -9.4)" . rdfs:label "Turkey" ; ns1:P17 ; + ns1:P30 , + ; ns1:P625 "Point(36.0 39.0)" . - rdfs:label "India" . + rdfs:label "North America" . - rdfs:label "Colombia" . + rdfs:label "India" ; + ns1:P30 . + + rdfs:label "Colombia" ; + ns1:P30 . rdfs:label "Iran" ; ns1:P17 ; + ns1:P30 ; ns1:P625 "Point(53.0 32.0)" . rdfs:label "Israel" ; ns1:P17 ; + ns1:P30 ; ns1:P625 "Point(35.0 31.0)" . + rdfs:label "Malaysia" ; + ns1:P17 ; + ns1:P30 ; + ns1:P625 "Point(108.0 3.0)" . + rdfs:label "Nepal" ; ns1:P17 ; + ns1:P30 ; ns1:P625 "Point(84.0 28.0)" . + rdfs:label "Sri Lanka" ; + ns1:P17 ; + ns1:P30 ; + ns1:P625 "Point(81.0 7.0)" . + rdfs:label "Taiwan" ; ns1:P17 ; + ns1:P30 ; ns1:P625 "Point(121.0 24.0)" . - rdfs:label "Vietnam" . + rdfs:label "Vietnam" ; + ns1:P30 . rdfs:label "South Korea" ; ns1:P17 ; + ns1:P30 ; ns1:P625 "Point(128.0 36.0)" . + rdfs:label "Spain" ; + ns1:P17 ; + ns1:P30 ; + ns1:P625 "Point(-3.0 40.0)" . + + rdfs:label "Oceania" . + + rdfs:label "Pakistan" ; + ns1:P30 . + + rdfs:label "South America" . + + rdfs:label "Europe" . + rdfs:label "People's Republic of China" ; ns1:P17 ; - ns1:P625 "Point(103.0 35.0)" . + ns1:P30 ; + ns1:P625 "Point(103.451944444 35.844722222)" . + + rdfs:label "Asia" . rdfs:label "United States of America" ; ns1:P17 ; - ns1:P625 "Point(-77.036666666 38.895)" . + ns1:P30 , + ; + ns1:P625 "Point(-98.5795 39.828175)" . -- cgit v1.2.3