Skip to content

fileContent error for CreateFileRequirement #102

Closed
@kellrott

Description

@kellrott

I'm trying to do a samtools index step:

class: CommandLineTool
cwlVersion: draft-3

baseCommand: [samtools, index]

requirements:
  - class: InlineJavascriptRequirement
  - class: CreateFileRequirement
    fileDef:
      - fileName: indexed.bam
      - fileContent: $(inputs.in_bam)

inputs:
  - id: in_bam
    type: File
    inputBinding:
      position: 1

outputs:
  - id: out_bam
    type: File
    outputBinding:
      glob: indexed.bam
    secondaryFiles:
      - ".bai"

But I seem to be getting:

Unexpected exception
Traceback (most recent call last):
  File "/home/ubuntu/mc3/venv/local/lib/python2.7/site-packages/cwltool/workflow.py", line 532, in job
    **kwargs):
  File "/home/ubuntu/mc3/venv/local/lib/python2.7/site-packages/cwltool/draft2tool.py", line 273, in job
    j.generatefiles[builder.do_eval(t["filename"])] = copy.deepcopy(builder.do_eval(t["fileContent"]))
KeyError: 'fileContent'
Workflow error, try again with --debug for more information:
  'fileContent'

Am I doing something wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions