m2ms / fragalysis-frontend

The React, Redux frontend built by webpack
Other
1 stars 1 forks source link

Job Launcher - Job configuration #824

Open duncanpeacock opened 2 years ago

duncanpeacock commented 2 years ago

For high level design, see:

  1. Job configuration: Which jobs are going to be run initially Definition of yaml for Fragalysis frontend window to be able to run those jobs. This will be stored in the job configuration table. Confirmation of where this is stored and how the change management will work (a yaml file?) Support Fragalysis frontend in creation of job submitter window to be able to enter parameters.
boriskovar-m2ms commented 2 years ago
{
  "application": {
    "application_id": "datamanagerjobs.squonk.it",
    "kind": "DataManagerJob"
  },
  "category": "comp chem",
  "collection": "fragmenstein",
  "command": "/code/merger.py --fragments{% for fragment in fragments %} '{{ fragment }}'{% endfor %} --protein '{{ protein }}' --outfile '{{ outfile }}' --count {{ count }} {% if removeHydrogens %}--remove-hydrogens{% endif %} --work-dir {{ DM_INSTANCE_DIRECTORY }}/output",
  "command_encoding": "JINJA2_3_0",
  "description": "Given 2 or more fragment molecules generate a merged molecule that combines aspects of those fragments. The merged molecules are minimised within the context of the protein.",
  "doc_url": "https://discourse.squonk.it/t/job-fragmenstein/110",
  "id": 92,
  "image_name": "registry.gitlab.com/informaticsmatters/squonk-fragmenstein",
  "image_project_directory": "/data",
  "image_tag": "stable",
  "image_type": "SIMPLE",
  "image_working_directory": "/data",
  "job": "fragmenstein-combine",
  "keywords": [
    "fragmenstein",
    "fbdd"
  ],
  "name": "Combine fragments into a single merged molecule",
  "variables": {
    "inputs": "{\"type\": \"object\", \"required\": [\"fragments\", \"protein\"], \"properties\": {\"fragments\": {\"title\": \"Fragment molecules\", \"multiple\": true, \"mime-types\": [\"chemical/x-mdl-molfile\"], \"type\": \"file\"}, \"protein\": {\"title\": \"PDB file for protein\", \"mime-types\": [\"chemical/x-pdb\"], \"type\": \"file\"}}}",
    "options": "{\"type\": \"object\", \"required\": [\"outfile\", \"count\", \"removeHydrogens\"], \"properties\": {\"outfile\": {\"title\": \"Output file name\", \"type\": \"string\", \"default\": \"merged.sdf\", \"pattern\": \"^[A-Za-z0-9_/\\\\.\\\\-]+\\\\.sdf$\"}, \"count\": {\"title\": \"Number of molecules to generate\", \"type\": \"integer\", \"default\": 1, \"minimum\": 1}, \"removeHydrogens\": {\"title\": \"Remove hydrogens from the outputs\", \"type\": \"boolean\", \"default\": false}}}",
    "order": {
      "options": [
        "outfile",
        "count",
        "removeHydrogens"
      ]
    },
    "outputs": "{\"type\": \"object\", \"properties\": {\"outputs\": {\"title\": \"Merged molecules\", \"mime-types\": [\"chemical/x-mdl-sdfile\"], \"creates\": \"{{ outfile }}\", \"type\": \"file\"}}}"
  },
  "version": "1.0.0",
  "fragalysis-jobs": {
     "inputs": {
       "fragments": {"from": "lhs-fragments", "format": "chemical/x-mdl-molfile"}, 
       "protein": {"from": "lhs-protein-apo-desolv", "format": "chemical/x-pdb"}
            },
      "options": {
        "outfile": {"value": "fragalysis-jobs/{username}/{job_dir}/merged.sdf", "editable": false},
        "count": {"value": 5}
    }
  }
}
boriskovar-m2ms commented 2 years ago
squonk-endpoints:
  # Host could be a deployment parameter so that this definition can be location independent
  sdm-host: https://squonk.xchem.diamond.ac.uk/data-manager-api/api/ 
  # These paths are effectively constants so could be hardcoded
  # Path to the URL that GETs the full list of job definitions
  sdm-jobs-path: job
  # The job is launched with a POST request to the instance endpoint
  # Executing the job returns a job instance ID
  sdm-launch-path: instance
  # Details of the job can be obtained from this path
  sdm-instance-path: instance/{instance_id}
# These definitions define which files to copy to Squonk
# The keys are those used in the jobs.<job-name>.inputs.<input-name>.from elements
squonk-file-paths:
  lhs-fragments:
    molecule: {pdb_code}.mol
    template: /fragalysis-files/{target_name}/{pdb_code}.mol
  lhs-protein-apo-desolv:
    molecule: {pdb_code}-apo_desolv.pdb
    template: /fragalysis-files/{target_name}/{pdb_code}-apo_desolv.pdb