Accessing Galaxy using the API
While Galaxy’s main use case is via an easy-to-use web interface, it also provides a REST API for programmatic access. There are interfaces provided in several languages, for example, Python support is available from BioBlend (https://bioblend.readthedocs.io).
Here, we are going to develop a script that will load a BED file into Galaxy and call a tool to convert it to GFF format. We will load the file using Galaxy’s FTP server.
Getting ready
If you did not go through the previous recipe, please read the corresponding There’s more... section. The code was tested in a local server, as prepared in the preceding recipe, so it might require some adaptations if you run it against a public server.
Our code will need to authenticate itself against the Galaxy server in order to perform the necessary operations. Because security is an important issue, this recipe will not be totally naive with regard to it. Our script will be configured...