Variable output file types

If I am writing a tool wrapper that can output .vcf or .maf or .tsv and .txt and all of them can be a primary output, how would I glob properly to get these files?

You can have a list of globs:

outputBinding:
  glob: ["*.vcf", "*.maf", "*.tsv", "*.txt"]

But if there’s more than one matching file your output will be an array (unless you add an expression in outputEval to choose the right one).

1 Like

Another option is having 4 outputs with individual globs, and marking them all optional.

2 Likes