Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The 'required' field in CWL is not kept when convert app #61

Open
tdelhomme opened this issue Sep 19, 2017 · 2 comments
Open

The 'required' field in CWL is not kept when convert app #61

tdelhomme opened this issue Sep 19, 2017 · 2 comments
Labels

Comments

@tdelhomme
Copy link

tdelhomme commented Sep 19, 2017

Hi all,

When I want to convert a CWL JSON file into an app, my 'required' field is not taken into account:

The following is one of my input definition:

    {
      "sbg:category": "Basic",
      "type": "string",
      "description": "Name of the variant calling output file.",
      "label": "output VCF file name",
      "id": "#output_vcf_name",
      "required" : false,
      "inputBinding": {
        "separate": false,
        "sbg:cmdInclude": true,
        "position": 0,
        "prefix" : "--output=",
        "valueFrom" : {
          "class": "Expression",
          "script": " $job.inputs.bamfile.name + '_platypus.vcf' ",
          "engine": "#cwl-js-engine"
        }
      }
    }

and I get:

> platypus = convert_app(f)
> platypus$get_required()
        bamfile             ref output_vcf_name 
         "File"          "File"        "string" 
@nanxstats
Copy link
Contributor

@tengfei and I are considering the possibility of a hotfix for this.

@tengfei
Copy link
Contributor

tengfei commented Sep 29, 2017

@tdelhomme I think required field is only defined in Tool object in R, not a CWL field. the way CWL define required is using type, for example, please change
"type": ["null", "string"]

this means its required

Sorry for the confusion, I need to fix this issue, so will leave it open.

@nanxstats nanxstats added the cwl label Oct 18, 2018
@nanxstats nanxstats changed the title 'required' field in CWL is not kept when convert app The 'required' field in CWL is not kept when convert app Oct 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants