Question: Running workflow error
gravatar for jarnop97
12 months ago by
jarnop970 wrote:

Heey guys,

I have been working with the bioblend package for a week now and it works really nice and everything seems to be well documented. I wanted to run a workflow from my script but unfortunatly I get an error, the workflow works fine if you run it from the server. And the file is present in the history. Can you guys help out?


def activating_workflow(workflow_name, history_name, filename):
Takes given file from given history folder. 
WARNING: Filename and foldername should be unique to
prevent uneccesary confusion or errors
Input: Name of workflow in galaxy server, name
of history folder in galaxy server, name of 
file in galaxy server
Output: Depends on worklfow
wl = gi.workflows.get_workflows()
historylog = gi.histories.get_histories()
for elem in wl:
    if elem['name'] == workflow_name:
        workflow_id = elem['id']
wf = gi.workflows.show_workflow(workflow_id)  
for elem in historylog: #searching for the folder ID, if folder is not present code will crash
    if elem['name'] == history_name:
        id_hist = elem['id']
        break # when found stop code 
dt = gi.histories.show_history(id_hist, contents= True)
for elem in dt:
    if elem['name'] == filename:
        id_data = elem['dataset_id']
datamap = {}
datamap['10'] = {'id':id_data, 'scr': 'hda'}
gi.workflows.run_workflow(workflow_id, datamap, history_name = 'Results')

if __name__ == '__main__':
    gi = galaxy.GalaxyInstance(url = xxxxxx, key = xxxxxxxxxx)
    # example:    
    activating_workflow('RNA-seq(Hisat)', 'test_folder', 'outputname.fastq')

Error: Traceback (most recent call last): File "", line 85, in <module> activating_workflow('RNA-seq(Hisat)', 'test_folder', 'outputname.fastq') File "", line 59, in activating_workflow gi.workflows.run_workflow(workflow_id, datamap, history_name = 'Results') File "/home/jarnopersoon/.local/lib/python2.7/site-packages/bioblend/galaxy/workflows/", line 271, in run_workflow return Client._post(self, payload) File "/home/jarnopersoon/.local/lib/python2.7/site-packages/bioblend/galaxy/", line 157, in _post files_attached=files_attached) File "/home/jarnopersoon/.local/lib/python2.7/site-packages/bioblend/", line 134, in make_post_request body=r.text, status_code=r.status_code) bioblend.ConnectionError: Unexpected HTTP status code: 400: {"err_msg": "Workflow cannot be run because an expected input step '2844753' has no input dataset.", "err_code": 0}

Thank you in advance for helping out

software error galaxy • 276 views
ADD COMMENTlink written 12 months ago by jarnop970
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 113 users visited in the last hour