Question: CWL: Gathering outputs in folders.
gravatar for lon.lightly
2.8 years ago by
lon.lightly0 wrote:

Hi, this is a cwl syntax question. I have a simple python script that creates two files:

with open("A.txt", "w") as f:  

with open("x/x/B.txt", "w") as f:  

And I want to run this with cwl.

The first file creation runs and works fine, because it deposits the file in the working directory. The second does not work because the folders "x/x" seem to not be recreated in the temporary folder that cwl uses. I've tried to specify these folders as inputs (which I think is correct?) with the following attempt:

cwlVersion: v1.0
class: CommandLineTool
baseCommand: python

  - id: xdir
    type: Directory

  - id: src
    type: File
      position: 1

  - id: A
    type: File
      glob: "A.txt"

Here is the .yml:

  class: File

  class: Directory
  path: x/x

How should I write these so that this will run? Thanks!

cwl • 1.4k views
ADD COMMENTlink modified 2.8 years ago by Michael R. Crusoe1.8k • written 2.8 years ago by lon.lightly0
gravatar for Michael R. Crusoe
2.8 years ago by
Common Workflow Language project
Michael R. Crusoe1.8k wrote:

Hello lon.lightly,

The best thing would be to modify the script so that the user can specify the location (if not the filename) of "B.txt".

One workaround involves the InitialWorkDirRequirement but in testing it using nested directories I found a bug in the reference CWL runner:

ADD COMMENTlink written 2.8 years ago by Michael R. Crusoe1.8k
Please log in to add an answer.


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