Question: hard copies instead of symlinks from InitialWorkDirRequirement ? - SOLVED
0
gravatar for jeltje.van.baren
23 months ago by
California
jeltje.van.baren80 wrote:

NOTE: The below was due to using an older version of cwl-runner.

I am trying to debug https://github.com/Sage-Bionetworks/SMC-RNA-Examples/blob/master/workflow/smcFusionQuant-INTEGRATE-workflow.cwl One of the issues is that I can't figure out how to get the input and output of a tool in the same location so that I can pass them to the next step in the workflow.

Details: As part of this workflow, I am trying to run samtools index on bam files created earlier in the pipeline.

requirements:
  - class: InlineJavascriptRequirement
  - class: InitialWorkDirRequirement
    listing:
      - $(inputs.bam)

What this creates though is a symlink to the local docker container:

lrwxrwxrwx  1 ubuntu ubuntu   65 Dec  6 09:55 unmapped.bam -> /var/lib/cwl/stg80eb5f7c-d51f-4ca0-898d-175a1c487761/unmapped.bam
-rw-r--r--  1 ubuntu root    216 Dec  6 09:55 unmapped.bam.bai

The next program in the workflow looks for a bam file and assumes a bam.bai file. And of course the link is now broken, so the workflow crashes with

  Missing input file [Errno 2] No such file or directory: '/mnt/integrate/tempdir7Np3TT/unmapped.bam

How do I create a workflow so that the bam and the bam.bai file end up in the same spot?

cwl • 715 views
ADD COMMENTlink modified 23 months ago • written 23 months ago by jeltje.van.baren80

How did you solve this problem?

ADD REPLYlink written 20 months ago by maitai0

I was using an older version of cwl. Once I upgraded, the problem went away.

One thing I couldn't figure out for a while is how to call initialWorkDir properly. Here's the relevant piece of cwl:

requirements:
  - class: InlineJavascriptRequirement
  - class: InitialWorkDirRequirement
    listing:
      - $(inputs.src)

inputs:
  src:
    type: File
    inputBinding:
      position: 1
      valueFrom: $(self.basename)

Note the $(self.basename) For some reason this is necessary to make the requirements section understand which file to stage.

ADD REPLYlink written 20 months ago by jeltje.van.baren80
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: 1371 users visited in the last hour