Question: cwl glob all the output files in a directory
0
gravatar for lizhichao
11 months ago by
lizhichao80
lizhichao80 wrote:

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 • 400 views
ADD COMMENTlink modified 11 months ago by Michael R. Crusoe1.8k • written 11 months ago by lizhichao80
1
gravatar for Michael R. Crusoe
11 months ago by
Common Workflow Language project
Michael R. Crusoe1.8k wrote:

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/*
ADD COMMENTlink written 11 months ago by Michael R. Crusoe1.8k
1

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

ADD REPLYlink written 11 months ago by lizhichao80
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1708 users visited in the last hour