Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New functionality in the Graphical workflow editor: For-loops #16405

Open
DariaKoppes opened this issue Jul 14, 2023 · 2 comments
Open

New functionality in the Graphical workflow editor: For-loops #16405

DariaKoppes opened this issue Jul 14, 2023 · 2 comments

Comments

@DariaKoppes
Copy link

As an idea to improve the possible analysis that can be performed in a Galaxy workflow, I suggest to add more kinds of relationships between tools apart from the current sequential one. It is now not possible to perform for-loops directly in a workflow.

As example: SelectKbest as feature selection method is available but if the user wants to try out multiple different K's, the only possibility is to run the workflow a couple of times changing the K parameter manually. If a for-loop over a list of possible K's is possible in a Galaxy workflow, one could try out several K's and see which K gives the best accuracy result later on in the analysis.

I think this would be a big feature to implement, so maybe as an alternative a separate tool can be made for SelectKbest where the user can specify as input parameter a list with possible K's to try out and output a datacollection with the feature selected datasets for each different K.

@simonbray
Copy link
Member

I think this would be a big feature to implement, so maybe as an alternative a separate tool can be made for SelectKbest where the user can specify as input parameter a list with possible K's to try out and output a datacollection with the feature selected datasets for each different K.

Hey @DariaKoppes, this should be possible already in the workflow editor. Try the 'Split file to dataset collection' tool followed by the 'Parse parameter value from dataset' tool and pass the output to the K parameter of the SelectKbest tool. That should allow you to provide a list of parameters as a file (one per line) and create a collection of job runs where each value is tried.

As for the for loop idea, I think that's covered by #4798, but I don't think it'll be implemented any time soon.

@mvdbeek
Copy link
Member

mvdbeek commented Jul 24, 2023

That is indeed they way to go @simonbray, we could however make that a little easier by allowing to set multiple values for simple text parameters, we've called that parameter sweeps in the past. That would internally still follow the idea you've outlined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants