PMCC-BioinformaticsCore / janis

[Alpha] Janis: an open source tool to machine generate type-safe CWL and WDL workflows
https://janis.readthedocs.io/
GNU General Public License v3.0
41 stars 13 forks source link

documentation: WildcardSelector #18

Closed matthdsm closed 4 years ago

matthdsm commented 4 years ago

Hi,

Could you describe what the function of the first_element arg in WildcardSelector is? As far as I could see, this doesn't do anything?

Cheers M

illusional commented 4 years ago

Nothing, it was erroneously added during the early WDL translation days as a way to ensure collection of only the first argument.

It was mainly because globs collect arrays of files, and often they were being used to get the only file with some pattern, WDL will throw a validation error here, CWL silently collects the first file if one exists, and it was intended to allow you to say, "I'm using a wildcard glob, but really I'm only getting a single file". I've removed it in https://github.com/PMCC-BioinformaticsCore/janis-core/commit/2a7e8e726486ee710ed1c80285dc4051094baab9.

matthdsm commented 4 years ago

Thanks!

M