Input tabular data into a Galaxy tool - Preserving row order

HI!
I am trying to inject a series of values sequentially into a tool so that it performs different cropping operations on an image. I have a tabular file that contains the following data:

Column 1 Column 2 Column 3 Column 4
130 124 100 200
710 400 50 60
330 730 110 120

Columns 1 and 2 represent the x and y coordinates on the image, and columns 3 and 4 represent the width and height of the crop. Each row defines a rectangular region that needs to be cropped.

I need to inject these four parameters to the “Convert image format with BioFormats tool” which can generate a cropped image. The desired output is three cropped images, one for each row of the table.

At the moment, I extract each column, split the resulting list by group, and then parse the parameters (which produces a list of three datasets). This list is then injected into the Convert image format tool. However, I have two issues:

  1. The values are injected into the conversion tool in a random order. All four values from a single row should be supplied to the same job, but the “Split by group” step assigns dataset IDs arbitrarily, so the rows get mixed up.

  2. I am not sure that “Split by group” is the right approach for this workflow. If two rows contain identical coordinates, they will be grouped together resulting in unpaired datasets.

I would appreciate any advice!

Attached are a sample history and the workflow:

I think you just need to use the other “Split” tool, https://usegalaxy.eu/?tool_id=toolshed.g2.bx.psu.edu/repos/bgruening/split_file_to_collection/split_file_to_collection/0.5.2, which lets you simply split by row.

Let me know if there’s an issue with that solution.

Wolfgang

Working perfectly, thanks a lot @wm75!