Question: How to pass exclusive parameters on the command line (cwl-runner)
0
gravatar for awilke1972
2.2 years ago by
awilke197220
awilke197220 wrote:

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 • 1.0k views
ADD COMMENTlink modified 2.2 years ago by Michael R. Crusoe1.5k • written 2.2 years ago by awilke197220
0
gravatar for Michael R. Crusoe
2.2 years ago by
Common Workflow Language project
Michael R. Crusoe1.5k wrote:

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 COMMENTlink written 2.2 years ago by Michael R. Crusoe1.5k
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: 926 users visited in the last hour