def visualize_fba_analysis(username, analysis_id): """ main endpoint to visualize flux balance analysis """ analysis = Analysis.query.filter(Analysis.id == analysis_id).first_or_404() # retrieve file data from s3 filename = '{}/{}/{}'.format(username, analysis.project_id, analysis_id) resp = requests.get(S3_URL + filename) # return error code if request failed if resp.status_code != 200: return render_template('errors/server_error.html'), 500 orgs = Organism.query.order_by(Organism.tax).all() model = analysis.model model_name = model.name pathways = Kegg.get_pathways_list(org=model.kegg_org) return render_template('user/fba_analysis.html', analysis=analysis, organisms=orgs, model_name=model_name, pathways=pathways, display_sidebar=False)
def get_pathways(): org = request.args.get("org", "hsa") # the default will be the human. pathways = Kegg.get_pathways_list(org) data = json.dumps(pathways) return data
def get_kegg_pathways(username): org = request.args.get('org', 'hsa') # the default will be the human. pathways = Kegg.get_pathways_list(org) data = json.dumps(pathways) return data