Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Optional Outputs #20
Comments
|
Seems legit to me |
|
I think you can get almost the same thing already using globs - I believe optional_output = glob("file2") will give you either a 0 or 1 element array of files depending on the existence or otherwise of the file. |
tmdefreitas
commented
Jan 6, 2016
|
Thanks for pointing out that workaround, that would at least allow this:
It would still be nice at some point to not worry about 0/1-element arrays, since that syntax doesn't make it clear that the array will only be size 0 or 1. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tmdefreitas commentedJan 5, 2016
Broad's GDAC often deals with sparsely and inconsistently populated data, and many analyses support a range of acceptable inputs. For example, our methylation preprocessor will correlate methylation data to expression data if it is available for a sample set. However, this means that in addition to optional inputs (already supported by WDL), output files are also optional, or at least conditional upon inputs. Currently cromwell raises an error when an expected output is not present, and I don't believe there is syntax to support it in WDL.
It would be nice to be able to specify that an output is optional. One solution could be to mirror to the optional input syntax, and I could specify optional outputs like this:
Having this would eliminate the need to write additional logic to create/handle blank files.