PacificBiosciences / HiFi-human-WGS-WDL

BSD 3-Clause Clear License
52 stars 30 forks source link

Configuration when parents unknown #163

Closed gevro closed 1 week ago

gevro commented 1 week ago

Hi, How do I configure the input json when there are no parents? Do I set the value to unquoted 'null' ?

https://github.com/PacificBiosciences/HiFi-human-WGS-WDL/blob/main/backends/gcp/family.gcp.inputs.json

{ "humanwgs_family.family": { "family_id": "String", "samples": [ { "sample_id": "String", "hifi_reads": [ "File" ], "affected": "Boolean", "sex": "String? (optional, ['MALE', 'FEMALE', null])", "father_id": "String? (optional)", "mother_id": "String? (optional)" } ] }

williamrowell commented 1 week ago

You can use the unquoted null, or you can delete the key/value completely, as in:

{
  "humanwgs_family.family": {
  "family_id": "HG002",
  "samples": [
    {
      "sample_id": "HG002",
      "hifi_reads": [
        "gs://path/to/my.bam"
      ],
      "affected": true,
      "sex": "MALE"
    }
  ]
}

Some backends handle null in unexpected ways, so I would suggest deleting the key/value pairs for unused optional entirely rather than setting null.

gevro commented 1 week ago

Do you know if terra handles unquoted null correctly?

williamrowell commented 1 week ago

I think it should be ok to use null, but I haven't tested this directly.

gevro commented 1 week ago

I can test it. But what should I look for when I test it to know if it worked?