shellQuote value as input parameter

I would like to specify “shellQuote” in CommandLineBinding as false or true depending on cwl input.

inputs:
  use_shellQuote:
    type: boolean

  reference_genome: 
    type: File
    secondaryFiles: [.fai]
    inputBinding:
      shellQuote: $(inputs.use_shellQuote)

I get an error message:

shellQuote` field
  is not valid because
    tried
    boolean but
      the
      value is not boolean

Unfortunately it is not possible to use expression in shellQuote field - only boolean is possible. How to solve this problem?

Hi @Monika_Krzyzanowska, could you describe what are you trying to do?

Hi Monika,

All input information is evaluated at the same time, which means that one input cannot use the information of another input.

I would like to understand more of what you are doing, but one alternative might be to use arguments which are evaluated after inputs.

i.e

inputs:
  # Should I use 'shellQuote' for reference genome input
  use_shellQuote:
    type: boolean

  # Reference genome input see 'arguments' for inputBinding logic
  reference_genome:
    type: File
    secondaryFiles: 
      - .fai

arguments:
  - position: 100 # 100 for after all other inputs (use -1 if you wish to place item before all inputs)
    valueFrom: $(inputs.reference_genome.path)
    shellQuote: $(inputs.use_shellQuote)

This isn’t right, you have to use valueFrom: $(inputs.reference_genome.path). @Monika_Krzyzanowska’s question is specifically about parameterizing shellQuote, which is not possible. But without knowing what she’s actually trying to accomplish I can’t give an alternate solution.

1 Like