Hi all,
My purpose is to run a Galaxy tool with two parameters from command line via BioBlend.
More specifically I am running the following code:
from bioblend.galaxy import GalaxyInstance
from bioblend.galaxy.histories import HistoryClient
from bioblend.galaxy.tools import ToolClient
from bioblend.galaxy.datasets import DatasetClient
galaxyInstance = GalaxyInstance(url=GALAXY_URL, key=API_KEY)
historyClient = HistoryClient(galaxyInstance)
toolClient = ToolClient(galaxyInstance)
datasetClient = DatasetClient(galaxyInstance)
history = historyClient.create_history('tmp')
inputFile1 = toolClient.upload_file(pathName1, history['id'], type='txt')
inputFile2 = toolClient.upload_file(pathName2, history['id'], type='txt')
params = {TOOL_ID_IN_GALAXY: {'input_numbers_001':{'src': 'hda', 'id': inputFile1['outputs'][0]['id']},'input_numbers_002':{'src': 'hda', 'id': inputFile2['outputs'][0]['id']}}}
output = toolClient.run_tool(history_id=history['id'], tool_id=TOOL_ID, tool_inputs=params)
This does not work properly - Galaxy server's log says that both input parameters 'input_numbers_001' and 'input_numbers_002' have the content of inputFile2.
But my purpose is of course to have the content of inputFile1 in 'input_numbers_001'.
I have a strong intuition that maybe I am not setting parameters correctly in
params = {TOOL_ID_IN_GALAXY: {...}".
I have done this by following the high-level instructions given in in https://github.com/afgane/bioblend/issues/71.
Does anybody know how to set the parameters correctly?
Or do you think the source of the error is somewhere else?
Thanks in advance,
Erno Lindfors