From 3a76af4321f849e15d0e9278b9a3670f04e18cd9 Mon Sep 17 00:00:00 2001 From: "Tristan F.-R." Date: Mon, 28 Jul 2025 11:52:36 -0700 Subject: [PATCH 1/5] feat: json schema --- config/config.yaml | 2 + config/schema.json | 413 ++++++++++++++++++++++++++++++++++++++++++ util/update_schema.py | 13 ++ 3 files changed, 428 insertions(+) create mode 100644 config/schema.json create mode 100644 util/update_schema.py diff --git a/config/config.yaml b/config/config.yaml index 1e5f1d561..9a227f432 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -1,3 +1,5 @@ +# yaml-language-server: $schema=./schema.json + # Global workflow control # The length of the hash used to identify a parameter combination diff --git a/config/schema.json b/config/schema.json new file mode 100644 index 000000000..9ae5dfe23 --- /dev/null +++ b/config/schema.json @@ -0,0 +1,413 @@ +{ + "$defs": { + "Algorithm": { + "additionalProperties": false, + "properties": { + "name": { + "title": "Name", + "type": "string" + }, + "params": { + "$ref": "#/$defs/AlgorithmParams" + } + }, + "required": [ + "name", + "params" + ], + "title": "Algorithm", + "type": "object" + }, + "AlgorithmParams": { + "additionalProperties": true, + "properties": { + "include": { + "title": "Include", + "type": "boolean" + }, + "directed": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Directed" + } + }, + "required": [ + "include" + ], + "title": "AlgorithmParams", + "type": "object" + }, + "Analysis": { + "additionalProperties": false, + "properties": { + "summary": { + "$ref": "#/$defs/SummaryAnalysis", + "default": { + "include": false + } + }, + "cytoscape": { + "$ref": "#/$defs/CytoscapeAnalysis", + "default": { + "include": false + } + }, + "ml": { + "$ref": "#/$defs/MlAnalysis", + "default": { + "include": false, + "aggregate_per_algorithm": false, + "components": 2, + "labels": true, + "kde": false, + "remove_empty_pathways": false, + "linkage": "ward", + "metric": "euclidean" + } + }, + "evaluation": { + "$ref": "#/$defs/EvaluationAnalysis", + "default": { + "include": false, + "aggregate_per_algorithm": false + } + } + }, + "title": "Analysis", + "type": "object" + }, + "ContainerFramework": { + "enum": [ + "docker", + "singularity", + "dsub" + ], + "title": "ContainerFramework", + "type": "string" + }, + "ContainerRegistry": { + "additionalProperties": false, + "properties": { + "base_url": { + "title": "Base Url", + "type": "string" + }, + "owner": { + "description": "The owner or project of the registry", + "title": "Owner", + "type": "string" + } + }, + "required": [ + "base_url", + "owner" + ], + "title": "ContainerRegistry", + "type": "object" + }, + "CytoscapeAnalysis": { + "additionalProperties": false, + "properties": { + "include": { + "title": "Include", + "type": "boolean" + } + }, + "required": [ + "include" + ], + "title": "CytoscapeAnalysis", + "type": "object" + }, + "Dataset": { + "additionalProperties": false, + "properties": { + "label": { + "title": "Label", + "type": "string" + }, + "node_files": { + "items": { + "type": "string" + }, + "title": "Node Files", + "type": "array" + }, + "edge_files": { + "items": { + "type": "string" + }, + "title": "Edge Files", + "type": "array" + }, + "other_files": { + "items": { + "type": "string" + }, + "title": "Other Files", + "type": "array" + }, + "data_dir": { + "title": "Data Dir", + "type": "string" + } + }, + "required": [ + "label", + "node_files", + "edge_files", + "other_files", + "data_dir" + ], + "title": "Dataset", + "type": "object" + }, + "EvaluationAnalysis": { + "additionalProperties": false, + "properties": { + "include": { + "title": "Include", + "type": "boolean" + }, + "aggregate_per_algorithm": { + "default": false, + "title": "Aggregate Per Algorithm", + "type": "boolean" + } + }, + "required": [ + "include" + ], + "title": "EvaluationAnalysis", + "type": "object" + }, + "GoldStandard": { + "additionalProperties": false, + "properties": { + "label": { + "title": "Label", + "type": "string" + }, + "node_files": { + "items": { + "type": "string" + }, + "title": "Node Files", + "type": "array" + }, + "data_dir": { + "title": "Data Dir", + "type": "string" + }, + "dataset_labels": { + "items": { + "type": "string" + }, + "title": "Dataset Labels", + "type": "array" + } + }, + "required": [ + "label", + "node_files", + "data_dir", + "dataset_labels" + ], + "title": "GoldStandard", + "type": "object" + }, + "Locations": { + "additionalProperties": false, + "properties": { + "reconstruction_dir": { + "title": "Reconstruction Dir", + "type": "string" + } + }, + "required": [ + "reconstruction_dir" + ], + "title": "Locations", + "type": "object" + }, + "MlAnalysis": { + "additionalProperties": false, + "properties": { + "include": { + "title": "Include", + "type": "boolean" + }, + "aggregate_per_algorithm": { + "default": false, + "title": "Aggregate Per Algorithm", + "type": "boolean" + }, + "components": { + "default": 2, + "title": "Components", + "type": "integer" + }, + "labels": { + "default": true, + "title": "Labels", + "type": "boolean" + }, + "kde": { + "default": false, + "title": "Kde", + "type": "boolean" + }, + "remove_empty_pathways": { + "default": false, + "title": "Remove Empty Pathways", + "type": "boolean" + }, + "linkage": { + "$ref": "#/$defs/MlLinkage", + "default": "ward" + }, + "metric": { + "$ref": "#/$defs/MlMetric", + "default": "euclidean" + } + }, + "required": [ + "include" + ], + "title": "MlAnalysis", + "type": "object" + }, + "MlLinkage": { + "enum": [ + "ward", + "complete", + "average", + "single" + ], + "title": "MlLinkage", + "type": "string" + }, + "MlMetric": { + "enum": [ + "euclidean", + "manhattan", + "cosine" + ], + "title": "MlMetric", + "type": "string" + }, + "ReconstructionSettings": { + "additionalProperties": false, + "properties": { + "locations": { + "$ref": "#/$defs/Locations" + } + }, + "required": [ + "locations" + ], + "title": "ReconstructionSettings", + "type": "object" + }, + "SummaryAnalysis": { + "additionalProperties": false, + "properties": { + "include": { + "title": "Include", + "type": "boolean" + } + }, + "required": [ + "include" + ], + "title": "SummaryAnalysis", + "type": "object" + } + }, + "additionalProperties": false, + "properties": { + "container_framework": { + "$ref": "#/$defs/ContainerFramework", + "default": "docker" + }, + "unpack_singularity": { + "default": false, + "title": "Unpack Singularity", + "type": "boolean" + }, + "container_registry": { + "$ref": "#/$defs/ContainerRegistry" + }, + "hash_length": { + "default": 7, + "description": "The length of the hash used to identify a parameter combination", + "title": "Hash Length", + "type": "integer" + }, + "algorithms": { + "items": { + "$ref": "#/$defs/Algorithm" + }, + "title": "Algorithms", + "type": "array" + }, + "datasets": { + "items": { + "$ref": "#/$defs/Dataset" + }, + "title": "Datasets", + "type": "array" + }, + "gold_standards": { + "default": [], + "items": { + "$ref": "#/$defs/GoldStandard" + }, + "title": "Gold Standards", + "type": "array" + }, + "analysis": { + "$ref": "#/$defs/Analysis", + "default": { + "summary": { + "include": false + }, + "cytoscape": { + "include": false + }, + "ml": { + "aggregate_per_algorithm": false, + "components": 2, + "include": false, + "kde": false, + "labels": true, + "linkage": "ward", + "metric": "euclidean", + "remove_empty_pathways": false + }, + "evaluation": { + "aggregate_per_algorithm": false, + "include": false + } + } + }, + "reconstruction_settings": { + "$ref": "#/$defs/ReconstructionSettings" + } + }, + "required": [ + "container_registry", + "algorithms", + "datasets", + "reconstruction_settings" + ], + "title": "RawConfig", + "type": "object" +} \ No newline at end of file diff --git a/util/update_schema.py b/util/update_schema.py new file mode 100644 index 000000000..c6a7bedca --- /dev/null +++ b/util/update_schema.py @@ -0,0 +1,13 @@ +""" +Updates config/schema.json. +This should be done whenever a new algorithm is introduced, +or the config is otherwise directly changed. +""" + +import json +from pathlib import Path + +from spras.config.schema import RawConfig + +config_schema = RawConfig.model_json_schema() +Path('config/schema.json').write_text(json.dumps(config_schema, indent=2)) From 3ed974fcfa234da37d398a46ba568a90d17d5141 Mon Sep 17 00:00:00 2001 From: "Tristan F." Date: Sat, 6 Sep 2025 05:51:05 +0000 Subject: [PATCH 2/5] docs: cmt on schema --- config/config.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/config.yaml b/config/config.yaml index 9a227f432..0929fa80a 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -1,4 +1,5 @@ -# yaml-language-server: $schema=./schema.json +# Specify the schema: +# yaml-language-server: $schema=schema.json # Global workflow control From 2bbdb802eb6fa68a83e80bf5234abf4e7624d0dd Mon Sep 17 00:00:00 2001 From: "Tristan F.-R." Date: Fri, 21 Nov 2025 19:55:11 +0000 Subject: [PATCH 3/5] chore: update schema --- config/schema.json | 1437 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 1367 insertions(+), 70 deletions(-) diff --git a/config/schema.json b/config/schema.json index 9ae5dfe23..204c5705d 100644 --- a/config/schema.json +++ b/config/schema.json @@ -1,49 +1,5 @@ { "$defs": { - "Algorithm": { - "additionalProperties": false, - "properties": { - "name": { - "title": "Name", - "type": "string" - }, - "params": { - "$ref": "#/$defs/AlgorithmParams" - } - }, - "required": [ - "name", - "params" - ], - "title": "Algorithm", - "type": "object" - }, - "AlgorithmParams": { - "additionalProperties": true, - "properties": { - "include": { - "title": "Include", - "type": "boolean" - }, - "directed": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Directed" - } - }, - "required": [ - "include" - ], - "title": "AlgorithmParams", - "type": "object" - }, "Analysis": { "additionalProperties": false, "properties": { @@ -87,6 +43,7 @@ "enum": [ "docker", "singularity", + "apptainer", "dsub" ], "title": "ContainerFramework", @@ -96,20 +53,47 @@ "additionalProperties": false, "properties": { "base_url": { + "default": "docker.io", + "description": "The domain of the registry", "title": "Base Url", "type": "string" }, "owner": { + "default": "reedcompbio", "description": "The owner or project of the registry", "title": "Owner", "type": "string" } }, + "title": "ContainerRegistry", + "type": "object" + }, + "ContainerSettings": { + "additionalProperties": false, + "properties": { + "framework": { + "$ref": "#/$defs/ContainerFramework", + "default": "docker" + }, + "unpack_singularity": { + "default": false, + "title": "Unpack Singularity", + "type": "boolean" + }, + "enable_profiling": { + "default": false, + "description": "A Boolean indicating whether to enable container runtime profiling (apptainer/singularity only)", + "title": "Enable Profiling", + "type": "boolean" + }, + "registry": { + "$ref": "#/$defs/ContainerRegistry" + } + }, "required": [ - "base_url", - "owner" + "registry" ], - "title": "ContainerRegistry", + "title": "ContainerSettings", "type": "object" }, "CytoscapeAnalysis": { @@ -196,12 +180,21 @@ "type": "string" }, "node_files": { + "default": [], "items": { "type": "string" }, "title": "Node Files", "type": "array" }, + "edge_files": { + "default": [], + "items": { + "type": "string" + }, + "title": "Edge Files", + "type": "array" + }, "data_dir": { "title": "Data Dir", "type": "string" @@ -216,7 +209,6 @@ }, "required": [ "label", - "node_files", "data_dir", "dataset_labels" ], @@ -329,31 +321,1336 @@ ], "title": "SummaryAnalysis", "type": "object" - } - }, - "additionalProperties": false, - "properties": { - "container_framework": { - "$ref": "#/$defs/ContainerFramework", - "default": "docker" }, - "unpack_singularity": { - "default": false, - "title": "Unpack Singularity", - "type": "boolean" + "allpairsModel": { + "additionalProperties": false, + "properties": { + "name": { + "const": "allpairs", + "title": "Name", + "type": "string" + }, + "include": { + "title": "Include", + "type": "boolean" + }, + "runs": { + "additionalProperties": { + "$ref": "#/$defs/allpairsRunModel" + }, + "default": { + "default": {} + }, + "title": "Runs", + "type": "object" + } + }, + "required": [ + "name", + "include" + ], + "title": "allpairsModel", + "type": "object" + }, + "allpairsRunModel": { + "additionalProperties": false, + "properties": {}, + "title": "allpairsRunModel", + "type": "object" }, - "container_registry": { - "$ref": "#/$defs/ContainerRegistry" + "bowtiebuilderModel": { + "additionalProperties": false, + "properties": { + "name": { + "const": "bowtiebuilder", + "title": "Name", + "type": "string" + }, + "include": { + "title": "Include", + "type": "boolean" + }, + "runs": { + "additionalProperties": { + "$ref": "#/$defs/bowtiebuilderRunModel" + }, + "default": { + "default": {} + }, + "title": "Runs", + "type": "object" + } + }, + "required": [ + "name", + "include" + ], + "title": "bowtiebuilderModel", + "type": "object" }, - "hash_length": { - "default": 7, - "description": "The length of the hash used to identify a parameter combination", - "title": "Hash Length", - "type": "integer" + "bowtiebuilderRunModel": { + "additionalProperties": false, + "properties": {}, + "title": "bowtiebuilderRunModel", + "type": "object" }, - "algorithms": { - "items": { - "$ref": "#/$defs/Algorithm" + "dominoModel": { + "additionalProperties": false, + "properties": { + "name": { + "const": "domino", + "title": "Name", + "type": "string" + }, + "include": { + "title": "Include", + "type": "boolean" + }, + "runs": { + "additionalProperties": { + "$ref": "#/$defs/dominoRunModel" + }, + "default": { + "default": { + "module_threshold": null, + "slice_threshold": null + } + }, + "title": "Runs", + "type": "object" + } + }, + "required": [ + "name", + "include" + ], + "title": "dominoModel", + "type": "object" + }, + "dominoRunModel": { + "additionalProperties": false, + "properties": { + "module_threshold": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "the p-value threshold for considering a slice as relevant (optional)", + "title": "Module Threshold" + }, + "slice_threshold": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "the p-value threshold for considering a putative module as final module (optional)", + "title": "Slice Threshold" + } + }, + "title": "dominoRunModel", + "type": "object" + }, + "meoModel": { + "additionalProperties": false, + "properties": { + "name": { + "const": "meo", + "title": "Name", + "type": "string" + }, + "include": { + "title": "Include", + "type": "boolean" + }, + "runs": { + "additionalProperties": { + "$ref": "#/$defs/meoRunModel" + }, + "default": { + "default": { + "max_path_length": null, + "local_search": null, + "rand_restarts": null + } + }, + "title": "Runs", + "type": "object" + } + }, + "required": [ + "name", + "include" + ], + "title": "meoModel", + "type": "object" + }, + "meoRunModel": { + "additionalProperties": false, + "properties": { + "max_path_length": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "the maximal length of a path from sources and targets to orient.", + "title": "Max Path Length" + }, + "local_search": { + "anyOf": [ + { + "type": "boolean" + }, + { + "items": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "a boolean parameter that enables MEO's local search functionality.\nSee \"Improving approximations with local search\" in the associated paper\nfor more information.", + "title": "Local Search" + }, + "rand_restarts": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The number of random restarts to use.", + "title": "Rand Restarts" + } + }, + "title": "meoRunModel", + "type": "object" + }, + "mincostflowModel": { + "additionalProperties": false, + "properties": { + "name": { + "const": "mincostflow", + "title": "Name", + "type": "string" + }, + "include": { + "title": "Include", + "type": "boolean" + }, + "runs": { + "additionalProperties": { + "$ref": "#/$defs/mincostflowRunModel" + }, + "default": { + "default": { + "flow": null, + "capacity": null + } + }, + "title": "Runs", + "type": "object" + } + }, + "required": [ + "name", + "include" + ], + "title": "mincostflowModel", + "type": "object" + }, + "mincostflowRunModel": { + "additionalProperties": false, + "properties": { + "flow": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "amount of flow going through the graph", + "title": "Flow" + }, + "capacity": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "amount of capacity allowed on each edge", + "title": "Capacity" + } + }, + "title": "mincostflowRunModel", + "type": "object" + }, + "omicsintegrator1Model": { + "additionalProperties": false, + "properties": { + "name": { + "const": "omicsintegrator1", + "title": "Name", + "type": "string" + }, + "include": { + "title": "Include", + "type": "boolean" + }, + "runs": { + "additionalProperties": { + "$ref": "#/$defs/omicsintegrator1RunModel" + }, + "title": "Runs", + "type": "object" + } + }, + "required": [ + "name", + "include", + "runs" + ], + "title": "omicsintegrator1Model", + "type": "object" + }, + "omicsintegrator1RunModel": { + "additionalProperties": false, + "properties": { + "dummy_mode": { + "anyOf": [ + { + "$ref": "#/$defs/spras__omicsintegrator1__DummyMode" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/$defs/spras__omicsintegrator1__DummyMode" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Dummy Mode" + }, + "mu_squared": { + "anyOf": [ + { + "type": "boolean" + }, + { + "items": { + "type": "boolean" + }, + "type": "array" + } + ], + "default": false, + "title": "Mu Squared" + }, + "exclude_terms": { + "anyOf": [ + { + "type": "boolean" + }, + { + "items": { + "type": "boolean" + }, + "type": "array" + } + ], + "default": false, + "title": "Exclude Terms" + }, + "noisy_edges": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "type": "integer" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "default": 0, + "description": "How many times you would like to add noise to the given edge values and re-run the algorithm.", + "title": "Noisy Edges" + }, + "shuffled_prizes": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "type": "integer" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "default": 0, + "description": "How many times the algorithm should shuffle the prizes and re-run", + "title": "Shuffled Prizes" + }, + "random_terminals": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "type": "integer" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "default": 0, + "description": "How many times to apply the given prizes to random nodes in the interactome", + "title": "Random Terminals" + }, + "seed": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The randomness seed to use.", + "title": "Seed" + }, + "w": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Float that affects the number of connected components, with higher values leading to more components", + "title": "W" + }, + "b": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "The trade-off between including more prizes and using less reliable edgess", + "title": "B" + }, + "d": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "type": "integer" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Controls the maximum path-length from root to terminal nodes", + "title": "D" + }, + "mu": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "default": 0.0, + "description": "Controls the degree-based negative prizes (default 0.0)", + "title": "Mu" + }, + "noise": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Standard Deviation of the gaussian noise added to edges in Noisy Edges Randomizations", + "title": "Noise" + }, + "g": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "default": 0.001, + "description": "(gamma) msgsteiner reinforcement parameter that affects the convergence of the solution and runtime, with larger values leading to faster convergence but suboptimal results.", + "title": "G" + }, + "r": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "default": 0, + "description": "msgsteiner parameter that adds random noise to edges, which is rarely needed.", + "title": "R" + } + }, + "required": [ + "w", + "b", + "d" + ], + "title": "omicsintegrator1RunModel", + "type": "object" + }, + "omicsintegrator2Model": { + "additionalProperties": false, + "properties": { + "name": { + "const": "omicsintegrator2", + "title": "Name", + "type": "string" + }, + "include": { + "title": "Include", + "type": "boolean" + }, + "runs": { + "additionalProperties": { + "$ref": "#/$defs/omicsintegrator2RunModel" + }, + "default": { + "default": { + "w": 5.0, + "b": 1.0, + "g": 3.0, + "noise": null, + "noisy_edges": null, + "random_terminals": null, + "dummy_mode": null, + "seed": null + } + }, + "title": "Runs", + "type": "object" + } + }, + "required": [ + "name", + "include" + ], + "title": "omicsintegrator2Model", + "type": "object" + }, + "omicsintegrator2RunModel": { + "additionalProperties": false, + "properties": { + "w": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "default": 5, + "description": "Omega: the weight of the edges connecting the dummy node to the nodes selected by dummyMode", + "title": "W" + }, + "b": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "default": 1, + "description": "Beta: scaling factor of prizes", + "title": "B" + }, + "g": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "default": 3, + "description": "Gamma: multiplicative edge penalty from degree of endpoints", + "title": "G" + }, + "noise": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Standard Deviation of the gaussian noise added to edges in Noisy Edges Randomizations.", + "title": "Noise" + }, + "noisy_edges": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "An integer specifying how many times to add noise to the given edge values and re-run.", + "title": "Noisy Edges" + }, + "random_terminals": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "An integer specifying how many times to apply your given prizes to random nodes in the interactome and re-run", + "title": "Random Terminals" + }, + "dummy_mode": { + "anyOf": [ + { + "$ref": "#/$defs/spras__omicsintegrator2__DummyMode" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/$defs/spras__omicsintegrator2__DummyMode" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Tells the program which nodes in the interactome to connect the dummy node to. (default: terminals)\n \"terminals\" = connect to all terminals\n \"others\" = connect to all nodes except for terminals\n \"all\" = connect to all nodes in the interactome.", + "title": "Dummy Mode" + }, + "seed": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The random seed to use for this run.", + "title": "Seed" + } + }, + "title": "omicsintegrator2RunModel", + "type": "object" + }, + "pathlinkerModel": { + "additionalProperties": false, + "properties": { + "name": { + "const": "pathlinker", + "title": "Name", + "type": "string" + }, + "include": { + "title": "Include", + "type": "boolean" + }, + "runs": { + "additionalProperties": { + "$ref": "#/$defs/pathlinkerRunModel" + }, + "default": { + "default": { + "k": 100 + } + }, + "title": "Runs", + "type": "object" + } + }, + "required": [ + "name", + "include" + ], + "title": "pathlinkerModel", + "type": "object" + }, + "pathlinkerRunModel": { + "additionalProperties": false, + "properties": { + "k": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "type": "integer" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "default": 100, + "description": "Number of paths", + "title": "K" + } + }, + "title": "pathlinkerRunModel", + "type": "object" + }, + "responsenetModel": { + "additionalProperties": false, + "properties": { + "name": { + "const": "responsenet", + "title": "Name", + "type": "string" + }, + "include": { + "title": "Include", + "type": "boolean" + }, + "runs": { + "additionalProperties": { + "$ref": "#/$defs/responsenetRunModel" + }, + "default": { + "default": { + "gamma": 10 + } + }, + "title": "Runs", + "type": "object" + } + }, + "required": [ + "name", + "include" + ], + "title": "responsenetModel", + "type": "object" + }, + "responsenetRunModel": { + "additionalProperties": false, + "properties": { + "gamma": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "type": "integer" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "default": 10, + "description": "The 'size' of the graph. The higher gamma is, the more flow\nis encouraged to start from the source nodes.", + "title": "Gamma" + } + }, + "title": "responsenetRunModel", + "type": "object" + }, + "rwrModel": { + "additionalProperties": false, + "properties": { + "name": { + "const": "rwr", + "title": "Name", + "type": "string" + }, + "include": { + "title": "Include", + "type": "boolean" + }, + "runs": { + "additionalProperties": { + "$ref": "#/$defs/rwrRunModel" + }, + "title": "Runs", + "type": "object" + } + }, + "required": [ + "name", + "include", + "runs" + ], + "title": "rwrModel", + "type": "object" + }, + "rwrRunModel": { + "additionalProperties": false, + "properties": { + "threshold": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "type": "integer" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "The number of nodes to return", + "title": "Threshold" + }, + "alpha": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The chance of a restart during the random walk", + "title": "Alpha" + } + }, + "required": [ + "threshold" + ], + "title": "rwrRunModel", + "type": "object" + }, + "spras__omicsintegrator1__DummyMode": { + "enum": [ + "terminals", + "all", + "others", + "file" + ], + "title": "DummyMode", + "type": "string" + }, + "spras__omicsintegrator2__DummyMode": { + "enum": [ + "terminals", + "others", + "all" + ], + "title": "DummyMode", + "type": "string" + }, + "strwrModel": { + "additionalProperties": false, + "properties": { + "name": { + "const": "strwr", + "title": "Name", + "type": "string" + }, + "include": { + "title": "Include", + "type": "boolean" + }, + "runs": { + "additionalProperties": { + "$ref": "#/$defs/strwrRunModel" + }, + "title": "Runs", + "type": "object" + } + }, + "required": [ + "name", + "include", + "runs" + ], + "title": "strwrModel", + "type": "object" + }, + "strwrRunModel": { + "additionalProperties": false, + "properties": { + "threshold": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "type": "integer" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "The number of nodes to return", + "title": "Threshold" + }, + "alpha": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The chance of a restart during the random walk", + "title": "Alpha" + } + }, + "required": [ + "threshold" + ], + "title": "strwrRunModel", + "type": "object" + } + }, + "additionalProperties": false, + "properties": { + "containers": { + "$ref": "#/$defs/ContainerSettings" + }, + "hash_length": { + "default": 7, + "description": "The length of the hash used to identify a parameter combination", + "title": "Hash Length", + "type": "integer" + }, + "algorithms": { + "items": { + "discriminator": { + "mapping": { + "allpairs": "#/$defs/allpairsModel", + "bowtiebuilder": "#/$defs/bowtiebuilderModel", + "domino": "#/$defs/dominoModel", + "meo": "#/$defs/meoModel", + "mincostflow": "#/$defs/mincostflowModel", + "omicsintegrator1": "#/$defs/omicsintegrator1Model", + "omicsintegrator2": "#/$defs/omicsintegrator2Model", + "pathlinker": "#/$defs/pathlinkerModel", + "responsenet": "#/$defs/responsenetModel", + "rwr": "#/$defs/rwrModel", + "strwr": "#/$defs/strwrModel" + }, + "propertyName": "name" + }, + "oneOf": [ + { + "$ref": "#/$defs/allpairsModel" + }, + { + "$ref": "#/$defs/bowtiebuilderModel" + }, + { + "$ref": "#/$defs/dominoModel" + }, + { + "$ref": "#/$defs/meoModel" + }, + { + "$ref": "#/$defs/mincostflowModel" + }, + { + "$ref": "#/$defs/omicsintegrator1Model" + }, + { + "$ref": "#/$defs/omicsintegrator2Model" + }, + { + "$ref": "#/$defs/pathlinkerModel" + }, + { + "$ref": "#/$defs/responsenetModel" + }, + { + "$ref": "#/$defs/rwrModel" + }, + { + "$ref": "#/$defs/strwrModel" + } + ] }, "title": "Algorithms", "type": "array" @@ -403,7 +1700,7 @@ } }, "required": [ - "container_registry", + "containers", "algorithms", "datasets", "reconstruction_settings" From 7812bdd30dfcd6b1253edf2085c93421bbbec1a4 Mon Sep 17 00:00:00 2001 From: "Tristan F.-R." Date: Sun, 18 Jan 2026 19:31:39 +0000 Subject: [PATCH 4/5] chore: update schema --- config/schema.json | 1382 ++------------------------------------------ 1 file changed, 56 insertions(+), 1326 deletions(-) diff --git a/config/schema.json b/config/schema.json index 204c5705d..9b02808c3 100644 --- a/config/schema.json +++ b/config/schema.json @@ -1,5 +1,49 @@ { "$defs": { + "Algorithm": { + "additionalProperties": false, + "properties": { + "name": { + "title": "Name", + "type": "string" + }, + "params": { + "$ref": "#/$defs/AlgorithmParams" + } + }, + "required": [ + "name", + "params" + ], + "title": "Algorithm", + "type": "object" + }, + "AlgorithmParams": { + "additionalProperties": true, + "properties": { + "include": { + "title": "Include", + "type": "boolean" + }, + "directed": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Directed" + } + }, + "required": [ + "include" + ], + "title": "AlgorithmParams", + "type": "object" + }, "Analysis": { "additionalProperties": false, "properties": { @@ -321,1336 +365,22 @@ ], "title": "SummaryAnalysis", "type": "object" + } + }, + "additionalProperties": false, + "properties": { + "containers": { + "$ref": "#/$defs/ContainerSettings" }, - "allpairsModel": { - "additionalProperties": false, - "properties": { - "name": { - "const": "allpairs", - "title": "Name", - "type": "string" - }, - "include": { - "title": "Include", - "type": "boolean" - }, - "runs": { - "additionalProperties": { - "$ref": "#/$defs/allpairsRunModel" - }, - "default": { - "default": {} - }, - "title": "Runs", - "type": "object" - } - }, - "required": [ - "name", - "include" - ], - "title": "allpairsModel", - "type": "object" - }, - "allpairsRunModel": { - "additionalProperties": false, - "properties": {}, - "title": "allpairsRunModel", - "type": "object" - }, - "bowtiebuilderModel": { - "additionalProperties": false, - "properties": { - "name": { - "const": "bowtiebuilder", - "title": "Name", - "type": "string" - }, - "include": { - "title": "Include", - "type": "boolean" - }, - "runs": { - "additionalProperties": { - "$ref": "#/$defs/bowtiebuilderRunModel" - }, - "default": { - "default": {} - }, - "title": "Runs", - "type": "object" - } - }, - "required": [ - "name", - "include" - ], - "title": "bowtiebuilderModel", - "type": "object" - }, - "bowtiebuilderRunModel": { - "additionalProperties": false, - "properties": {}, - "title": "bowtiebuilderRunModel", - "type": "object" - }, - "dominoModel": { - "additionalProperties": false, - "properties": { - "name": { - "const": "domino", - "title": "Name", - "type": "string" - }, - "include": { - "title": "Include", - "type": "boolean" - }, - "runs": { - "additionalProperties": { - "$ref": "#/$defs/dominoRunModel" - }, - "default": { - "default": { - "module_threshold": null, - "slice_threshold": null - } - }, - "title": "Runs", - "type": "object" - } - }, - "required": [ - "name", - "include" - ], - "title": "dominoModel", - "type": "object" - }, - "dominoRunModel": { - "additionalProperties": false, - "properties": { - "module_threshold": { - "anyOf": [ - { - "type": "number" - }, - { - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "the p-value threshold for considering a slice as relevant (optional)", - "title": "Module Threshold" - }, - "slice_threshold": { - "anyOf": [ - { - "type": "number" - }, - { - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "the p-value threshold for considering a putative module as final module (optional)", - "title": "Slice Threshold" - } - }, - "title": "dominoRunModel", - "type": "object" - }, - "meoModel": { - "additionalProperties": false, - "properties": { - "name": { - "const": "meo", - "title": "Name", - "type": "string" - }, - "include": { - "title": "Include", - "type": "boolean" - }, - "runs": { - "additionalProperties": { - "$ref": "#/$defs/meoRunModel" - }, - "default": { - "default": { - "max_path_length": null, - "local_search": null, - "rand_restarts": null - } - }, - "title": "Runs", - "type": "object" - } - }, - "required": [ - "name", - "include" - ], - "title": "meoModel", - "type": "object" - }, - "meoRunModel": { - "additionalProperties": false, - "properties": { - "max_path_length": { - "anyOf": [ - { - "type": "integer" - }, - { - "items": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "the maximal length of a path from sources and targets to orient.", - "title": "Max Path Length" - }, - "local_search": { - "anyOf": [ - { - "type": "boolean" - }, - { - "items": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "description": "a boolean parameter that enables MEO's local search functionality.\nSee \"Improving approximations with local search\" in the associated paper\nfor more information.", - "title": "Local Search" - }, - "rand_restarts": { - "anyOf": [ - { - "type": "integer" - }, - { - "items": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "The number of random restarts to use.", - "title": "Rand Restarts" - } - }, - "title": "meoRunModel", - "type": "object" - }, - "mincostflowModel": { - "additionalProperties": false, - "properties": { - "name": { - "const": "mincostflow", - "title": "Name", - "type": "string" - }, - "include": { - "title": "Include", - "type": "boolean" - }, - "runs": { - "additionalProperties": { - "$ref": "#/$defs/mincostflowRunModel" - }, - "default": { - "default": { - "flow": null, - "capacity": null - } - }, - "title": "Runs", - "type": "object" - } - }, - "required": [ - "name", - "include" - ], - "title": "mincostflowModel", - "type": "object" - }, - "mincostflowRunModel": { - "additionalProperties": false, - "properties": { - "flow": { - "anyOf": [ - { - "type": "integer" - }, - { - "items": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "amount of flow going through the graph", - "title": "Flow" - }, - "capacity": { - "anyOf": [ - { - "type": "integer" - }, - { - "items": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "amount of capacity allowed on each edge", - "title": "Capacity" - } - }, - "title": "mincostflowRunModel", - "type": "object" - }, - "omicsintegrator1Model": { - "additionalProperties": false, - "properties": { - "name": { - "const": "omicsintegrator1", - "title": "Name", - "type": "string" - }, - "include": { - "title": "Include", - "type": "boolean" - }, - "runs": { - "additionalProperties": { - "$ref": "#/$defs/omicsintegrator1RunModel" - }, - "title": "Runs", - "type": "object" - } - }, - "required": [ - "name", - "include", - "runs" - ], - "title": "omicsintegrator1Model", - "type": "object" - }, - "omicsintegrator1RunModel": { - "additionalProperties": false, - "properties": { - "dummy_mode": { - "anyOf": [ - { - "$ref": "#/$defs/spras__omicsintegrator1__DummyMode" - }, - { - "items": { - "anyOf": [ - { - "$ref": "#/$defs/spras__omicsintegrator1__DummyMode" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Dummy Mode" - }, - "mu_squared": { - "anyOf": [ - { - "type": "boolean" - }, - { - "items": { - "type": "boolean" - }, - "type": "array" - } - ], - "default": false, - "title": "Mu Squared" - }, - "exclude_terms": { - "anyOf": [ - { - "type": "boolean" - }, - { - "items": { - "type": "boolean" - }, - "type": "array" - } - ], - "default": false, - "title": "Exclude Terms" - }, - "noisy_edges": { - "anyOf": [ - { - "type": "integer" - }, - { - "items": { - "type": "integer" - }, - "type": "array" - }, - { - "type": "string" - } - ], - "default": 0, - "description": "How many times you would like to add noise to the given edge values and re-run the algorithm.", - "title": "Noisy Edges" - }, - "shuffled_prizes": { - "anyOf": [ - { - "type": "integer" - }, - { - "items": { - "type": "integer" - }, - "type": "array" - }, - { - "type": "string" - } - ], - "default": 0, - "description": "How many times the algorithm should shuffle the prizes and re-run", - "title": "Shuffled Prizes" - }, - "random_terminals": { - "anyOf": [ - { - "type": "integer" - }, - { - "items": { - "type": "integer" - }, - "type": "array" - }, - { - "type": "string" - } - ], - "default": 0, - "description": "How many times to apply the given prizes to random nodes in the interactome", - "title": "Random Terminals" - }, - "seed": { - "anyOf": [ - { - "type": "integer" - }, - { - "items": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "The randomness seed to use.", - "title": "Seed" - }, - "w": { - "anyOf": [ - { - "type": "number" - }, - { - "items": { - "type": "number" - }, - "type": "array" - }, - { - "type": "string" - } - ], - "description": "Float that affects the number of connected components, with higher values leading to more components", - "title": "W" - }, - "b": { - "anyOf": [ - { - "type": "number" - }, - { - "items": { - "type": "number" - }, - "type": "array" - }, - { - "type": "string" - } - ], - "description": "The trade-off between including more prizes and using less reliable edgess", - "title": "B" - }, - "d": { - "anyOf": [ - { - "type": "integer" - }, - { - "items": { - "type": "integer" - }, - "type": "array" - }, - { - "type": "string" - } - ], - "description": "Controls the maximum path-length from root to terminal nodes", - "title": "D" - }, - "mu": { - "anyOf": [ - { - "type": "number" - }, - { - "items": { - "type": "number" - }, - "type": "array" - }, - { - "type": "string" - } - ], - "default": 0.0, - "description": "Controls the degree-based negative prizes (default 0.0)", - "title": "Mu" - }, - "noise": { - "anyOf": [ - { - "type": "number" - }, - { - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Standard Deviation of the gaussian noise added to edges in Noisy Edges Randomizations", - "title": "Noise" - }, - "g": { - "anyOf": [ - { - "type": "number" - }, - { - "items": { - "type": "number" - }, - "type": "array" - }, - { - "type": "string" - } - ], - "default": 0.001, - "description": "(gamma) msgsteiner reinforcement parameter that affects the convergence of the solution and runtime, with larger values leading to faster convergence but suboptimal results.", - "title": "G" - }, - "r": { - "anyOf": [ - { - "type": "number" - }, - { - "items": { - "type": "number" - }, - "type": "array" - }, - { - "type": "string" - } - ], - "default": 0, - "description": "msgsteiner parameter that adds random noise to edges, which is rarely needed.", - "title": "R" - } - }, - "required": [ - "w", - "b", - "d" - ], - "title": "omicsintegrator1RunModel", - "type": "object" - }, - "omicsintegrator2Model": { - "additionalProperties": false, - "properties": { - "name": { - "const": "omicsintegrator2", - "title": "Name", - "type": "string" - }, - "include": { - "title": "Include", - "type": "boolean" - }, - "runs": { - "additionalProperties": { - "$ref": "#/$defs/omicsintegrator2RunModel" - }, - "default": { - "default": { - "w": 5.0, - "b": 1.0, - "g": 3.0, - "noise": null, - "noisy_edges": null, - "random_terminals": null, - "dummy_mode": null, - "seed": null - } - }, - "title": "Runs", - "type": "object" - } - }, - "required": [ - "name", - "include" - ], - "title": "omicsintegrator2Model", - "type": "object" - }, - "omicsintegrator2RunModel": { - "additionalProperties": false, - "properties": { - "w": { - "anyOf": [ - { - "type": "number" - }, - { - "items": { - "type": "number" - }, - "type": "array" - }, - { - "type": "string" - } - ], - "default": 5, - "description": "Omega: the weight of the edges connecting the dummy node to the nodes selected by dummyMode", - "title": "W" - }, - "b": { - "anyOf": [ - { - "type": "number" - }, - { - "items": { - "type": "number" - }, - "type": "array" - }, - { - "type": "string" - } - ], - "default": 1, - "description": "Beta: scaling factor of prizes", - "title": "B" - }, - "g": { - "anyOf": [ - { - "type": "number" - }, - { - "items": { - "type": "number" - }, - "type": "array" - }, - { - "type": "string" - } - ], - "default": 3, - "description": "Gamma: multiplicative edge penalty from degree of endpoints", - "title": "G" - }, - "noise": { - "anyOf": [ - { - "type": "number" - }, - { - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Standard Deviation of the gaussian noise added to edges in Noisy Edges Randomizations.", - "title": "Noise" - }, - "noisy_edges": { - "anyOf": [ - { - "type": "integer" - }, - { - "items": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "An integer specifying how many times to add noise to the given edge values and re-run.", - "title": "Noisy Edges" - }, - "random_terminals": { - "anyOf": [ - { - "type": "integer" - }, - { - "items": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "An integer specifying how many times to apply your given prizes to random nodes in the interactome and re-run", - "title": "Random Terminals" - }, - "dummy_mode": { - "anyOf": [ - { - "$ref": "#/$defs/spras__omicsintegrator2__DummyMode" - }, - { - "items": { - "anyOf": [ - { - "$ref": "#/$defs/spras__omicsintegrator2__DummyMode" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "null" - } - ], - "default": null, - "description": "Tells the program which nodes in the interactome to connect the dummy node to. (default: terminals)\n \"terminals\" = connect to all terminals\n \"others\" = connect to all nodes except for terminals\n \"all\" = connect to all nodes in the interactome.", - "title": "Dummy Mode" - }, - "seed": { - "anyOf": [ - { - "type": "integer" - }, - { - "items": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "The random seed to use for this run.", - "title": "Seed" - } - }, - "title": "omicsintegrator2RunModel", - "type": "object" - }, - "pathlinkerModel": { - "additionalProperties": false, - "properties": { - "name": { - "const": "pathlinker", - "title": "Name", - "type": "string" - }, - "include": { - "title": "Include", - "type": "boolean" - }, - "runs": { - "additionalProperties": { - "$ref": "#/$defs/pathlinkerRunModel" - }, - "default": { - "default": { - "k": 100 - } - }, - "title": "Runs", - "type": "object" - } - }, - "required": [ - "name", - "include" - ], - "title": "pathlinkerModel", - "type": "object" - }, - "pathlinkerRunModel": { - "additionalProperties": false, - "properties": { - "k": { - "anyOf": [ - { - "type": "integer" - }, - { - "items": { - "type": "integer" - }, - "type": "array" - }, - { - "type": "string" - } - ], - "default": 100, - "description": "Number of paths", - "title": "K" - } - }, - "title": "pathlinkerRunModel", - "type": "object" - }, - "responsenetModel": { - "additionalProperties": false, - "properties": { - "name": { - "const": "responsenet", - "title": "Name", - "type": "string" - }, - "include": { - "title": "Include", - "type": "boolean" - }, - "runs": { - "additionalProperties": { - "$ref": "#/$defs/responsenetRunModel" - }, - "default": { - "default": { - "gamma": 10 - } - }, - "title": "Runs", - "type": "object" - } - }, - "required": [ - "name", - "include" - ], - "title": "responsenetModel", - "type": "object" - }, - "responsenetRunModel": { - "additionalProperties": false, - "properties": { - "gamma": { - "anyOf": [ - { - "type": "integer" - }, - { - "items": { - "type": "integer" - }, - "type": "array" - }, - { - "type": "string" - } - ], - "default": 10, - "description": "The 'size' of the graph. The higher gamma is, the more flow\nis encouraged to start from the source nodes.", - "title": "Gamma" - } - }, - "title": "responsenetRunModel", - "type": "object" - }, - "rwrModel": { - "additionalProperties": false, - "properties": { - "name": { - "const": "rwr", - "title": "Name", - "type": "string" - }, - "include": { - "title": "Include", - "type": "boolean" - }, - "runs": { - "additionalProperties": { - "$ref": "#/$defs/rwrRunModel" - }, - "title": "Runs", - "type": "object" - } - }, - "required": [ - "name", - "include", - "runs" - ], - "title": "rwrModel", - "type": "object" - }, - "rwrRunModel": { - "additionalProperties": false, - "properties": { - "threshold": { - "anyOf": [ - { - "type": "integer" - }, - { - "items": { - "type": "integer" - }, - "type": "array" - }, - { - "type": "string" - } - ], - "description": "The number of nodes to return", - "title": "Threshold" - }, - "alpha": { - "anyOf": [ - { - "type": "number" - }, - { - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "The chance of a restart during the random walk", - "title": "Alpha" - } - }, - "required": [ - "threshold" - ], - "title": "rwrRunModel", - "type": "object" - }, - "spras__omicsintegrator1__DummyMode": { - "enum": [ - "terminals", - "all", - "others", - "file" - ], - "title": "DummyMode", - "type": "string" - }, - "spras__omicsintegrator2__DummyMode": { - "enum": [ - "terminals", - "others", - "all" - ], - "title": "DummyMode", - "type": "string" - }, - "strwrModel": { - "additionalProperties": false, - "properties": { - "name": { - "const": "strwr", - "title": "Name", - "type": "string" - }, - "include": { - "title": "Include", - "type": "boolean" - }, - "runs": { - "additionalProperties": { - "$ref": "#/$defs/strwrRunModel" - }, - "title": "Runs", - "type": "object" - } - }, - "required": [ - "name", - "include", - "runs" - ], - "title": "strwrModel", - "type": "object" - }, - "strwrRunModel": { - "additionalProperties": false, - "properties": { - "threshold": { - "anyOf": [ - { - "type": "integer" - }, - { - "items": { - "type": "integer" - }, - "type": "array" - }, - { - "type": "string" - } - ], - "description": "The number of nodes to return", - "title": "Threshold" - }, - "alpha": { - "anyOf": [ - { - "type": "number" - }, - { - "items": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ] - }, - "type": "array" - }, - { - "type": "string" - }, - { - "type": "null" - } - ], - "default": null, - "description": "The chance of a restart during the random walk", - "title": "Alpha" - } - }, - "required": [ - "threshold" - ], - "title": "strwrRunModel", - "type": "object" - } - }, - "additionalProperties": false, - "properties": { - "containers": { - "$ref": "#/$defs/ContainerSettings" - }, - "hash_length": { - "default": 7, - "description": "The length of the hash used to identify a parameter combination", - "title": "Hash Length", - "type": "integer" + "hash_length": { + "default": 7, + "description": "The length of the hash used to identify a parameter combination", + "title": "Hash Length", + "type": "integer" }, "algorithms": { "items": { - "discriminator": { - "mapping": { - "allpairs": "#/$defs/allpairsModel", - "bowtiebuilder": "#/$defs/bowtiebuilderModel", - "domino": "#/$defs/dominoModel", - "meo": "#/$defs/meoModel", - "mincostflow": "#/$defs/mincostflowModel", - "omicsintegrator1": "#/$defs/omicsintegrator1Model", - "omicsintegrator2": "#/$defs/omicsintegrator2Model", - "pathlinker": "#/$defs/pathlinkerModel", - "responsenet": "#/$defs/responsenetModel", - "rwr": "#/$defs/rwrModel", - "strwr": "#/$defs/strwrModel" - }, - "propertyName": "name" - }, - "oneOf": [ - { - "$ref": "#/$defs/allpairsModel" - }, - { - "$ref": "#/$defs/bowtiebuilderModel" - }, - { - "$ref": "#/$defs/dominoModel" - }, - { - "$ref": "#/$defs/meoModel" - }, - { - "$ref": "#/$defs/mincostflowModel" - }, - { - "$ref": "#/$defs/omicsintegrator1Model" - }, - { - "$ref": "#/$defs/omicsintegrator2Model" - }, - { - "$ref": "#/$defs/pathlinkerModel" - }, - { - "$ref": "#/$defs/responsenetModel" - }, - { - "$ref": "#/$defs/rwrModel" - }, - { - "$ref": "#/$defs/strwrModel" - } - ] + "$ref": "#/$defs/Algorithm" }, "title": "Algorithms", "type": "array" From 0a54bb559089a96400f5221b6b2eea3892ed2020 Mon Sep 17 00:00:00 2001 From: "Tristan F.-R." Date: Sun, 18 Jan 2026 19:33:00 +0000 Subject: [PATCH 5/5] chore: properly update schema --- config/schema.json | 1386 +++++++++++++++++++++++++++++++++++++++-- util/update_schema.py | 2 +- 2 files changed, 1329 insertions(+), 59 deletions(-) diff --git a/config/schema.json b/config/schema.json index 9b02808c3..204c5705d 100644 --- a/config/schema.json +++ b/config/schema.json @@ -1,49 +1,5 @@ { "$defs": { - "Algorithm": { - "additionalProperties": false, - "properties": { - "name": { - "title": "Name", - "type": "string" - }, - "params": { - "$ref": "#/$defs/AlgorithmParams" - } - }, - "required": [ - "name", - "params" - ], - "title": "Algorithm", - "type": "object" - }, - "AlgorithmParams": { - "additionalProperties": true, - "properties": { - "include": { - "title": "Include", - "type": "boolean" - }, - "directed": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "default": null, - "title": "Directed" - } - }, - "required": [ - "include" - ], - "title": "AlgorithmParams", - "type": "object" - }, "Analysis": { "additionalProperties": false, "properties": { @@ -365,22 +321,1336 @@ ], "title": "SummaryAnalysis", "type": "object" - } - }, - "additionalProperties": false, - "properties": { - "containers": { - "$ref": "#/$defs/ContainerSettings" }, - "hash_length": { - "default": 7, - "description": "The length of the hash used to identify a parameter combination", - "title": "Hash Length", - "type": "integer" + "allpairsModel": { + "additionalProperties": false, + "properties": { + "name": { + "const": "allpairs", + "title": "Name", + "type": "string" + }, + "include": { + "title": "Include", + "type": "boolean" + }, + "runs": { + "additionalProperties": { + "$ref": "#/$defs/allpairsRunModel" + }, + "default": { + "default": {} + }, + "title": "Runs", + "type": "object" + } + }, + "required": [ + "name", + "include" + ], + "title": "allpairsModel", + "type": "object" }, - "algorithms": { - "items": { - "$ref": "#/$defs/Algorithm" + "allpairsRunModel": { + "additionalProperties": false, + "properties": {}, + "title": "allpairsRunModel", + "type": "object" + }, + "bowtiebuilderModel": { + "additionalProperties": false, + "properties": { + "name": { + "const": "bowtiebuilder", + "title": "Name", + "type": "string" + }, + "include": { + "title": "Include", + "type": "boolean" + }, + "runs": { + "additionalProperties": { + "$ref": "#/$defs/bowtiebuilderRunModel" + }, + "default": { + "default": {} + }, + "title": "Runs", + "type": "object" + } + }, + "required": [ + "name", + "include" + ], + "title": "bowtiebuilderModel", + "type": "object" + }, + "bowtiebuilderRunModel": { + "additionalProperties": false, + "properties": {}, + "title": "bowtiebuilderRunModel", + "type": "object" + }, + "dominoModel": { + "additionalProperties": false, + "properties": { + "name": { + "const": "domino", + "title": "Name", + "type": "string" + }, + "include": { + "title": "Include", + "type": "boolean" + }, + "runs": { + "additionalProperties": { + "$ref": "#/$defs/dominoRunModel" + }, + "default": { + "default": { + "module_threshold": null, + "slice_threshold": null + } + }, + "title": "Runs", + "type": "object" + } + }, + "required": [ + "name", + "include" + ], + "title": "dominoModel", + "type": "object" + }, + "dominoRunModel": { + "additionalProperties": false, + "properties": { + "module_threshold": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "the p-value threshold for considering a slice as relevant (optional)", + "title": "Module Threshold" + }, + "slice_threshold": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "the p-value threshold for considering a putative module as final module (optional)", + "title": "Slice Threshold" + } + }, + "title": "dominoRunModel", + "type": "object" + }, + "meoModel": { + "additionalProperties": false, + "properties": { + "name": { + "const": "meo", + "title": "Name", + "type": "string" + }, + "include": { + "title": "Include", + "type": "boolean" + }, + "runs": { + "additionalProperties": { + "$ref": "#/$defs/meoRunModel" + }, + "default": { + "default": { + "max_path_length": null, + "local_search": null, + "rand_restarts": null + } + }, + "title": "Runs", + "type": "object" + } + }, + "required": [ + "name", + "include" + ], + "title": "meoModel", + "type": "object" + }, + "meoRunModel": { + "additionalProperties": false, + "properties": { + "max_path_length": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "the maximal length of a path from sources and targets to orient.", + "title": "Max Path Length" + }, + "local_search": { + "anyOf": [ + { + "type": "boolean" + }, + { + "items": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "a boolean parameter that enables MEO's local search functionality.\nSee \"Improving approximations with local search\" in the associated paper\nfor more information.", + "title": "Local Search" + }, + "rand_restarts": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The number of random restarts to use.", + "title": "Rand Restarts" + } + }, + "title": "meoRunModel", + "type": "object" + }, + "mincostflowModel": { + "additionalProperties": false, + "properties": { + "name": { + "const": "mincostflow", + "title": "Name", + "type": "string" + }, + "include": { + "title": "Include", + "type": "boolean" + }, + "runs": { + "additionalProperties": { + "$ref": "#/$defs/mincostflowRunModel" + }, + "default": { + "default": { + "flow": null, + "capacity": null + } + }, + "title": "Runs", + "type": "object" + } + }, + "required": [ + "name", + "include" + ], + "title": "mincostflowModel", + "type": "object" + }, + "mincostflowRunModel": { + "additionalProperties": false, + "properties": { + "flow": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "amount of flow going through the graph", + "title": "Flow" + }, + "capacity": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "amount of capacity allowed on each edge", + "title": "Capacity" + } + }, + "title": "mincostflowRunModel", + "type": "object" + }, + "omicsintegrator1Model": { + "additionalProperties": false, + "properties": { + "name": { + "const": "omicsintegrator1", + "title": "Name", + "type": "string" + }, + "include": { + "title": "Include", + "type": "boolean" + }, + "runs": { + "additionalProperties": { + "$ref": "#/$defs/omicsintegrator1RunModel" + }, + "title": "Runs", + "type": "object" + } + }, + "required": [ + "name", + "include", + "runs" + ], + "title": "omicsintegrator1Model", + "type": "object" + }, + "omicsintegrator1RunModel": { + "additionalProperties": false, + "properties": { + "dummy_mode": { + "anyOf": [ + { + "$ref": "#/$defs/spras__omicsintegrator1__DummyMode" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/$defs/spras__omicsintegrator1__DummyMode" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "title": "Dummy Mode" + }, + "mu_squared": { + "anyOf": [ + { + "type": "boolean" + }, + { + "items": { + "type": "boolean" + }, + "type": "array" + } + ], + "default": false, + "title": "Mu Squared" + }, + "exclude_terms": { + "anyOf": [ + { + "type": "boolean" + }, + { + "items": { + "type": "boolean" + }, + "type": "array" + } + ], + "default": false, + "title": "Exclude Terms" + }, + "noisy_edges": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "type": "integer" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "default": 0, + "description": "How many times you would like to add noise to the given edge values and re-run the algorithm.", + "title": "Noisy Edges" + }, + "shuffled_prizes": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "type": "integer" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "default": 0, + "description": "How many times the algorithm should shuffle the prizes and re-run", + "title": "Shuffled Prizes" + }, + "random_terminals": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "type": "integer" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "default": 0, + "description": "How many times to apply the given prizes to random nodes in the interactome", + "title": "Random Terminals" + }, + "seed": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The randomness seed to use.", + "title": "Seed" + }, + "w": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Float that affects the number of connected components, with higher values leading to more components", + "title": "W" + }, + "b": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "The trade-off between including more prizes and using less reliable edgess", + "title": "B" + }, + "d": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "type": "integer" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Controls the maximum path-length from root to terminal nodes", + "title": "D" + }, + "mu": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "default": 0.0, + "description": "Controls the degree-based negative prizes (default 0.0)", + "title": "Mu" + }, + "noise": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Standard Deviation of the gaussian noise added to edges in Noisy Edges Randomizations", + "title": "Noise" + }, + "g": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "default": 0.001, + "description": "(gamma) msgsteiner reinforcement parameter that affects the convergence of the solution and runtime, with larger values leading to faster convergence but suboptimal results.", + "title": "G" + }, + "r": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "default": 0, + "description": "msgsteiner parameter that adds random noise to edges, which is rarely needed.", + "title": "R" + } + }, + "required": [ + "w", + "b", + "d" + ], + "title": "omicsintegrator1RunModel", + "type": "object" + }, + "omicsintegrator2Model": { + "additionalProperties": false, + "properties": { + "name": { + "const": "omicsintegrator2", + "title": "Name", + "type": "string" + }, + "include": { + "title": "Include", + "type": "boolean" + }, + "runs": { + "additionalProperties": { + "$ref": "#/$defs/omicsintegrator2RunModel" + }, + "default": { + "default": { + "w": 5.0, + "b": 1.0, + "g": 3.0, + "noise": null, + "noisy_edges": null, + "random_terminals": null, + "dummy_mode": null, + "seed": null + } + }, + "title": "Runs", + "type": "object" + } + }, + "required": [ + "name", + "include" + ], + "title": "omicsintegrator2Model", + "type": "object" + }, + "omicsintegrator2RunModel": { + "additionalProperties": false, + "properties": { + "w": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "default": 5, + "description": "Omega: the weight of the edges connecting the dummy node to the nodes selected by dummyMode", + "title": "W" + }, + "b": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "default": 1, + "description": "Beta: scaling factor of prizes", + "title": "B" + }, + "g": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "type": "number" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "default": 3, + "description": "Gamma: multiplicative edge penalty from degree of endpoints", + "title": "G" + }, + "noise": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Standard Deviation of the gaussian noise added to edges in Noisy Edges Randomizations.", + "title": "Noise" + }, + "noisy_edges": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "An integer specifying how many times to add noise to the given edge values and re-run.", + "title": "Noisy Edges" + }, + "random_terminals": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "An integer specifying how many times to apply your given prizes to random nodes in the interactome and re-run", + "title": "Random Terminals" + }, + "dummy_mode": { + "anyOf": [ + { + "$ref": "#/$defs/spras__omicsintegrator2__DummyMode" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/$defs/spras__omicsintegrator2__DummyMode" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Tells the program which nodes in the interactome to connect the dummy node to. (default: terminals)\n \"terminals\" = connect to all terminals\n \"others\" = connect to all nodes except for terminals\n \"all\" = connect to all nodes in the interactome.", + "title": "Dummy Mode" + }, + "seed": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The random seed to use for this run.", + "title": "Seed" + } + }, + "title": "omicsintegrator2RunModel", + "type": "object" + }, + "pathlinkerModel": { + "additionalProperties": false, + "properties": { + "name": { + "const": "pathlinker", + "title": "Name", + "type": "string" + }, + "include": { + "title": "Include", + "type": "boolean" + }, + "runs": { + "additionalProperties": { + "$ref": "#/$defs/pathlinkerRunModel" + }, + "default": { + "default": { + "k": 100 + } + }, + "title": "Runs", + "type": "object" + } + }, + "required": [ + "name", + "include" + ], + "title": "pathlinkerModel", + "type": "object" + }, + "pathlinkerRunModel": { + "additionalProperties": false, + "properties": { + "k": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "type": "integer" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "default": 100, + "description": "Number of paths", + "title": "K" + } + }, + "title": "pathlinkerRunModel", + "type": "object" + }, + "responsenetModel": { + "additionalProperties": false, + "properties": { + "name": { + "const": "responsenet", + "title": "Name", + "type": "string" + }, + "include": { + "title": "Include", + "type": "boolean" + }, + "runs": { + "additionalProperties": { + "$ref": "#/$defs/responsenetRunModel" + }, + "default": { + "default": { + "gamma": 10 + } + }, + "title": "Runs", + "type": "object" + } + }, + "required": [ + "name", + "include" + ], + "title": "responsenetModel", + "type": "object" + }, + "responsenetRunModel": { + "additionalProperties": false, + "properties": { + "gamma": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "type": "integer" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "default": 10, + "description": "The 'size' of the graph. The higher gamma is, the more flow\nis encouraged to start from the source nodes.", + "title": "Gamma" + } + }, + "title": "responsenetRunModel", + "type": "object" + }, + "rwrModel": { + "additionalProperties": false, + "properties": { + "name": { + "const": "rwr", + "title": "Name", + "type": "string" + }, + "include": { + "title": "Include", + "type": "boolean" + }, + "runs": { + "additionalProperties": { + "$ref": "#/$defs/rwrRunModel" + }, + "title": "Runs", + "type": "object" + } + }, + "required": [ + "name", + "include", + "runs" + ], + "title": "rwrModel", + "type": "object" + }, + "rwrRunModel": { + "additionalProperties": false, + "properties": { + "threshold": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "type": "integer" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "The number of nodes to return", + "title": "Threshold" + }, + "alpha": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The chance of a restart during the random walk", + "title": "Alpha" + } + }, + "required": [ + "threshold" + ], + "title": "rwrRunModel", + "type": "object" + }, + "spras__omicsintegrator1__DummyMode": { + "enum": [ + "terminals", + "all", + "others", + "file" + ], + "title": "DummyMode", + "type": "string" + }, + "spras__omicsintegrator2__DummyMode": { + "enum": [ + "terminals", + "others", + "all" + ], + "title": "DummyMode", + "type": "string" + }, + "strwrModel": { + "additionalProperties": false, + "properties": { + "name": { + "const": "strwr", + "title": "Name", + "type": "string" + }, + "include": { + "title": "Include", + "type": "boolean" + }, + "runs": { + "additionalProperties": { + "$ref": "#/$defs/strwrRunModel" + }, + "title": "Runs", + "type": "object" + } + }, + "required": [ + "name", + "include", + "runs" + ], + "title": "strwrModel", + "type": "object" + }, + "strwrRunModel": { + "additionalProperties": false, + "properties": { + "threshold": { + "anyOf": [ + { + "type": "integer" + }, + { + "items": { + "type": "integer" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "The number of nodes to return", + "title": "Threshold" + }, + "alpha": { + "anyOf": [ + { + "type": "number" + }, + { + "items": { + "anyOf": [ + { + "type": "number" + }, + { + "type": "null" + } + ] + }, + "type": "array" + }, + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The chance of a restart during the random walk", + "title": "Alpha" + } + }, + "required": [ + "threshold" + ], + "title": "strwrRunModel", + "type": "object" + } + }, + "additionalProperties": false, + "properties": { + "containers": { + "$ref": "#/$defs/ContainerSettings" + }, + "hash_length": { + "default": 7, + "description": "The length of the hash used to identify a parameter combination", + "title": "Hash Length", + "type": "integer" + }, + "algorithms": { + "items": { + "discriminator": { + "mapping": { + "allpairs": "#/$defs/allpairsModel", + "bowtiebuilder": "#/$defs/bowtiebuilderModel", + "domino": "#/$defs/dominoModel", + "meo": "#/$defs/meoModel", + "mincostflow": "#/$defs/mincostflowModel", + "omicsintegrator1": "#/$defs/omicsintegrator1Model", + "omicsintegrator2": "#/$defs/omicsintegrator2Model", + "pathlinker": "#/$defs/pathlinkerModel", + "responsenet": "#/$defs/responsenetModel", + "rwr": "#/$defs/rwrModel", + "strwr": "#/$defs/strwrModel" + }, + "propertyName": "name" + }, + "oneOf": [ + { + "$ref": "#/$defs/allpairsModel" + }, + { + "$ref": "#/$defs/bowtiebuilderModel" + }, + { + "$ref": "#/$defs/dominoModel" + }, + { + "$ref": "#/$defs/meoModel" + }, + { + "$ref": "#/$defs/mincostflowModel" + }, + { + "$ref": "#/$defs/omicsintegrator1Model" + }, + { + "$ref": "#/$defs/omicsintegrator2Model" + }, + { + "$ref": "#/$defs/pathlinkerModel" + }, + { + "$ref": "#/$defs/responsenetModel" + }, + { + "$ref": "#/$defs/rwrModel" + }, + { + "$ref": "#/$defs/strwrModel" + } + ] }, "title": "Algorithms", "type": "array" diff --git a/util/update_schema.py b/util/update_schema.py index c6a7bedca..cb5e6992a 100644 --- a/util/update_schema.py +++ b/util/update_schema.py @@ -10,4 +10,4 @@ from spras.config.schema import RawConfig config_schema = RawConfig.model_json_schema() -Path('config/schema.json').write_text(json.dumps(config_schema, indent=2)) +Path('config', 'schema.json').write_text(json.dumps(config_schema, indent=2))