Question: Running workflow error
0
gravatar for jarnop97
19 months ago by
jarnop97 • 0
jarnop97 • 0 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?

Script:

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']
        break
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']
        break
datamap = {}
datamap['10'] = {'id':id_data, 'scr': 'hda'}
gi.workflows.run_workflow(workflow_id, datamap, history_name = 'Results')

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

Error: Traceback (most recent call last): File "test_server.py", line 85, in <module> activating_workflow('RNA-seq(Hisat)', 'test_folder', 'outputname.fastq') File "test_server.py", 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/__init__.py", line 271, in run_workflow return Client._post(self, payload) File "/home/jarnopersoon/.local/lib/python2.7/site-packages/bioblend/galaxy/client.py", line 157, in _post files_attached=files_attached) File "/home/jarnopersoon/.local/lib/python2.7/site-packages/bioblend/galaxyclient.py", 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 • 450 views
ADD COMMENT • link • written 19 months ago by jarnop97 • 0
Please log in to add an answer.

Help
Access

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