def ncbi_esearch(keyword): """ Search with NCBI EGQuery and return the JSON results """ if request.args.has_key('callback'): kwargs = {"term": keyword, "db": request.args['db']} return EUtils.esearch(request.args['callback'], request.args['email'], **kwargs) else: kwargs = {"term": keyword, "db": request.args['db']} return EUtils.esearch(None, ENTREZ_EMAIL, **kwargs)
def ncbi_egquery(keyword): """ Search with NCBI EGQuery and return the JSON results """ if request.args.has_key('callback'): kwargs = {"term": keyword} print "term:",keyword return EUtils.egquery(request.args['callback'], request.args['email'], **kwargs) else: kwargs = {"term": keyword} return EUtils.egquery(None, ENTREZ_EMAIL, **kwargs)