galaxy icon indicating copy to clipboard operation
galaxy copied to clipboard

Add when_empty attribute to tool outputs that can 'hide' or 'delete' …

Open blankenberg opened this issue 5 years ago • 4 comments

…the item if it is empty at job completion.

blankenberg avatar Mar 27 '19 22:03 blankenberg

I think this will be difficult to predict in the scheduling of workflows and queueing up of tool runs. Say you have 2 matched collections with elements A B C, and you run them against each other, if one of the inputs got deleted we may either stop evaluating the workflow here or switch from matched to multiplied mode in the tool form, both of which is probably going to be a surprising event to the user.

This is not so much a concern if just hiding instead of deleting the output, but it still feels like something a user should have full control over.

mvdbeek avatar Mar 28 '19 13:03 mvdbeek

I'd recommend breaking this up into a series of PRs of increasing controversy so we can weigh in on the issues individually. Whether an output dataset is hidden or visible is completely controllable from the tool provided metadata (galaxy.json) - so I'd have no issue adding the hide functionality here for datasets as a simplification of what is already possible.

Likewise hiding collections would be fine by me also - I'd change the tag though to signify it is a suggestion and wouldn't be applied if a collection is being mapped over. when_dataset_empty='hide' and when_collection_empty="suggest_hide".

jmchilton avatar Mar 29 '19 13:03 jmchilton

Presumably, you might want to also apply this flag to the contents (datasets) within the collection, but that would happen to the dataset OutputObjects, not the collection OutputObject.

There are times where there is a single output tag for a collection - no discover datasets or explicit outputs nested in the XML file (https://github.com/galaxyproject/galaxy/blob/dev/test/functional/tools/collection_creates_list.xml#L12). If I added this tag there - it would seem to be ambiguous if it applied to the collection or the datasets. So I agree with Marius suggestion to use different attribute names I think. Seems more clear regardless.

jmchilton avatar Mar 29 '19 13:03 jmchilton

Delay because of existing comments.

jmchilton avatar Apr 09 '19 14:04 jmchilton