Question: Upload Custom Tool
1
gravatar for katherine.beaulieu014
2.4 years ago by
katherine.beaulieu01480 wrote:

Hello everyone, I have been struggling with a custom tool I have been trying to create for a bit now. The purpose of the tool is to pull files from the irods file system and drop them into galaxy's history. The tool can take a file path name either as text or from a drop down menu where the file paths are generated from a code file in the tool's config file. The tool works well for single files but there are two problems. 1) The tool can't detect the file format of the file it is putting in history and 2) The tool can only upload one file at a time. I thought of using the galaxy 'upload from computer' tool as a template but this tool must be workflow compatible even if it is to be used at the end of a workflow or whatnot.

What I have done to address the format detection problem: 1) Tried setting a variable in cheetah to just the file extension passed in from the tool's parameters. Problem: The format attribute of the data tag can't get at the value of the cheetah variable. 2) Tried setting the format value to 'auto'. Problem: Everything just gets set to 'data'.

What I have done to address the multiple file upload problem: 1) Tried to use a repeat for the text input of the file path, and a multiple selection box for the existing file path parameter and then just pass the arguments to my python script which creates a new file for each path name. Not quite sure what to do with the outputs tag.

*Right now my script doesn't do anything with the $output parameter

Any help on this would be much appreciated. I am a beginner to working with Galaxy but am determined to get this working.

tool galaxy irods • 1.0k views
ADD COMMENTlink modified 2.4 years ago • written 2.4 years ago by katherine.beaulieu01480
1

Both problems have been solved using this forum post: https://lists.galaxyproject.org/pipermail/galaxy-dev/2014-August/020361.html I just used the really specific file output names and that created multiple output files and assigned the correct file formats to the files.

ADD REPLYlink written 2.4 years ago by katherine.beaulieu01480
1
gravatar for ebiokit
2.4 years ago by
ebiokit10
ebiokit10 wrote:

Hi Katherine!

I'm really interested on the tool that you are developing as I would need something similar for the project in which I'm involved. I found your github profile and saw the code for push files to iRODS which looks great, however I can't find the code for pull. Could you please send me the link to the code? I'm really curious about how did you developed this tool.

Many thanks!!

ADD COMMENTlink written 2.4 years ago by ebiokit10
1
gravatar for katherine.beaulieu014
2.4 years ago by
katherine.beaulieu01480 wrote:

Hi ebiokit, The code on my github repo is really outdated as I have been asked to put all my code on the company github repo. Here is the link to both the push and the pull repos: https://github.com/AAFC-MBB/Galaxy/tree/dev/wrappers/irods_pull

https://github.com/AAFC-MBB/Galaxy/tree/dev/wrappers/irods_push. I have actually solved the problem myself for this question, unsure how to close the question though. Let me know if you have any more questions about it!

*Note: Unfortunately to get some of the cooler features to work like listing existing files and directories in irods, in Galaxy you have to have the python irodsclient api installed in your virtualenv before hand.

ADD COMMENTlink modified 2.4 years ago • written 2.4 years ago by katherine.beaulieu01480

Wow!! sounds really good! I'm looking forwards to test both tools (push and pull) Many thanks!!

ADD REPLYlink written 2.4 years ago by ebiokit10

Hi again,

I'm trying to install the tools on my Galaxy instance, meanwhile I've got a question. As I understand both tools (push and pull)I use the iRODS credentials stored at ~/.irods in the Galaxy's machine. That would mean that there is an unique iRODS account for all users in Galaxym even for annonimous users (if enabled on the server) and everybody can access and upload data to iRODS, Right? That would work for private instances of Galaxy but in a public mirror it could be dangerous in terms of privacy.

Thanks!!

ADD REPLYlink written 2.4 years ago by ebiokit10

I am currently working on a more effective solution to this problem, hopefully in the form of an authentication tool. Unfortunately, Galaxy doesn't have a password parameter and it isn't much safer to pass it in just as a plain text parameter. The iRods api also doesn't have the ability to generate api keys so this is the best I could do for the time being. I am still quite deep in development with this tool which is why the documentation is quite lacking, and the github repo generally changes everyday.

ADD REPLYlink modified 2.4 years ago • written 2.4 years ago by katherine.beaulieu01480

Sure!! Please do not get me wrong!! It's an excellent work and it's really nice to see that other people is working on iRODS integration in Galaxy. Thanks for all and good luck with your devel! :)

ADD REPLYlink modified 2.4 years ago • written 2.4 years ago by ebiokit10

My bad as well, reread that and realized it sounded a bit defensive! Thanks for the support!

ADD REPLYlink written 2.4 years ago by katherine.beaulieu01480
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: 172 users visited in the last hour