def pubmed_search(): global NODE_CACHE, REL_CACHE query = request.args.get("query", "chemotaxis", type=str) threshold = request.args.get("threshold", 1, type=int) all_groups = neo.group_names() filtered_groups = pubmed.neurons_for_query(all_groups, query, threshold) neurons = neo.neuron_names(filtered_groups) res = neo.all_cons_for_set(neurons) NODE_CACHE = res["neurons"] REL_CACHE = res["synapses"] return jsonify(result=res)
def pubmed_search(): global NODE_CACHE, REL_CACHE query = request.args.get('query', 'chemotaxis', type=str) threshold = request.args.get('threshold', 1, type=int) all_groups = neo.group_names() filtered_groups = pubmed.neurons_for_query(all_groups, query, threshold) neurons = neo.neuron_names(filtered_groups) res = neo.all_cons_for_set(neurons) NODE_CACHE = res['neurons'] REL_CACHE = res['synapses'] return jsonify(result=res)
def group_names(): groups = neo.group_names() print groups return jsonify(result=groups)