# Run a tool with custom parameters using Bioblend

**URL:** <https://help.galaxyproject.org/t/run-a-tool-with-custom-parameters-using-bioblend/6057>\
**Category:** Uncategorized\
**Tags:** bioblend\
**Created:** [May 30, 2021, 4:26pm UTC](https://help.galaxyproject.org/t/run-a-tool-with-custom-parameters-using-bioblend/6057 "2021-05-30T16:26:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hudson\_5](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/hudson_5/32/2473_2.png) [@Hudson\_5](https://help.galaxyproject.org/u/Hudson_5)\
**Post date:** [May 30, 2021, 4:26pm UTC](https://help.galaxyproject.org/t/run-a-tool-with-custom-parameters-using-bioblend/6057/1 "2021-05-30T16:26:52Z")

</div>

Hello guys, please excuse my english by advance but its not my main language.

So Im trying to “invoke” or “run” a tool of my galaxy instance using the bioblend package. I’ve already tried this with a very simple tool without any problem but now im trying with a more complex tool : NCBI-blastp

Here is the error I got:

![Capture d’écran 2021-05-30 à 18.09.37](https://us1.discourse-cdn.com/flex020/uploads/galaxy/original/2X/2/222927687b292b59189f9832f3780ca415d46a74.png)

from the python code:

 ![Capture d’écran 2021-05-30 à 18.12.19](https://us1.discourse-cdn.com/flex020/uploads/galaxy/original/2X/9/9ac5fa800f7f1b8e5c55ab24aa0113ec57f67a80.jpeg)

Here im trying to get a query fasta file and a big database fasta from differents history. (everything has been uploaded successfully before), it seems to work with the query but not the database… im using those weird method “set param”, but maybe should I try it from another way?

Here is the config XML file of my tool:

 ![Capture d’écran 2021-05-30 à 18.10.45](https://us1.discourse-cdn.com/flex020/uploads/galaxy/original/2X/5/5a9ee3c75d1a7fec34abccbb07db3d36ca33692e.jpeg)

edit : here is a detailed error report

 ![Capture d’écran 2021-05-30 à 18.46.43](https://us1.discourse-cdn.com/flex020/uploads/galaxy/original/2X/b/b62b9a296f8e2ccadd1f4d479442679bb29102cd.jpeg)

Its very strange, Subject database/sequences is locked on “db”, but I’ve set the param on “file”…

I’ve try everything :’( do someone already did this with success ?

---

<div class="post-metadata">

**Author:** ![David](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/david/32/7031_2.png) [@David](https://help.galaxyproject.org/u/David)\
**Post date:** [May 30, 2021, 5:06pm UTC](https://help.galaxyproject.org/t/run-a-tool-with-custom-parameters-using-bioblend/6057/2 "2021-05-30T17:06:56Z")

</div>

Welcome!  
Can you check `myinputs.set_param(name="database", value=' ')` ? It’s the only one without a value;  
In the detailed error report, CommandLine has empty value for parameter `-db` and Tool Standard Error is telling you need a name for you BLAST database.

> **Read me**
>
> PS: ton anglais est bon

---

<div class="post-metadata">

**Author:** ![Hudson\_5](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/hudson_5/32/2473_2.png) [@Hudson\_5](https://help.galaxyproject.org/u/Hudson_5)\
**Post date:** [May 30, 2021, 6:29pm UTC](https://help.galaxyproject.org/t/run-a-tool-with-custom-parameters-using-bioblend/6057/3 "2021-05-30T18:29:57Z")

</div>

Hi, thx. That “set\_param(name=“database”, value=’ ')” was added by me but it doesn’t do anything. When I delete this line the same error appear.

 ![Capture d’écran 2021-05-30 à 20.22.27](https://us1.discourse-cdn.com/flex020/uploads/galaxy/original/2X/b/b79055d5e2d6957f7934fdbbdd08735d2790d38a.jpeg)

The final tool input looks like this :  
{‘query’: {‘src’: ‘hda’, ‘id’: ‘a7db2fac67043c7e’}, ‘db\_opts\_selector’: ‘file’, ‘subject’: {‘src’: ‘hda’, ‘id’: ‘b472e2eb553fa0d1’}, ‘blast\_type’: ‘blastp’}

the database come from another history than the query\_file, can this cause a problem ?

---

<div class="post-metadata">

**Author:** ![David](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/david/32/7031_2.png) [@David](https://help.galaxyproject.org/u/David)\
**Post date:** [May 30, 2021, 9:20pm UTC](https://help.galaxyproject.org/t/run-a-tool-with-custom-parameters-using-bioblend/6057/4 "2021-05-30T21:20:07Z")

</div>

> [@Hudson\_5](#):
>
> the database come from another history than the query\_file, can this cause a problem

I guess it makes sense.  
Did you test with a db in the same history?

---

<div class="post-metadata">

**Author:** ![Hudson\_5](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/hudson_5/32/2473_2.png) [@Hudson\_5](https://help.galaxyproject.org/u/Hudson_5)\
**Post date:** [May 31, 2021, 5:57am UTC](https://help.galaxyproject.org/t/run-a-tool-with-custom-parameters-using-bioblend/6057/5 "2021-05-31T05:57:47Z")

</div>

Hello, I just test with the same history but still nothing.

I think I’ve found the origin of the problem, when there is a “selected” tag on “True” in an “option” tag, the param is stuck on that option. The same problem appear here with the “out\_format” param which is stuck on “ext” option. The question is, can we change that with the api (without modifying the xml file) ?

![Capture d’écran 2021-05-31 à 07.51.50](https://us1.discourse-cdn.com/flex020/uploads/galaxy/original/2X/a/a3fa6028657a95ac89724570f1d7290276714feb.png)

![Capture d’écran 2021-05-31 à 07.51.38](https://us1.discourse-cdn.com/flex020/uploads/galaxy/original/2X/e/e3e934e34b8da79f51556e6627eebef6041d8f2c.png)

![Capture d’écran 2021-05-31 à 07.51.29](https://us1.discourse-cdn.com/flex020/uploads/galaxy/original/2X/d/d41445a6da15dcc508d64326560e42f5c73c8a1e.png)

---

<div class="post-metadata">

**Author:** ![Hudson\_5](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/hudson_5/32/2473_2.png) [@Hudson\_5](https://help.galaxyproject.org/u/Hudson_5)\
**Post date:** [May 31, 2021, 1:00pm UTC](https://help.galaxyproject.org/t/run-a-tool-with-custom-parameters-using-bioblend/6057/6 "2021-05-31T13:00:26Z")

</div>

Hello, I finally did it by invoking a workflow with the tool inside instead of a tool alone, hope it will help someone in the future 🙂

![Capture d’écran 2021-05-31 à 15.00.06](https://us1.discourse-cdn.com/flex020/uploads/galaxy/original/2X/f/f7da1525b8db2957b48e2ed8608f9cfea949b055.png)

 ![Capture d’écran 2021-05-31 à 14.55.38](https://us1.discourse-cdn.com/flex020/uploads/galaxy/original/2X/1/1f3ba35f64894e8227ad6fb2ddb2dd8d79bc3869.png)  
 ![Capture d’écran 2021-05-31 à 14.50.04](https://us1.discourse-cdn.com/flex020/uploads/galaxy/original/2X/c/cc391b97ba83414fe85627e5c86adcf29ed4d8c5.png)

---

<div class="post-metadata">

**Author:** ![David](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/david/32/7031_2.png) [@David](https://help.galaxyproject.org/u/David)\
**Post date:** [May 31, 2021, 1:23pm UTC](https://help.galaxyproject.org/t/run-a-tool-with-custom-parameters-using-bioblend/6057/7 "2021-05-31T13:23:45Z")

</div>

Nice. Thanks for the detailed reports 👏
