rabix / composer

Visual and code editor for Common Workflow Language
http://rabix.io/
Apache License 2.0
301 stars 72 forks source link

composer does not respect the shellQuote=false option #451

Closed kmavrommatis closed 4 years ago

kmavrommatis commented 4 years ago

Hi, when using rabix composer (v1.0.2 but same behavior with previous version) to develop a tool that takes as argument a list, although I set the shellQuote option to false when the command line is constructed it puts the arguments in single quotes

e.g. CWL tool:

class: CommandLineTool
cwlVersion: v1.0
$namespaces:
  sbg: 'https://www.sevenbridges.com/'
id: merger
baseCommand: []
inputs:
  - id: GenomeReference
    type: File
    inputBinding:
      position: 0
      prefix: '-r'
      shellQuote: false
    label: Genome reference (fasta)
    secondaryFiles:
      - .fai
  - id: VCFlist
    type: 'File[]'
    inputBinding:
      position: 40
      prefix: ''
      separate: false
      itemSeparator: ' '
      shellQuote: false
    secondaryFiles:
      - .tbi
  - id: OutputName
    type: string?
    label: Name of the output joint file
outputs:
  - id: output
    type: File
    outputBinding:
      glob: '*joint.vcf.gz'
    secondaryFiles:
      - .tbi

label: VCF merger
arguments:
  - position: 35
    prefix: ''
    shellQuote: false
    valueFrom: |-
      ${ 
          if( inputs.OutputName === null){
              return "joint.vcf.gz"
          }else{
              return    (inputs.OutputName + ".joint.vcf.gz")
          }
      }
  - position: -1
    prefix: ''
    shellQuote: false
    valueFrom: merger
requirements:
  - class: ShellCommandRequirement
  - class: ResourceRequirement
    ramMin: 16000
    coresMin: 2
  - class: DockerRequirement
    dockerPull: 'vcfutils:v1'
  - class: InlineJavascriptRequirement

and the output of rabixComposer is

[2020-05-15 04:48:41.257] [INFO] Command line built. CommandLine = CommandLine [parts=[, merger, -r, /wes-hg1k/genome.fa, --algo, GVCFtyper,   joint.vcf.gz, '/germline/00110.2.1.g.vcf.gz /00110.2.5.g.vcf.gz'], standardIn=null, standardOut=null, standardError=null]

[2020-05-15 04:48:41.296] [INFO] Running command line: merger -r /wes-hg1k/genome.fa  joint.vcf.gz '/germline/00110.2.1.g.vcf.gz /germline/00110.2.5.g.vcf.gz'  

and eventually it fails because it sees as input the concatenated string of the input files.

cwltool on the other hand parses this correctly and executes the tool.

Thanks in advance for your help and advice.

ghost commented 4 years ago

Hello @kmavrommatis sorry you are having this problem.

Rabix Executor is not maintained anymore and I request that you run your CWL with cwltool or Toil instead. An upcoming release of Rabix Desktop Composer will allow you to select your default cwl executor.

Did Composer construct the command line preview correctly, by the way? Thank you!

kmavrommatis commented 4 years ago

Hi, thanks for the response. looking forward to the capability of selecting the cwl executor.

Regarding your question:

Did Composer construct the command line preview correctly

If you are referring to the command line that is shown on the GUI (i.e. Visual Editor), it appears that the command line is correct, although selecting or deselecting the option 'shellquote' on the GUI does not change it. Thanks again for your prompt response K

ghost commented 4 years ago

Customizable cwl-runner is tracked here #420