about summary refs log tree commit diff
path: root/bh20simplewebuploader/main.py
diff options
context:
space:
mode:
authorPjotr Prins2020-07-21 09:28:43 +0100
committerPjotr Prins2020-07-21 09:28:43 +0100
commit56b5c444fd10cc569c4c0d7b76d034799ce679f9 (patch)
tree2ca3fdf27884c4dca9178a80f5916d04550209ea /bh20simplewebuploader/main.py
parent2e96d0d87abd6357868114b0b59ee66b08985235 (diff)
downloadbh20-seq-resource-56b5c444fd10cc569c4c0d7b76d034799ce679f9.tar.gz
bh20-seq-resource-56b5c444fd10cc569c4c0d7b76d034799ce679f9.tar.lz
bh20-seq-resource-56b5c444fd10cc569c4c0d7b76d034799ce679f9.zip
Working on search
Diffstat (limited to 'bh20simplewebuploader/main.py')
-rw-r--r--bh20simplewebuploader/main.py26
1 files changed, 0 insertions, 26 deletions
diff --git a/bh20simplewebuploader/main.py b/bh20simplewebuploader/main.py
index c306749..62ec5cd 100644
--- a/bh20simplewebuploader/main.py
+++ b/bh20simplewebuploader/main.py
@@ -694,32 +694,6 @@ def getCountDB():
     # print(result, file=sys.stderr)
     return jsonify({'sequences': int(result[0]["num"]["value"])})
 
-# Execute a 'global search'
-@app.route('/api/search', methods=['GET'])
-def search():
-    s = request.args.get('s')
-    query = """
-    PREFIX pubseq: <http://biohackathon.org/bh20-seq-schema#MainSchema/>
-    PREFIX sio: <http://semanticscience.org/resource/>
-    PREFIX edam: <http://edamontology.org/>
-    select distinct ?id ?seq ?info
-    {
-    ?sample sio:SIO_000115 "%s" .
-    ?sample sio:SIO_000115 ?id .
-    ?seq pubseq:sample ?sample .
-    ?sample edam:data_2091 ?info .
-    } limit 100
-    """ % s
-    payload = {'query': query, 'format': 'json'}
-    r = requests.get(baseURL, params=payload)
-    result = r.json()['results']['bindings']
-    print(result,file=sys.stderr);
-    return jsonify([{
-        'id': x['id']['value'],
-        'seq': x['seq']['value'],
-        'info': x['info']['value'],
-    } for x in result])
-
 @app.route('/api/getAllaccessions', methods=['GET'])
 def getAllaccessions():
     query="""SELECT DISTINCT ?fasta ?value WHERE {?fasta ?x[ <http://edamontology.org/data_2091> ?value ]}"""