diff options
author | lltommy | 2020-06-14 21:55:26 +0200 |
---|---|---|
committer | lltommy | 2020-06-14 21:55:26 +0200 |
commit | 6b2ac7c6f2402c76f030b9456b1e0c57fcf8bbb1 (patch) | |
tree | ad93b8fd9224414d592f4413a2755a54f09df571 /bh20simplewebuploader/main.py | |
parent | a8674b7e5c726994a102ea8c47d0e82c12e23d51 (diff) | |
download | bh20-seq-resource-6b2ac7c6f2402c76f030b9456b1e0c57fcf8bbb1.tar.gz bh20-seq-resource-6b2ac7c6f2402c76f030b9456b1e0c57fcf8bbb1.tar.lz bh20-seq-resource-6b2ac7c6f2402c76f030b9456b1e0c57fcf8bbb1.zip |
Tried to make a start with the 'demo' part, table works, drilling down not
Diffstat (limited to 'bh20simplewebuploader/main.py')
-rw-r--r-- | bh20simplewebuploader/main.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/bh20simplewebuploader/main.py b/bh20simplewebuploader/main.py index 851d8d5..b67e1bf 100644 --- a/bh20simplewebuploader/main.py +++ b/bh20simplewebuploader/main.py @@ -539,9 +539,9 @@ def getSEQCountbytech(): payload = {'query': query, 'format': 'json'} r = requests.get(baseURL, params=payload) result = r.json()['results']['bindings'] - return jsonify([{'Fasta Count': x['fastaCount']['value'], - 'tech': x['tech']['value'], - 'Label': x['tech_label']['value']} for x in result]) + return jsonify([{'count': x['fastaCount']['value'], + 'key': x['tech']['value'], + 'label': x['tech_label']['value']} for x in result]) ## List all Sequences/submissions by a given tech, as example e.g. http://purl.obolibrary.org/obo/OBI_0000759 ## Has to be encoded again so should be --> http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FOBI_0000759 @@ -582,9 +582,9 @@ def getSEQCountbyLocation(): payload = {'query': query, 'format': 'json'} r = requests.get(baseURL, params=payload) result = r.json()['results']['bindings'] - return jsonify([{'Fasta Count': x['fastaCount']['value'], - 'GeoLocation': x['geoLocation']['value'], - 'GeoLocation Label': x['geoLocation_label']['value']} for x in result]) + return jsonify([{'count': x['fastaCount']['value'], + 'key': x['geoLocation']['value'], + 'label': x['geoLocation_label']['value']} for x in result]) @app.route('/api/getSEQCountbySpecimenSource', methods=['GET']) @@ -599,9 +599,9 @@ def getSEQCountbySpecimenSource(): payload = {'query': query, 'format': 'json'} r = requests.get(baseURL, params=payload) result = r.json()['results']['bindings'] - return jsonify([{'Fasta Count': x['fastaCount']['value'], - 'Specimen Source': x['specimen_source']['value'], - 'Label': x['specimen_source_label']['value']} for x in result]) + return jsonify([{'count': x['fastaCount']['value'], + 'key': x['specimen_source']['value'], + 'label': x['specimen_source_label']['value']} for x in result]) # Example specimen http%3A%2F%2Fpurl.obolibrary.org%2Fobo%2FNCIT_C155831 @app.route('/api/getSEQbySpecimenSource', methods=['GET']) |