Question: Upload directory paths
gravatar for dgygax
3.6 years ago by
United States
dgygax50 wrote:

I am running the local version of galaxy. My question regards the tool 'Upload File' within 'Get Data'. The associated upload.xml file contains the parameter <param name="file_data  type="file"  size="30" label="File"  ajax-upload="true"  help="TIP: ....">. Using the type="file" allows the user to browse the hard drive for a specific file.

I want to implement a tool into my local galaxy using the param type="file" that allows the user to browse and choose a specific file. After choosing the file, the file pathway will be treated as an input variable and transferred into python code where I will be able to alter the path.

Is this possible? Any help would be much appreciated.

development tool upload datasets • 1.7k views
ADD COMMENTlink modified 3.6 years ago • written 3.6 years ago by dgygax50
gravatar for jmchilton
3.6 years ago by
United States
jmchilton1.0k wrote:

I am not 100% sure I understand the question exactly, but in general I would encourage tool developers to deal with Galaxy datasets instead of files. There is a full discussion of this on the galaxy-dev list ( with possibilities of where to look to add similar functionality and of why I would discourage using Galaxy this way at this time.

ADD COMMENTlink written 3.6 years ago by jmchilton1.0k

Thank you, that is very helpful.

I guess more directly my question is, can a tool be developed in galaxy that allows the user to select a directory through browsing, and then the pathway to that directory is submitted to a python program?

ADD REPLYlink written 3.6 years ago by dgygax50

You can do anything by bending Galaxy - however John's sugestion about using datasets (files already imported to Galaxy) is strongly preferred and the official supported way to dealing with data.

Can you specify your problem more, so we can try to save you the development time?

ADD REPLYlink written 3.6 years ago by Martin Čech ♦♦ 4.3k

I would like to design a tool where one of the input parameters gives you browsing ability to select a local file system directory. The local file system pathway to this directory will then be an input variable in my python program. This will allow me to navigate this local file system directory using my python program.

ADD REPLYlink written 3.6 years ago by dgygax50

This is not a problem, this is your solution to it. What are you trying to solve?

ADD REPLYlink written 3.6 years ago by Martin Čech ♦♦ 4.3k

I am sorry, I am very new to galaxy. Are you saying the solution was already specified above? 

I have a biological assay that produces one folder that contains two separate directories on my local hard drive. Each of these directories contains 200 files. One directory holds tiff files and the other directory holds text files. Every tiff file in the one directory has a corresponding text file that has the same name in the other directory.  I need to be able to access the local file system pathway to the top folder so that I can look in each directory and validate that every tiff file does have a corresponding text file. Therefore I don't need to store a file in the galaxy current history but only extract the local file system path to the directory. I would like to do so using a galaxy tool that lets you browse your local file system.

ADD REPLYlink written 3.6 years ago by dgygax50

Galaxy is definitely not capable of doing this currently - you will need to significantly rework parts of Galaxy if you want it to be usable with this use case.

- Would this tool only run if Galaxy was already on the same computer or do you want to deploy a public, institution, or lab wide instance of Galaxy that operates in this manner?

ADD REPLYlink written 3.6 years ago by jmchilton1.0k

There may be good reasons to bring the entire analysis and QC process into Galaxy but as discussed that's probably a long and complex conversation.

OTOH if you already run the assay and generate the two directories in some reproducible process outside galaxy, why not perform this file check step and generate a report as an additional step in that existing external process? Comparing and reporting file path matches seems like a trivial enough task for a small script incorporated into that external workflow or have I missed something here? That would at least let you get on with making use of existing tools in galaxy for downstream processing.  


ADD REPLYlink modified 3.6 years ago • written 3.6 years ago by fubar1.1k

This tool would be used lab wide, but would not become public. I have gone around it and am just hardcoding the beginning of the path in my python program. The user will only be inputting the assay number(same as folder label) they want to examine and then everything else is happening under the hood. 

Thanks for all the responses and help everyone.

ADD REPLYlink written 3.6 years ago by dgygax50
Please log in to add an answer.


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