cwl glob all the output files in a directory
1
0
Entering edit mode
3.7 years ago
lizhichao ▴ 80

iI try to capture all the output files in the directory 【./fpfn】by glob ./fpfn/* . But It failed, the error is :Error validating output record. theoutputfield is not valid \n because item is invalid \n because Expected class 'File' but this is 'Directory' So my grammar wrong? and How can I capture all the files in a directory? Thanks !

cwl • 1.4k views
1
Entering edit mode
3.7 years ago

Hello lizhichao,

Sounds like one of the items in your directory is another directory.

You can work around that by either adjusting your glob to be more specific, or adjusting your type specification.

I'm guessing that currently you have type: File[] or similar right now. If you can't restrict the glob further then try the following:

outputs:
my_output:
type:
type: array
items: [ File, Directory ]
outputBinding:
glob:  ./fpfn/*

1
Entering edit mode

In fact，when I try to be more specific ，It worked. In addition ,I will try the writting format:items: [ File, Directory ] Thank you!