-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
add info on how outputBinding and glob works #353
base: main
Are you sure you want to change the base?
add info on how outputBinding and glob works #353
Conversation
This looks like it just re-wrote and expanded a little bit about what already is in the user guide in the output section. I believe the request was to go a little bit deeper into how it works and why you use it. You can read the exchange linked from the ticket BUT-- in general it was to give information https://www.commonwl.org/v1.2/CommandLineTool.html#Output_binding here - and perhaps link to this accordingly. I would keep what you have and go into more detail below about what glob does, which glob is used (and so you have restrictions based on that) and why you would use it. For motivation -- https://towardsdatascience.com/the-python-glob-module-47d82f4cbd2d |
It also might nice be nice to look through biostars and other resources include a few more examples of using glob that are more complicated such as: Note glob can be used to return directories not just files/file arrays. |
@Fienne I think this looks good now but I think you need remove the entries from the FAQ renaming and just keep the glob related changes. |
9b1ee9a
to
f29e52a
Compare
f29e52a
to
003bb64
Compare
@swzCuroverse can you please check this out |
There is a nice conversation happening now in the matrix chat about the difference between . * and $(runtime.outdir) |
Thank you, I noticed. I'm going through the chat |
It looks like you just adding one of these but I think it would be good to show not just * as a glob example. Please include a few more from some of the examples I showed you -- for example something like *.gvcf, defining a directory the output is in, and something that uses the input name to find the output file. You can look at the following places for examples: |
## How does glob work when describing output values? | ||
The field outputBinding describes how to set the value of each output parameter. The 'glob' field specifies a pattern to find files/directories relative to the output directory. The pattern used for glob' must be either relative to the output directory, an absolute path to the output directory, or an absolute path to an input file. | ||
|
||
CWL uses the POSIX glob(3) pathname matching. Wildcards are allowed in the glob field and are useful when If you don’t know the exact name of a file or directory in advance. The wildcard characters can either be an asterisk `*`, a question mark matching pathnames in directories. `?` or a range `[]`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The wildcard characters can either be an asterisk *
, a question mark matching pathnames in directories, ?
, or a range []
.
i think this needs to be a comma
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
? does look like it works for a single character. Not sure about range, let me check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok -- so glob[3] is for C library functions. glob[7] is for general Linux programming reference -- so we can use the rules for glob[7] https://man7.org/linux/man-pages/man7/glob.7.html
src/faq.md
Outdated
untarfile: | ||
type: File[] | ||
outputBinding: | ||
glob: "?a" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe this is correct -- I think ? is a single wild card where * is 1 or more wildcards?
But you should double check
…' into how-does-outputbinding.glob-work
resolves #282