PacificBiosciences / HiFi-human-WGS-WDL

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

Removing optional inputs #134

Closed priyambial123 closed 4 months ago

priyambial123 commented 4 months ago

Hello,

I use the miniwdl workflow and I get an error in running the deepVariant analysis as:

check JSON input; couldn't construct DeepVariantModel? from "WomCompositeType {\n model ->
WomCompositeType {\n data -> File\ndata_index -> File \n}\nmetadata -> File \n}? (optional)" (in
humanwgs.deepvariant_model) 

In the input.hpc.json, I gave the deepvariant version as 1.5.0. in line 65 Is there anything else to change or give the path:

  "humanwgs.deepvariant_version": "1.5.0",
  "humanwgs.deepvariant_model": "WomCompositeType {\n model -> WomCompositeType {\n data -> File\ndata_index -> File \n}\nmetadata -> File \n}? (optional)",
  "humanwgs.pbsv_call_mem_gb": "Int (optional, default = if N<=3: 64 else 96)",
  "humanwgs.glnexus_mem_gb": "Int (optional, default = 30)",
  "humanwgs.run_tertiary_analysis": "Boolean (optional, default = false)",
  "humanwgs.backend": "HPC",
  "humanwgs.preemptible": true
}

Thank you

Priya

pb-dstucki commented 4 months ago

Hi Priya, please remove the lines marked as (optional) from the json file and run it again.

williamrowell commented 4 months ago

@pb-dstucki is right. The problems here are the optional inputs. Some of the template values are the type of value, rather than the actual value (e.g. "Int", "String", "Boolean", "WomCompositeType"). These values need to be replaced or deleted, depending on whether they are optional or required. Optional inputs can be deleted, like "humanwgs.deepvariant_model", if there's no need to change them. You can remove:

If you don't need the tertiary analysis, you can remove humanwgs.run_tertiary_analysis and it default to false. If you do need tertiary analysis, change this line to:

  "humanwgs.run_tertiary_analysis": true,

If the template says Int or Boolean, then the value needs to be bare (without quotes). This is json syntax.

gevro commented 3 months ago

Hi all, The supplied GCP input json example is still giving errors:

Workflow input processing failed

(Caused by [reason 1 of 5]: Failed to evaluate input 'pbsv_call_mem_gb' (reason 1 of 1):
 For input string: "Int (optional, default = if N<=3: 64 else 96)")

(Caused by [reason 2 of 5]: Failed to evaluate input 'glnexus_mem_gb'
    (reason 1 of 1): For input string: "Int (optional, default = 30)")

(Caused by [reason 3 of 5]: Failed to evaluate input 'run_tertiary_analysis'
    (reason 1 of 1): No coercion defined from '"Boolean (optional, default = false)"' of type 'spray.json.JsString' to 'Boolean'.)

(Caused by [reason 4 of 5]: Failed to evaluate input 'preemptible'
    (reason 1 of 1): No coercion defined from '"Boolean"' of type 'spray.json.JsString' to 'Boolean'.) 

Caused by [reason 5 of 5]: Failed to evaluate input 'deepvariant_model'
    (reason 1 of 1): No coercion defined from '"WomCompositeType {\n model -> WomCompositeType {\n data -> File\ndata_index -> File \n}\nmetadata -> File \n}? (optional)"' of type 'spray.json.JsString' to 'WomCompositeType { model -> WomCompositeType { data -> File data_index -> File } metadata -> File }?'.)

Can you all provide an input json that works right out of the box? Or at least some documentation on how to get it working?

williamrowell commented 3 months ago

As in the comment above, delete the optional inputs and set preemptible to truef;

this:

{
  ...
  "humanwgs.deepvariant_version": "1.5.0",
  "humanwgs.deepvariant_model": "WomCompositeType {\n model -> WomCompositeType {\n data -> File\ndata_index -> File \n}\nmetadata -> File \n}? (optional)",
  "humanwgs.pbsv_call_mem_gb": "Int (optional, default = if N<=3: 64 else 96)",
  "humanwgs.glnexus_mem_gb": "Int (optional, default = 30)",
  "humanwgs.run_tertiary_analysis": "Boolean (optional, default = false)",
  "humanwgs.backend": "HPC",
  "humanwgs.preemptible": "Boolean"
}

becomes this:

{
  ...
  "humanwgs.backend": "HPC",
  "humanwgs.preemptible": true
}
gevro commented 3 months ago

Are you sure backend should be HPC and not GCP if we are on Terra?

williamrowell commented 3 months ago

Sorry, yes, should be GCP for Terra. I was copy/pasting from the comment above.