Hi everyone,
The Galaxy API is a great way to interact with a Galaxy server and I've been using it to run workflows (supported by the blend4j library, since I'm working on a Java project). Recently, I ran into a challenge with the workflow step IDs.
When retrieving the metadata of a Galaxy workflow (using the API and blend4j), the order of the workflow step IDs appears to be random (or at least, not what I expected). This makes it complicated to specify parameters when you run a workflow via the API, because the step ID and parameter name normally are a nice way to pick the parameter you want to set (blend4j method: WorkflowInputs.setStepParameter). Is is possible to determine which step ID is assigned to - for example - the second workflow step?
From a few tests and looking at the Galaxy source code, it looks to me
like the workflow steps are sorted according to their position in the workflow editor (in ascending order of sqrt(sqr(position.x) + sqr(position.y))). When storing the workflow in the database, the ID field for each step is assigned a unique unpredictable number (by SQLAlchemy or the database?). But in addition to the ID, there is also a nice order_index field, which contains the indices in the expected order! Would it be possible to add the order_index field to the API and would that solve the step order issue?
Cheers, Freek ------ Freek de Bruijn Scientific programmer | VU University medical center