Show image in output of custom tool

Hi all,

I wrote a custom tool for image segmentation on our compute cluster’s local instance of galaxy. I want the users to be able to see an image from the galaxy gui. As it is, the segmented images are saved and users need to navigate to the directory. I’m wondering if it is possible to view an image through galaxy? If so, please point me in the right direction.


Can you explain what you mean with:

As it is, the segmented images are saved and users need to navigate to the directory.

Do they download the image from the galaxy interface and they need to navigate to the downloads folder for example? Or is the tool finished and the image is written to a folder somewhere on the server and they need to navigate to that folder on the server?

Thanks for your reply. We take images of live cells with microscopes, store the images to the server, and use the galaxy interface to run analysis on the images in the server. The analyzed image is then written to another directory on the server. To see the results of the tool, they need to navigate to the folder on the server.

Yes it is possible but you probably need to change the underlying script and the galaxy wrapper itself. Guessing that you want to keep the functionality of writing the image to a designated folder on the server I can point you toward one option (there may be more). You can change the script in a way that it also writes the images to a folder in the work directory, this directory is the folder where galaxy is executing the tool. In your script it is a relative path like output/images/image.jpg. In the tool wrapper you will have to add something like:

<collection name="images" type="list" label="images">
      <discover_datasets pattern="__name_and_ext__" directory="output/images" format="jpg"/>

For more information you can check the following links:

Hope this helps to point you in the right direction.

1 Like