Question: Recursive Folder Checkbox Selection Tool
1
gravatar for richeounet
2.6 years ago by
richeounet10
richeounet10 wrote:

Hello,

I’m coming to you because I have a problem with a galaxy tool I’m making. Indeed, I have to make a dynamic checkbox selection tool where each checkbox is the name of a subfolder in a folder. And when I select one of the subfolders, it has to do the same with each subfolders in the subfolder. Am I being clear?

I hope you can help me!

Thanks a lot

galaxy xml • 927 views
ADD COMMENTlink modified 2.6 years ago • written 2.6 years ago by richeounet10
1

Hi

There are ways to do that, but it all depends on your set-up. Are those subfolders and their subfolders fixed or dynamic? How often do they change?

Also, what have you tried so far? how does your tool xml look like at the moment?

Regards, Hans-Rudolf

ADD REPLYlink written 2.6 years ago by Hotz, Hans-Rudolf1.8k

Hi, Thanks for your answer. The subfolders are not going to change often, in any case, not during the process.

I tried to do it with a .loc file which i fill in (with a python script) at the startup of the page.But the python script can only be executed when the button is pressed...

I saw on the internet that i must use cheetah code but i don't know how I can do that and if it's a correct way to do that.

Can you explain to me your ideas ?

Regards

ADD REPLYlink modified 2.6 years ago • written 2.6 years ago by richeounet10
0
gravatar for Hotz, Hans-Rudolf
2.6 years ago by
Switzerland
Hotz, Hans-Rudolf1.8k wrote:

Hi

Since the directory structure is not dynamic, I would start with something like this:

https://raw.githubusercontent.com/hrhotz/GalaxyAdmins/master/test.xml

Hans-Rudolf

ADD COMMENTlink written 2.6 years ago by Hotz, Hans-Rudolf1.8k
0
gravatar for richeounet
2.6 years ago by
richeounet10
richeounet10 wrote:

Hi,

Your method is not very adapted for me. While the tool is running, the directory structure is fixed. Apart from that, we should be able to add or delete directories. So I need the checkboxes creation to be dynamic. Am I being clear?

Thanks

ADD COMMENTlink written 2.6 years ago by richeounet10
1

sorry, I misunderstood you

Maybe this is a solution for you: http://tinyurl.com/6uom4uo (it is a silimar question from galaxy-dev)

Hans-Rudolf

ADD REPLYlink written 2.6 years ago by Hotz, Hans-Rudolf1.8k

No problem. It's my fault too, i'm not clear. Thanks for your answer! But i've got an error : "uncaught exception in exposed API method". I'm pretty sure that the problem is at this line : <code file="dynamic_list.py" /> Have you an idea ?

Thanks again

ADD REPLYlink modified 2.6 years ago • written 2.6 years ago by richeounet10

at what stage (i.e. "executing the tool", "looking at the GUI and selecting folders", "restarting Galaxy", etc) do you get that message?

ADD REPLYlink written 2.6 years ago by Hotz, Hans-Rudolf1.8k

Hi,

I have the error when i want to open the tool (MyTools).

ADD REPLYlink written 2.6 years ago by richeounet10

...but you get the GUI? and is the drop down poulated with folder names?

ADD REPLYlink modified 2.6 years ago • written 2.6 years ago by Hotz, Hans-Rudolf1.8k

Sorry, i was not clear. When i open the tool, i've got a blank page with the error. I've got no interface, no selection, nothing..

ADD REPLYlink written 2.6 years ago by richeounet10

looks like you have to go step by step, disecting the xml file and/or the python code.

  • do you get the GUI if you comment out the variable with the dynamic drop down in the xml file?

  • does it work, if the python code just returns a fixed value, eg:

    foo = [("A","A",False)]

    return foo

ADD REPLYlink modified 2.6 years ago • written 2.6 years ago by Hotz, Hans-Rudolf1.8k

Hi,

The problem is at this line : <code file="dynamic_list.py" /> When i comment out it, the problem disappear. And I've got the text "No Options Available" in the checkbox (because the python script is not load i suppose).

ADD REPLYlink written 2.6 years ago by richeounet10

Have you tried a simple python script which just returns a fixed value?

ADD REPLYlink written 2.5 years ago by Hotz, Hans-Rudolf1.8k
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: 174 users visited in the last hour