How to pass exclusive parameters on the command line (cwl-runner)
1
0
Entering edit mode
7.7 years ago
awilke1972 ▴ 20

I am trying to run a tool definition on the command line without a job document. It is unclear to me how to pass exclusive parameters,

cwl-runner Tools/ls.tool.yaml --mydir Data/Inputs/ --myfile Tools/ls.tool.yaml --bySize

/usr/local/bin/cwl-runner 1.0.20170329142446
Resolved 'Tools/ls.tool.yaml' to 'file:///pipeline/CWL/Tools/ls.tool.yaml'
usage: Tools/ls.tool.yaml [-h] --mydir MYDIR --myfile MYFILE [job_order]
Tools/ls.tool.yaml: error: unrecognized arguments: --bySize

Tool definition:

cwlVersion: v1.0
class: CommandLineTool
baseCommand: [ls , .]


requirements:
  - class: InlineJavascriptRequirement
  - class: InitialWorkDirRequirement
    listing: |
      ${
        var listing = inputs.mydir.listing;
        listing.push(inputs.myfile);
        return listing;
       }

stdout: ls.log
stderr: error.log

inputs:
  mydir:
    type: Directory
  myfile:
    type: File
  exclusive_parameters:
    type:
      - type: record
        name: listingByTime
        fields:
          long_listing:
            type: boolean
            inputBinding:
              prefix: -ltr
      - type: record
        name: size
        fields:
          bySize:
            type: boolean
            inputBinding:
              prefix: -S  


outputs:
  output:
    type: stdout
  error: 
    type: stderr
cwl • 2.7k views
ADD COMMENT
0
Entering edit mode
7.7 years ago

Thank you awilke1972 for your question.

The ability of the CWL reference implementation (cwltool / cwlref-runner) to accept inputs on the command line is currently experimental.

While is very useful, it does not currently support mutually exclusive input parameter specification -- you'll need to use a stand alone input document in these instances

I've created an issue on Github to remind us to fix this later https://github.com/common-workflow-language/cwltool/issues/358

ADD COMMENT

Login before adding your answer.

Traffic: 1521 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6