WorkflowConversion / CTDConverter

Series of python scripts to convert CTD files into other formats such as Galaxy, CWL
MIT License
5 stars 8 forks source link

Flags get not properly translated into cwl #43

Open mwalzer opened 5 years ago

mwalzer commented 5 years ago

flags (parameters without argument) are placed in the cwl associated with (default)values (of their boolean default values in the tool).

_Originally posted by @mwalzer in https://github.com/WorkflowConversion/CTDConverter/issue_comments#issuecomment-444969252_

mwalzer commented 5 years ago

The cwl looks like this:

- default: 'false'
  doc: Show meta information about the whole experiment
  id: param_m
  inputBinding:
    prefix: -m
  label: Show meta information about the whole experiment
  type:
  - 'null'
  - string

changing to

- doc: Show meta information about the whole experiment
  id: param_m
  inputBinding:
    prefix: -m
  label: Show meta information about the whole experiment
  type:
  - 'null'

fixes that, but I am unsure if this is the right cwl way to do it.

mwalzer commented 5 years ago

The challenge is to discern the flags from the true boolean type parameter (parameter argument expected string representation of bool) In OpenMS we, unfortunately, have both. The former would be in ctd: <ITEM name="m" value="false" type="string" description="Show meta information about the whole experiment" required="false" advanced="false" restrictions="true,false" /> and the latter: <ITEM name="PSM" value="true" type="string" description="Perform FDR calculation on PSM level" required="false" advanced="false" restrictions="true,false" />

:face_with_head_bandage:

mwalzer commented 5 years ago

Aha, after some reading up on cwl and experimenting, it seems a true flag is to be represented in cwl with type: boolean (and given as instance in the yml as param_m: true) whereas a 'string boolean' is to be represented with

type:
  - 'null'
  - string

Now I only have to find a way to keep them apart in the ctd ...

mwalzer commented 5 years ago

Let's see what turns out from here