From 6d7859680241fe3eff10742397d5e626694c0f4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20=20MENAGER?= <herve.menager@pasteur.fr> Date: Thu, 27 Jul 2017 18:09:19 +0200 Subject: [PATCH] galaxy services client, WIP Former-commit-id: e84369db97e3de18097d56201b39ce2c4ee8ea5e --- ippisite/ippidb/gx.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 ippisite/ippidb/gx.py diff --git a/ippisite/ippidb/gx.py b/ippisite/ippidb/gx.py new file mode 100644 index 00000000..999004b4 --- /dev/null +++ b/ippisite/ippidb/gx.py @@ -0,0 +1,15 @@ +from bioblend.galaxy import GalaxyInstance +from bioblend.galaxy.tools.inputs import inputs + +workflow_id = 'dad6103ff71ca4fe' +galaxy_url = 'https://galaxy-dev.web.pasteur.fr' +api_key = '21c2ce387688b1a785040762f7c9c331' + +def run_workflow_and_get_results(input_file): + gi = GalaxyInstance(galaxy_url, key=api_key) + gi.verify = False + history_id = gi.histories.create_history("ippidb_history")['id'] + dataset_id = gi.tools.upload_file(input_file, history_id)['outputs'][0]['id'] + inputs = {'0':{'id':dataset_id, 'src': 'hda' }} + workflow_run = gi.workflows.invoke_workflow(workflow_id, inputs=inputs, history_id=history_id) + print(workflow_run) -- GitLab