Question: Upload directory paths
1
gravatar for dgygax
4.4 years ago by
dgygax50
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 • 2.0k views
ADD COMMENTlink modified 4.4 years ago • written 4.4 years ago by dgygax50
3
gravatar for jmchilton
4.4 years ago by
jmchilton1.1k
United States
jmchilton1.1k 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 (http://dev.list.galaxyproject.org/Upload-a-file-tc4664480.html) 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 4.4 years ago by jmchilton1.1k

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 4.4 years ago by dgygax50
1

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 4.4 years ago by Martin Čech ♦♦ 4.9k

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 4.4 years ago by dgygax50

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

ADD REPLYlink written 4.4 years ago by Martin Čech ♦♦ 4.9k

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 4.4 years ago by dgygax50
1

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 4.4 years ago by jmchilton1.1k
1

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 4.4 years ago • written 4.4 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 4.4 years ago by dgygax50
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: 167 users visited in the last hour