{ "$schema": "https://json-schema.org/draft-07/schema", "$id": "http://standards.ncats.io/operation/1.0.0/schema", "anyOf": [ { "$ref": "#/$defs/OperationAnnotate" }, { "$ref": "#/$defs/OperationAnnotateEdges" }, { "$ref": "#/$defs/OperationAnnotateNodes" }, { "$ref": "#/$defs/OperationBind" }, { "$ref": "#/$defs/OperationCompleteResults" }, { "$ref": "#/$defs/OperationEnrichResults" }, { "$ref": "#/$defs/OperationFill" }, { "$ref": "#/$defs/OperationFilterKgraph" }, { "$ref": "#/$defs/OperationFilterKgraphContinuousKedgeAttribute" }, { "$ref": "#/$defs/OperationFilterKgraphDiscreteKedgeAttribute" }, { "$ref": "#/$defs/OperationFilterKgraphDiscreteKnodeAttribute" }, { "$ref": "#/$defs/OperationFilterKgraphOrphans" }, { "$ref": "#/$defs/OperationFilterKgraphPercentile" }, { "$ref": "#/$defs/OperationFilterKgraphStdDev" }, { "$ref": "#/$defs/OperationFilterKgraphTopN" }, { "$ref": "#/$defs/OperationFilterResults" }, { "$ref": "#/$defs/OperationFilterResultsTopN" }, { "$ref": "#/$defs/OperationLookup" }, { "$ref": "#/$defs/OperationOverlay" }, { "$ref": "#/$defs/OperationOverlayComputeJaccard" }, { "$ref": "#/$defs/OperationOverlayComputeNgd" }, { "$ref": "#/$defs/OperationOverlayConnectKnodes" }, { "$ref": "#/$defs/OperationOverlayFisherExactTest" }, { "$ref": "#/$defs/OperationRestate" }, { "$ref": "#/$defs/OperationScore" }, { "$ref": "#/$defs/OperationSortResults" }, { "$ref": "#/$defs/OperationSortResultsEdgeAttribute" }, { "$ref": "#/$defs/OperationSortResultsNodeAttribute" }, { "$ref": "#/$defs/OperationSortResultsScore" } ], "$defs": { "OperationAnnotate": { "type": "object", "properties": { "id": { "type": "string", "enum": [ "annotate" ] }, "parameters": {} }, "required": [ "id" ], "additionalProperties": false }, "OperationAnnotateEdges": { "type": "object", "properties": { "id": { "type": "string", "enum": [ "annotate_edges" ] }, "parameters": { "type": "object", "properties": { "attributes": { "description": "A list of attributes to annotate the edges with. If not included then all available data will be annotated.", "type": "array", "items": { "type": "string" }, "example": [ "pmids" ] } } } }, "required": [ "id" ], "additionalProperties": false }, "OperationAnnotateNodes": { "type": "object", "properties": { "id": { "type": "string", "enum": [ "annotate_nodes" ] }, "parameters": { "type": "object", "properties": { "attributes": { "description": "A list of attributes to annotate the nodes with. If not included then all available data will be annotated.", "type": "array", "items": { "type": "string" }, "example": [ "pmids" ] } } } }, "required": [ "id" ], "additionalProperties": false }, "OperationBind": { "type": "object", "properties": { "id": { "type": "string", "enum": [ "bind" ] }, "parameters": {} }, "required": [ "id" ], "additionalProperties": false }, "OperationCompleteResults": { "type": "object", "properties": { "id": { "type": "string", "enum": [ "complete_results" ] }, "parameters": {} }, "required": [ "id" ], "additionalProperties": false }, "OperationEnrichResults": { "type": "object", "properties": { "id": { "type": "string", "enum": [ "enrich_results" ] }, "parameters": { "type": "object", "properties": { "pvalue_threshold": { "description": "The cutoff p-value for enrichment.", "type": "number", "example": "1e-7", "minimum": 0, "maximum": 1, "default": "1e-6" }, "qnode_keys": { "description": "If specified, then only knodes bound to these qnodes will be examined for enrichment and combination.", "type": "array", "items": { "type": "string" }, "example": [ "n01" ] } } } }, "required": [ "id" ], "additionalProperties": false }, "OperationFill": { "type": "object", "properties": { "id": { "type": "string", "enum": [ "fill" ] }, "parameters": { "type": "object", "oneOf": [ { "properties": { "allowlist": { "type": "array", "items": { "type": "string" }, "description": "List of knowledge providers/sources that may be used to provide knowledge.", "example": [ "icees" ], "minLength": 1 } }, "additionalProperties": false }, { "properties": { "denylist": { "type": "array", "items": { "type": "string" }, "description": "List of knowledge providers/sources that may NOT be used to provide knowledge.", "example": [ "ctd" ], "minLength": 1 } }, "additionalProperties": false } ] } }, "required": [ "id" ], "additionalProperties": false }, "OperationFilterKgraph": { "type": "object", "properties": { "id": { "type": "string", "enum": [ "filter_kgraph" ] }, "parameters": {} }, "required": [ "id" ], "additionalProperties": false }, "OperationFilterKgraphContinuousKedgeAttribute": { "type": "object", "properties": { "id": { "type": "string", "enum": [ "filter_kgraph_continuous_kedge_attribute" ] }, "parameters": { "type": "object", "properties": { "edge_attribute": { "description": "The name of the edge attribute to filter on.", "type": "string", "example": "normalized_google_distance" }, "threshold": { "description": "The value to compare attribute values to.", "type": "number", "example": 1.2 }, "remove_above_or_below": { "description": "Indicates whether to remove above or below the given threshold.", "type": "string", "enum": [ "above", "below" ] }, "qedge_keys": { "description": "This indicates if you only want to remove edges with specific edge_keys. If not provided or empty, all edges will be filtered on.", "type": "array", "items": { "type": "string" }, "example": [ "e01" ] }, "qnode_keys": { "description": "This indicates if you only want nodes corresponding to a specific list of qnode_keys to be removed. If not provided or empty, no nodes will be removed when filtering. Allows us to know what to do with the nodes connected to edges that are removed.", "type": "array", "items": { "type": "string" }, "example": [ "n01" ], "default": [] } }, "required": [ "edge_attribute", "threshold", "remove_above_or_below" ] } }, "required": [ "id", "parameters" ], "additionalProperties": false }, "OperationFilterKgraphDiscreteKedgeAttribute": { "type": "object", "properties": { "id": { "type": "string", "enum": [ "filter_kgraph_discrete_kedge_attribute" ] }, "parameters": { "type": "object", "properties": { "edge_attribute": { "description": "The name of the edge attribute to filter on.", "type": "string", "example": "provided_by" }, "remove_value": { "description": "The value for which all edges containing this value in the specified edge_attribute should be removed.", "example": "infores:semmeddb" }, "qedge_keys": { "description": "This indicates if you only want to remove edges with specific edge_keys. If not provided or empty, all edges will be filtered on.", "type": "array", "items": { "type": "string" }, "example": [ "e01" ] }, "qnode_keys": { "description": "This indicates if you only want nodes corresponding to a specific list of qnode_keys to be removed. If not provided or empty, no nodes will be removed when filtering. Allows us to know what to do with the nodes connected to edges that are removed", "type": "array", "items": { "type": "string" }, "example": [ "n01" ], "default": [] } }, "required": [ "edge_attribute", "remove_value" ] } }, "required": [ "id", "parameters" ], "additionalProperties": false }, "OperationFilterKgraphDiscreteKnodeAttribute": { "type": "object", "properties": { "id": { "type": "string", "enum": [ "filter_kgraph_discrete_knode_attribute" ] }, "parameters": { "type": "object", "properties": { "node_attribute": { "description": "The name of the node attribute to filter on.", "type": "string", "example": "molecule_type" }, "remove_value": { "description": "The value for which all edges containing this value in the specified edge_attribute should be removed.", "example": "small_molecule" }, "qnode_keys": { "description": "This indicates if you only want to remove nodes corresponding to a specific list of qnode_keys to be removed. If not provided or empty, all nodes will be considered when filtering.", "type": "array", "items": { "type": "string" }, "example": [ "n01" ] } }, "required": [ "node_attribute", "remove_value" ] } }, "required": [ "id", "parameters" ], "additionalProperties": false }, "OperationFilterKgraphOrphans": { "type": "object", "properties": { "id": { "type": "string", "enum": [ "filter_kgraph_orphans" ] }, "parameters": {} }, "required": [ "id" ], "additionalProperties": false }, "OperationFilterKgraphPercentile": { "type": "object", "properties": { "id": { "type": "string", "enum": [ "filter_kgraph_percentile" ] }, "parameters": { "type": "object", "properties": { "edge_attribute": { "description": "The name of the edge attribute to filter on.", "type": "string", "example": "normalized_google_distance" }, "threshold": { "description": "The percentile to threshold on.", "type": "number", "example": 96.8, "minimum": 0, "maximum": 100, "default": 95 }, "remove_above_or_below": { "description": "Indicates whether to remove above or below the given threshold.", "type": "string", "enum": [ "above", "below" ], "default": "below" }, "qedge_keys": { "description": "This indicates if you only want to filter on specific edge_keys. If not provided or empty, all edges will be filtered on.", "type": "array", "items": { "type": "string" }, "example": [ "e01" ] }, "qnode_keys": { "description": "This indicates if you only want nodes corresponding to a specific list of qnode_keys to be removed. If not provided or empty, no nodes will be removed when filtering. Allows us to know what to do with the nodes connected to edges that are removed.", "type": "array", "items": { "type": "string" }, "example": [ "n01" ], "default": [] } }, "required": [ "edge_attribute" ] } }, "required": [ "id", "parameters" ], "additionalProperties": false }, "OperationFilterKgraphStdDev": { "type": "object", "properties": { "id": { "type": "string", "enum": [ "filter_kgraph_std_dev" ] }, "parameters": { "type": "object", "properties": { "edge_attribute": { "description": "The name of the edge attribute to filter on.", "type": "string", "example": "normalized_google_distance" }, "num_sigma": { "description": "The number of standard deviations to threshold on.", "type": "number", "example": 1.2, "minimum": 0, "default": 1 }, "remove_above_or_below": { "description": "Indictes whether to remove above or below the given threshold.", "type": "string", "enum": [ "above", "below" ], "default": "below" }, "plus_or_minus_std_dev": { "description": "Indicate whether or not the threshold should be found using plus or minus the standard deviation. E.g. when plus_or_minus_std_dev is set to plus will set the cutoff for filtering as the mean + num_sigma * std_dev while setting plus_or_minus_std_dev to minus will set the cutoff as the mean - num_sigma * std_dev.", "type": "string", "enum": [ "plus", "minus" ], "default": "plus" }, "qedge_keys": { "description": "This indicates if you only want to filter on specific edge_keys. If not provided or empty, all edges will be filtered on.", "type": "array", "items": { "type": "string" }, "example": [ "e01" ] }, "qnode_keys": { "description": "This indicates if you only want nodes corresponding to a specific list of qnode_keys to be removed. If not provided or empty, no nodes will be removed when filtering.", "type": "array", "items": { "type": "string" }, "example": [ "n01" ], "default": [] } }, "required": [ "edge_attribute" ] } }, "required": [ "id", "parameters" ], "additionalProperties": false }, "OperationFilterKgraphTopN": { "type": "object", "properties": { "id": { "type": "string", "enum": [ "filter_kgraph_top_n" ] }, "parameters": { "type": "object", "properties": { "edge_attribute": { "description": "The name of the edge attribute to filter on.", "type": "string", "example": "normalized_google_distance" }, "max_edges": { "description": "The number of edges to keep.", "type": "integer", "example": 10, "minimum": 0, "default": 50 }, "keep_top_or_bottom": { "description": "Indicate whether or not the the top or bottom n values should be kept.", "type": "string", "enum": [ "top", "bottom" ], "default": "top" }, "qedge_keys": { "description": "This indicates if you only want to filter on specific edge_keys. If not provided or empty, all edges will be filtered on.", "type": "array", "items": { "type": "string" }, "example": [ "e01" ] }, "qnode_keys": { "description": "This indicates if you only want nodes corresponding to a specific list of qnode_keys to be removed. If not provided or empty, no nodes will be removed when filtering. Allows us to know what to do with the nodes connected to edges that are removed.", "type": "array", "items": { "type": "string" }, "example": [ "n01" ], "default": [] } }, "required": [ "edge_attribute" ] } }, "required": [ "id", "parameters" ], "additionalProperties": false }, "OperationFilterResults": { "type": "object", "properties": { "id": { "type": "string", "enum": [ "filter_results" ] }, "parameters": {} }, "required": [ "id" ], "additionalProperties": false }, "OperationFilterResultsTopN": { "type": "object", "properties": { "id": { "type": "string", "enum": [ "filter_results_top_n" ] }, "parameters": { "type": "object", "properties": { "max_results": { "description": "The maximum number of results to return.", "type": "integer", "minimum": 0, "example": 50 } }, "required": [ "max_results" ] } }, "required": [ "id", "parameters" ], "additionalProperties": false }, "OperationLookup": { "type": "object", "properties": { "id": { "type": "string", "enum": [ "lookup" ] }, "parameters": {} }, "required": [ "id" ], "additionalProperties": false }, "OperationOverlay": { "type": "object", "properties": { "id": { "type": "string", "enum": [ "overlay" ] }, "parameters": {} }, "required": [ "id" ], "additionalProperties": false }, "OperationOverlayComputeJaccard": { "type": "object", "properties": { "id": { "type": "string", "enum": [ "overlay_compute_jaccard" ] }, "parameters": { "type": "object", "properties": { "intermediate_node_key": { "description": "A qnode key specifying the intermediate node.", "type": "string", "example": "n1" }, "end_node_keys": { "description": "A list of qnode keys specifying the ending nodes.", "type": "array", "items": { "type": "string" }, "example": [ "n0", "n2" ] }, "virtual_relation_label": { "description": "The key of the query graph edge that corresponds to the knowledge graph edges that were added by this operation.", "type": "string", "example": "J1" } }, "required": [ "intermediate_node_key", "end_node_keys", "virtual_relation_label" ] } }, "required": [ "id", "parameters" ], "additionalProperties": false }, "OperationOverlayComputeNgd": { "type": "object", "properties": { "id": { "type": "string", "enum": [ "overlay_compute_ngd" ] }, "parameters": { "type": "object", "properties": { "virtual_relation_label": { "description": "An label to help identify the virtual edge in the relation field", "type": "string", "example": "NGD1" }, "qnode_keys": { "description": "A list of qnode keys to overlay pairwise edges onto. Must be be a list of at least 2 valid qnodes.", "type": "array", "items": { "type": "string" }, "example": [ "n00", "n01" ] } }, "required": [ "virtual_relation_label", "qnode_keys" ] } }, "required": [ "id", "parameters" ], "additionalProperties": false }, "OperationOverlayConnectKnodes": { "type": "object", "properties": { "id": { "type": "string", "enum": [ "overlay_connect_knodes" ] }, "parameters": {} }, "required": [ "id" ], "additionalProperties": false }, "OperationOverlayFisherExactTest": { "type": "object", "properties": { "id": { "type": "string", "enum": [ "overlay_fisher_exact_test" ] }, "parameters": { "type": "object", "properties": { "subject_qnode_key": { "description": "A specific subject query node id.", "type": "string", "example": "n1" }, "object_qnode_key": { "description": "A specific object query node id.", "type": "string", "example": "n2" }, "virtual_relation_label": { "description": "An label to help identify the virtual edge.", "type": "string", "example": "f1" }, "rel_edge_key": { "description": "A specific Qedge id connected to both subject nodes and object nodes in message KG (optional, otherwise all edges connected to both subject nodes and object nodes in message KG are considered).", "type": "string", "example": "e01" } }, "required": [ "subject_qnode_key", "object_qnode_key", "virtual_relation_label" ] } }, "required": [ "id", "parameters" ], "additionalProperties": false }, "OperationRestate": { "type": "object", "properties": { "id": { "type": "string", "enum": [ "restate" ] }, "parameters": {} }, "required": [ "id" ], "additionalProperties": false }, "OperationScore": { "type": "object", "properties": { "id": { "type": "string", "enum": [ "score" ] }, "parameters": {} }, "required": [ "id" ], "additionalProperties": false }, "OperationSortResults": { "type": "object", "properties": { "id": { "type": "string", "enum": [ "sort_results" ] }, "parameters": {} }, "required": [ "id" ], "additionalProperties": false }, "OperationSortResultsEdgeAttribute": { "type": "object", "properties": { "id": { "type": "string", "enum": [ "sort_results_edge_attribute" ] }, "parameters": { "type": "object", "properties": { "edge_attribute": { "description": "The name of the edge attribute to order by.", "type": "string", "example": "normalized_google_distance" }, "ascending_or_descending": { "description": "Indicates whether results should be sorted in ascending or descending order.", "type": "string", "enum": [ "ascending", "descending" ] }, "qedge_keys": { "description": "This indicates if you only want to consider edges with specific edge_keys. If not provided or empty, all edges will be looked at.", "type": "array", "items": { "type": "string" }, "example": [ "e01" ] } }, "required": [ "edge_attribute", "ascending_or_descending" ] } }, "required": [ "id", "parameters" ], "additionalProperties": false }, "OperationSortResultsNodeAttribute": { "type": "object", "properties": { "id": { "type": "string", "enum": [ "sort_results_node_attribute" ] }, "parameters": { "type": "object", "properties": { "node_attribute": { "description": "The name of the node attribute to order by.", "type": "string", "example": "normalized_google_distance" }, "ascending_or_descending": { "description": "Indicates whether results should be sorted in ascending or descending order.", "type": "string", "enum": [ "ascending", "descending" ] }, "qnode_keys": { "description": "This indicates if you only want to consider nodes with specific node_keys. If not provided or empty, all nodes will be looked at.", "type": "array", "items": { "type": "string" }, "example": [ "e01" ] } }, "required": [ "node_attribute", "ascending_or_descending" ] } }, "required": [ "id", "parameters" ], "additionalProperties": false }, "OperationSortResultsScore": { "type": "object", "properties": { "id": { "type": "string", "enum": [ "sort_results_score" ] }, "parameters": { "type": "object", "properties": { "ascending_or_descending": { "description": "Indicates whether results should be sorted in ascending or descending order.", "type": "string", "enum": [ "ascending", "descending" ] } }, "required": [ "ascending_or_descending" ] } }, "required": [ "id", "parameters" ], "additionalProperties": false } } }