diff --git a/ippisite/ippidb/gx.py b/ippisite/ippidb/gx.py new file mode 100644 index 0000000000000000000000000000000000000000..999004b40da1e46bc72936289d7868cab616e6d9 --- /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)