Glob
A glob is an expression used to specify a set of filenames that match a pattern. Globs use wildcard characters to define a pattern. For example: *.bam is a glob pattern that uses the * wildcard to match all files with the .bam extension.
Syntax
The table below presents the most common wildcards and the way they are used:
Wildcard | Description | How it works |
---|---|---|
* | Matches any number of any characters, including none. | *ten matches listen, ten *let* matches let, droplet, lethal. |
? | Matches any single character. | * ?ing matches king, ring, sing, etc. Does not match ing. |
[...] | Matches one character from the explicit list or range of characters provided in the bracket. | [bcy]ell matches bell, cell or yell. Does not match ell. sample[1-4] matches sample1, sample2, sample3 or sample4. |
Using glob patterns on BioData Catalyst powered by Seven Bridges
BioData Catalyst powered by Seven Bridges supports all of the above wildcards. Glob patterns are most commonly used in the tool editor to specify which file(s) are reported as outputs on a tool's output port:
In this case, all files that match the *SJ.out.tab pattern (files whose name ends with SJ.out.tab) will be treated as output files on this port of the tool.
A glob pattern can also be used to specify which files will be caught as log files when running a tool:
The glob pattern used here is *.log, which will result in capturing all LOG files produced by the tool as log files.