Hi everyone, I was wondering how tools like the uscs browser upload tool work. How can someone take a dataset from another website and add it as a history item to galaxy? I am looking to do something similar.
These are tools that we call 'data source'. You can read on it here: https://wiki.galaxyproject.org/Admin/Internals/DataSources
In concept it passes a Galaxy instance identifier along with the redirect to the data source website, then you use their interface to configure what data you want and click 'send to Galaxy' which makes the data available and shares the link with the Galaxy instance while redirecting you back. Galaxy then downloads the data and adds it to your history.
For this to work you have to add something like a tool wrapper on the galaxy server BUT ALSO: the server, which hosts the data, has to be set up to communicate with a Galaxy server. We did this a while back with doRiNA.
writing the tool for Galaxy is the easy part, but you have to convince the data server admins to communicate with Galaxy servers. I've written a tutorial on how this can be done with a simple CherryPy webserver. This and some other examples can be found in Eric Rasche's repository.