Question: Inputs for the FASTQ Grooming
0
gravatar for mainulhossain
15 months ago by
mainulhossain0 wrote:

Hi All,

I am a newbie to Galaxy and Bioblend programming and have problem to find out the the name and format of the input parameter which ToolClient.run_tool call for a particular tool needs.

For example, I am trying to use FASTQ Groomer tool as the following:

from bioblend.galaxy import GalaxyInstance
from bioblend.galaxy.histories import HistoryClient
from bioblend.galaxy.libraries import LibraryClient
from bioblend.galaxy.tools import ToolClient

gi = GalaxyInstance(url='GALAXY_URL', key='MY_KEY')
history_id = id1
data_id = id2
tool_id = id3

params = {}

toolClient = ToolClient(gi)
toolClient.run_tool(history_id = history_id, tool_id = tool_id, params)

My question is how should I define tool input params? Is there any place either on Galaxy or in tool development site where one can find the syntax of input params?

Thanks in advance.

Mainul

bioblend fastq groomer • 351 views
ADD COMMENTlink modified 15 months ago by Jennifer Hillman Jackson25k • written 15 months ago by mainulhossain0
1
gravatar for Jennifer Hillman Jackson
15 months ago by
United States
Jennifer Hillman Jackson25k wrote:

Hello,

Please see the docs here: https://bioblend.readthedocs.io/en/latest/api_docs/galaxy/all.html#module-bioblend.galaxy.tools

Examples for the run_tool function's parameters are linked from the help. The Fastq Groomer tool isn't listed in the examples, but any target tool's wrapper can be examined for parameters/syntax.

An alternative is to put the tools you wish to use into a workflow with the parameters set, then run the workflow using Bioblend. This eliminates the need to individually enter all of the parameters for all the tools you plan to run. https://bioblend.readthedocs.io/en/latest/api_docs/galaxy/docs.html#run-a-workflow

Hope this helps! Jen, Galaxy team

ADD COMMENTlink written 15 months ago by Jennifer Hillman Jackson25k

Thank you very much. I was able to pass input parameters to run_tool command. But I still have a problem with run_tool. For some tools, for example FASTQ Groomer, where a single input parameter is enough, the command works.

param = {'name': dataset_id}
runtool(history_id, tool_id, param)

But for the tools where I want to give multiple parameters, it's not working. For example, in FastUniq the input params look as follows:

[
{
.... 'name':'fastq_R1', .... .... }, {
..... 'name':'fastq_R2', .... ... }, {
.... ... } ]

I want to pass here two input files, fastq_R1 and fast1_R2. I tried the following:

params = [{'name': dataset_id1}, {'name': dataset_id2}]
runtool(history_id, tool_id, param)

It's not working. I get the following error:

Error at line 19: Unexpected HTTP status code: 500: {"err_msg": "Uncaught exception in exposed API method:", "err_code": 0}

Do you have any idea how to do it?

Regards

ADD REPLYlink modified 14 months ago • written 14 months ago by mainulhossain0
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: 181 users visited in the last hour