i-VRESSE / workflow-builder

Graphical interface to build a workflow file
https://i-vresse-workflow-builder.netlify.app/
Apache License 2.0
4 stars 2 forks source link

Allow required property with default value to be absent #159

Closed sverhoeven closed 5 months ago

sverhoeven commented 5 months ago

Refs #154

Can be tested with

  1. Add default: output to packages/haddock3_catalog/public/catalog/haddock3.easy.yaml:global.schema.properties.run_dir
  2. yarn dev
  3. open haddock3-download application on http://localhost:3000
  4. Upload a workflow.cfg without run_dir key.
  5. It should be loaded and valid.
netlify[bot] commented 5 months ago

Deploy Preview for i-vresse-workflow-builder ready!

Name Link
Latest commit 436f7cb5974a39227fca1660ad2fb10539e8e9c7
Latest deploy log https://app.netlify.com/sites/i-vresse-workflow-builder/deploys/6654626937ed7400080c289c
Deploy Preview https://deploy-preview-159--i-vresse-workflow-builder.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

sverhoeven commented 5 months ago

I tried to use defaults but then every parameter with a default value is filled in the workflow.cfg file.

For example with the testing instructions and no-rundir.zip, I got


mode = 'local'
molecules = [
  'processed-A2A-2oob.pdb',
  'processed-B2B-2oob.pdb',
]

postprocess = true
clean = true
offline = false
ncores = 6
run_dir = 'output'
preprocess = false
batch_type = 'slurm'
queue_limit = 100
concat = 1

[topoaa]

delenph = true

[rigidbody]

ambig_fname = 'ambig.tbl'
sampling = 1000
randorien = true
elecflag = true

[caprieval]

irmsd = true
fnat = true
lrmsd = true
ilrmsd = true
dockq = true
irmsd_cutoff = 10
fnat_cutoff = 5
receptor_chain = 'A'
ligand_chains = [
  'B',
]

sortby = 'score'
sort_ascending = true
alignment_method = 'sequence'
clt_threshold = 4
allatoms = false

[seletop]

select = 200

['caprieval.2']

irmsd = true
fnat = true
lrmsd = true
ilrmsd = true
dockq = true
irmsd_cutoff = 10
fnat_cutoff = 5
receptor_chain = 'A'
ligand_chains = [
  'B',
]

sortby = 'score'
sort_ascending = true
alignment_method = 'sequence'
clt_threshold = 4
allatoms = false

[flexref]

ambig_fname = 'ambig.tbl'
dihedrals_on = false
ssdihed = 'none'
error_dih = 10
dnarest_on = false
elecflag = true
sinter_rigid_final = 0.001

['caprieval.3']

irmsd = true
fnat = true
lrmsd = true
ilrmsd = true
dockq = true
irmsd_cutoff = 10
fnat_cutoff = 5
receptor_chain = 'A'
ligand_chains = [
  'B',
]

sortby = 'score'
sort_ascending = true
alignment_method = 'sequence'
clt_threshold = 4
allatoms = false

[emref]

ambig_fname = 'ambig.tbl'
dihedrals_on = false
dihedrals_scale = 200
ssdihed = 'none'
error_dih = 10
dnarest_on = false
elecflag = true

['caprieval.4']

irmsd = true
fnat = true
lrmsd = true
ilrmsd = true
dockq = true
irmsd_cutoff = 10
fnat_cutoff = 5
receptor_chain = 'A'
ligand_chains = [
  'B',
]

sortby = 'score'
sort_ascending = true
alignment_method = 'sequence'
clt_threshold = 4
allatoms = false

[clustfcc]

plot_matrix = true
contact_distance_cutoff = 5
clust_cutoff = 0.6
min_population = 4
strictness = 0.75

[seletopclusts]

top_models = 4
top_cluster = 1000
sortby = 'score'

['caprieval.5']

irmsd = true
fnat = true
lrmsd = true
ilrmsd = true
dockq = true
irmsd_cutoff = 10
fnat_cutoff = 5
receptor_chain = 'A'
ligand_chains = [
  'B',
]

sortby = 'score'
sort_ascending = true
alignment_method = 'sequence'
clt_threshold = 4
allatoms = false

[contactmap]

ca_ca_dist_threshold = 9
shortest_dist_threshold = 4.5
color_ramp = 'Greys'
single_model_analysis = false
generate_heatmap = true
generate_chordchart = true
cluster_heatmap_datatype = 'shortest-cont-probability'
chordchart_datatype = 'shortest-dist'

This is not nice, as the user did not set most of those.

Setting the default value in the web app is not the way to go. The builder page in the app should be given a schema without run dir property, but validation on server side (that happens after the run_dir is set to output) could still validate with the prop.