Data Models (indra_network_search.data_models
)
This module contains all data models used in the repository. They are all built around the the Pydantic BaseModel.
This file contains data models for queries, results and arguments to algorithm functions.
- pydantic model indra_network_search.data_models.__init__.ApiOptions[source]
Options that determine API behaviour
Show JSON schema
{ "title": "ApiOptions", "description": "Options that determine API behaviour", "type": "object", "properties": { "sign": { "title": "Sign", "type": "integer" }, "fplx_expand": { "title": "Fplx Expand", "default": false, "type": "boolean" }, "user_timeout": { "title": "User Timeout", "default": false, "anyOf": [ { "type": "number" }, { "type": "boolean" } ] }, "two_way": { "title": "Two Way", "default": false, "type": "boolean" }, "shared_regulators": { "title": "Shared Regulators", "default": false, "type": "boolean" }, "format": { "title": "Format", "default": "json", "type": "string" } } }
- Fields:
-
field format:
Optional
[str
] = 'json'
-
field fplx_expand:
Optional
[bool
] = False
-
field sign:
Optional
[int
] = None
-
field two_way:
Optional
[bool
] = False
-
field user_timeout:
Union
[float
,bool
,None
] = False
- pydantic model indra_network_search.data_models.__init__.BreadthFirstSearchOptions[source]
Arguments for indra.explanation.pathfinding.bfs_search
Show JSON schema
{ "title": "BreadthFirstSearchOptions", "description": "Arguments for indra.explanation.pathfinding.bfs_search", "type": "object", "properties": { "source_node": { "title": "Source Node", "anyOf": [ { "type": "string" }, { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "string" }, { "type": "integer" } ] } ] }, "reverse": { "title": "Reverse", "default": false, "type": "boolean" }, "depth_limit": { "title": "Depth Limit", "default": 2, "type": "integer" }, "path_limit": { "title": "Path Limit", "type": "integer" }, "max_per_node": { "title": "Max Per Node", "default": 5, "type": "integer" }, "node_filter": { "title": "Node Filter", "type": "array", "items": { "type": "string" } }, "node_blacklist": { "title": "Node Blacklist", "type": "array", "items": { "type": "string" }, "uniqueItems": true }, "terminal_ns": { "title": "Terminal Ns", "type": "array", "items": { "type": "string" } }, "sign": { "title": "Sign", "type": "integer" }, "max_memory": { "title": "Max Memory", "default": 536870912, "type": "integer" }, "hashes": { "title": "Hashes", "type": "array", "items": { "type": "integer" } }, "strict_mesh_id_filtering": { "title": "Strict Mesh Id Filtering", "default": false, "type": "boolean" } }, "required": [ "source_node" ] }
- Fields:
-
field allow_edge:
Optional
[Callable
[[DiGraph
,Union
[str
,Tuple
[str
,int
]],Union
[str
,Tuple
[str
,int
]]],bool
]] = None
-
field depth_limit:
Optional
[int
] = 2
-
field edge_filter:
Optional
[Callable
[[DiGraph
,Union
[str
,Tuple
[str
,int
]],Union
[str
,Tuple
[str
,int
]]],bool
]] = None
-
field hashes:
Optional
[List
[int
]] = None
-
field max_memory:
Optional
[int
] = 536870912
-
field max_per_node:
Optional
[int
] = 5
-
field node_blacklist:
Optional
[Set
[str
]] = None
-
field node_filter:
Optional
[List
[str
]] = None
-
field path_limit:
Optional
[int
] = None
-
field reverse:
Optional
[bool
] = False
-
field sign:
Optional
[int
] = None
-
field source_node:
Union
[str
,Tuple
[str
,int
]] [Required]
-
field strict_mesh_id_filtering:
Optional
[bool
] = False
-
field terminal_ns:
Optional
[List
[str
]] = None
- pydantic model indra_network_search.data_models.__init__.DijkstraOptions[source]
Arguments for open_dijkstra_search
Show JSON schema
{ "title": "DijkstraOptions", "description": "Arguments for open_dijkstra_search", "type": "object", "properties": { "start": { "title": "Start", "anyOf": [ { "type": "string" }, { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "string" }, { "type": "integer" } ] } ] }, "reverse": { "title": "Reverse", "default": false, "type": "boolean" }, "path_limit": { "title": "Path Limit", "type": "integer" }, "hashes": { "title": "Hashes", "type": "array", "items": { "type": "integer" } }, "ignore_nodes": { "title": "Ignore Nodes", "type": "array", "items": { "type": "string" } }, "ignore_edges": { "title": "Ignore Edges", "type": "array", "items": { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "string" }, { "type": "string" } ] } }, "terminal_ns": { "title": "Terminal Ns", "type": "array", "items": { "type": "string" } }, "weight": { "title": "Weight", "type": "string" }, "const_c": { "title": "Const C", "default": 1, "type": "integer" }, "const_tk": { "title": "Const Tk", "default": 10, "type": "integer" } }, "required": [ "start" ] }
- Fields:
-
field const_c:
Optional
[int
] = 1
-
field const_tk:
Optional
[int
] = 10
-
field hashes:
Optional
[List
[int
]] = None
-
field ignore_edges:
Optional
[List
[Tuple
[str
,str
]]] = None
-
field ignore_nodes:
Optional
[List
[str
]] = None
-
field path_limit:
Optional
[int
] = None
-
field ref_counts_function:
Optional
[Callable
] = None
-
field reverse:
Optional
[bool
] = False
-
field start:
Union
[str
,Tuple
[str
,int
]] [Required]
-
field terminal_ns:
Optional
[List
[str
]] = None
-
field weight:
Optional
[str
] = None
- pydantic model indra_network_search.data_models.__init__.EdgeData[source]
Data for one single edge
Show JSON schema
{ "title": "EdgeData", "description": "Data for one single edge", "type": "object", "properties": { "edge": { "title": "Edge", "type": "array", "items": { "$ref": "#/definitions/Node" } }, "statements": { "title": "Statements", "type": "object", "additionalProperties": { "$ref": "#/definitions/StmtTypeSupport" } }, "belief": { "title": "Belief", "minimum": 0, "maximum": 1, "type": "number" }, "weight": { "title": "Weight", "minimum": 0, "type": "number" }, "context_weight": { "title": "Context Weight", "default": "N/A", "anyOf": [ { "type": "string" }, { "type": "number", "exclusiveMinimum": 0 }, { "enum": [ "N/A" ], "type": "string" } ] }, "z_score": { "title": "Z Score", "type": "number" }, "corr_weight": { "title": "Corr Weight", "exclusiveMinimum": 0.0, "type": "number" }, "sign": { "title": "Sign", "minimum": 0, "maximum": 1, "type": "integer" }, "db_url_edge": { "title": "Db Url Edge", "type": "string" }, "source_counts": { "title": "Source Counts", "default": {}, "type": "object", "additionalProperties": { "type": "integer" } } }, "required": [ "edge", "statements", "belief", "weight", "db_url_edge" ], "definitions": { "Node": { "title": "Node", "description": "Data for a node", "type": "object", "properties": { "name": { "title": "Name", "minLength": 1, "type": "string" }, "namespace": { "title": "Namespace", "minLength": 1, "type": "string" }, "identifier": { "title": "Identifier", "minLength": 1, "type": "string" }, "lookup": { "title": "Lookup", "minLength": 1, "type": "string" }, "sign": { "title": "Sign", "minimum": 0, "maximum": 1, "type": "integer" } }, "required": [ "namespace", "identifier" ] }, "StmtData": { "title": "StmtData", "description": "Data for one statement supporting an edge", "type": "object", "properties": { "stmt_type": { "title": "Stmt Type", "type": "string" }, "evidence_count": { "title": "Evidence Count", "minimum": 1, "type": "integer" }, "stmt_hash": { "title": "Stmt Hash", "anyOf": [ { "type": "integer" }, { "type": "string", "minLength": 1, "maxLength": 2083, "format": "uri" } ] }, "source_counts": { "title": "Source Counts", "type": "object", "additionalProperties": { "type": "integer" } }, "belief": { "title": "Belief", "minimum": 0.0, "maximum": 1.0, "type": "number" }, "curated": { "title": "Curated", "type": "boolean" }, "english": { "title": "English", "type": "string" }, "weight": { "title": "Weight", "type": "number" }, "residue": { "title": "Residue", "default": "", "type": "string" }, "position": { "title": "Position", "default": "", "type": "string" }, "initial_sign": { "title": "Initial Sign", "minimum": 0, "maximum": 1, "type": "integer" }, "db_url_hash": { "title": "Db Url Hash", "type": "string" } }, "required": [ "stmt_type", "evidence_count", "stmt_hash", "source_counts", "belief", "curated", "english", "db_url_hash" ] }, "StmtTypeSupport": { "title": "StmtTypeSupport", "description": "Data per statement type", "type": "object", "properties": { "stmt_type": { "title": "Stmt Type", "type": "string" }, "source_counts": { "title": "Source Counts", "default": {}, "type": "object", "additionalProperties": { "type": "integer" } }, "statements": { "title": "Statements", "type": "array", "items": { "$ref": "#/definitions/StmtData" } } }, "required": [ "stmt_type", "statements" ] } } }
- Fields:
belief (indra_network_search.data_models.__init__.ConstrainedFloatValue)
corr_weight (Optional[indra_network_search.data_models.__init__.ConstrainedFloatValue])
sign (Optional[indra_network_search.data_models.__init__.ConstrainedIntValue])
statements (Dict[str, indra_network_search.data_models.__init__.StmtTypeSupport])
weight (indra_network_search.data_models.__init__.ConstrainedFloatValue)
-
field belief:
ConstrainedFloatValue
[Required] - Constraints:
minimum = 0
maximum = 1
-
field context_weight:
Union
[str
,ConstrainedFloatValue
,Literal
['N/A'
]] = 'N/A'
-
field corr_weight:
Optional
[ConstrainedFloatValue
] = None - Constraints:
exclusiveMinimum = 0.0
-
field db_url_edge:
str
[Required]
-
field sign:
Optional
[ConstrainedIntValue
] = None - Constraints:
minimum = 0
maximum = 1
-
field source_counts:
Dict
[str
,int
] = {}
-
field statements:
Dict
[str
,StmtTypeSupport
] [Required]
-
field weight:
ConstrainedFloatValue
[Required] - Constraints:
minimum = 0
-
field z_score:
Optional
[float
] = None
- pydantic model indra_network_search.data_models.__init__.EdgeDataByHash[source]
Data for one single edge, with data keyed by hash
Show JSON schema
{ "title": "EdgeDataByHash", "description": "Data for one single edge, with data keyed by hash", "type": "object", "properties": { "edge": { "title": "Edge", "type": "array", "items": { "$ref": "#/definitions/Node" } }, "stmts": { "title": "Stmts", "type": "object", "additionalProperties": { "$ref": "#/definitions/StmtData" } }, "belief": { "title": "Belief", "type": "number" }, "weight": { "title": "Weight", "type": "number" }, "db_url_edge": { "title": "Db Url Edge", "type": "string" }, "url_by_type": { "title": "Url By Type", "type": "object", "additionalProperties": { "type": "string" } } }, "required": [ "edge", "stmts", "belief", "weight", "db_url_edge", "url_by_type" ], "definitions": { "Node": { "title": "Node", "description": "Data for a node", "type": "object", "properties": { "name": { "title": "Name", "minLength": 1, "type": "string" }, "namespace": { "title": "Namespace", "minLength": 1, "type": "string" }, "identifier": { "title": "Identifier", "minLength": 1, "type": "string" }, "lookup": { "title": "Lookup", "minLength": 1, "type": "string" }, "sign": { "title": "Sign", "minimum": 0, "maximum": 1, "type": "integer" } }, "required": [ "namespace", "identifier" ] }, "StmtData": { "title": "StmtData", "description": "Data for one statement supporting an edge", "type": "object", "properties": { "stmt_type": { "title": "Stmt Type", "type": "string" }, "evidence_count": { "title": "Evidence Count", "minimum": 1, "type": "integer" }, "stmt_hash": { "title": "Stmt Hash", "anyOf": [ { "type": "integer" }, { "type": "string", "minLength": 1, "maxLength": 2083, "format": "uri" } ] }, "source_counts": { "title": "Source Counts", "type": "object", "additionalProperties": { "type": "integer" } }, "belief": { "title": "Belief", "minimum": 0.0, "maximum": 1.0, "type": "number" }, "curated": { "title": "Curated", "type": "boolean" }, "english": { "title": "English", "type": "string" }, "weight": { "title": "Weight", "type": "number" }, "residue": { "title": "Residue", "default": "", "type": "string" }, "position": { "title": "Position", "default": "", "type": "string" }, "initial_sign": { "title": "Initial Sign", "minimum": 0, "maximum": 1, "type": "integer" }, "db_url_hash": { "title": "Db Url Hash", "type": "string" } }, "required": [ "stmt_type", "evidence_count", "stmt_hash", "source_counts", "belief", "curated", "english", "db_url_hash" ] } } }
- Fields:
-
field belief:
float
[Required]
-
field db_url_edge:
str
[Required]
-
field url_by_type:
Dict
[str
,str
] [Required]
-
field weight:
float
[Required]
- pydantic model indra_network_search.data_models.__init__.FilterOptions[source]
Options for filtering out nodes or edges
Show JSON schema
{ "title": "FilterOptions", "description": "Options for filtering out nodes or edges", "type": "object", "properties": { "stmt_filter": { "title": "Stmt Filter", "default": [], "type": "array", "items": { "type": "string" } }, "allowed_ns": { "title": "Allowed Ns", "default": [], "type": "array", "items": { "type": "string" } }, "node_blacklist": { "title": "Node Blacklist", "default": [], "type": "array", "items": { "type": "string" } }, "path_length": { "title": "Path Length", "type": "integer" }, "belief_cutoff": { "title": "Belief Cutoff", "default": 0.0, "type": "number" }, "curated_db_only": { "title": "Curated Db Only", "default": false, "type": "boolean" }, "max_paths": { "title": "Max Paths", "default": 50, "type": "integer" }, "cull_best_node": { "title": "Cull Best Node", "type": "integer" }, "weighted": { "title": "Weighted", "enum": [ "weight", "context_weight", "corr_weight" ], "type": "string" }, "context_weighted": { "title": "Context Weighted", "default": false, "type": "boolean" }, "overall_weighted": { "title": "Overall Weighted", "default": false, "type": "boolean" } } }
- Fields:
-
field allowed_ns:
List
[ConstrainedStrValue
] = []
-
field belief_cutoff:
float
= 0.0
-
field context_weighted:
bool
= False
-
field cull_best_node:
Optional
[int
] = None
-
field curated_db_only:
bool
= False
-
field max_paths:
int
= 50
-
field node_blacklist:
List
[str
] = []
-
field overall_weighted:
bool
= False
-
field path_length:
Optional
[int
] = None
-
field stmt_filter:
List
[ConstrainedStrValue
] = []
-
field weighted:
Optional
[Literal
['weight'
,'context_weight'
,'corr_weight'
]] = None
- pydantic model indra_network_search.data_models.__init__.MultiInteractorsOptions[source]
Multi interactors options
Show JSON schema
{ "title": "MultiInteractorsOptions", "description": "Multi interactors options", "type": "object", "properties": { "nodes": { "title": "Nodes", "type": "array", "items": { "type": "string" } }, "downstream": { "title": "Downstream", "type": "boolean" }, "allowed_ns": { "title": "Allowed Ns", "type": "array", "items": { "type": "string" } }, "stmt_types": { "title": "Stmt Types", "type": "array", "items": { "type": "string" } }, "source_filter": { "title": "Source Filter", "type": "array", "items": { "type": "string" } }, "max_results": { "title": "Max Results", "default": 50, "type": "integer" }, "hash_blacklist": { "title": "Hash Blacklist", "type": "array", "items": { "type": "integer" }, "uniqueItems": true }, "node_blacklist": { "title": "Node Blacklist", "type": "array", "items": { "type": "string" } }, "belief_cutoff": { "title": "Belief Cutoff", "default": 0.0, "type": "number" }, "curated_db_only": { "title": "Curated Db Only", "default": false, "type": "boolean" } }, "required": [ "nodes", "downstream" ] }
- Fields:
-
field allowed_ns:
Optional
[List
[str
]] = None
-
field belief_cutoff:
float
= 0.0
-
field curated_db_only:
bool
= False
-
field downstream:
bool
[Required]
-
field hash_blacklist:
Optional
[Set
[int
]] = None
-
field max_results:
int
= 50
-
field node_blacklist:
Optional
[List
[str
]] = None
-
field nodes:
List
[str
] [Required]
-
field source_filter:
Optional
[List
[str
]] = None
-
field stmt_types:
Optional
[List
[str
]] = None
- pydantic model indra_network_search.data_models.__init__.MultiInteractorsRestQuery[source]
Multi interactors rest query
Show JSON schema
{ "title": "MultiInteractorsRestQuery", "description": "Multi interactors rest query", "type": "object", "properties": { "nodes": { "title": "Nodes", "type": "array", "items": { "type": "string" } }, "downstream": { "title": "Downstream", "type": "boolean" }, "allowed_ns": { "title": "Allowed Ns", "type": "array", "items": { "type": "string", "minLength": 1 } }, "stmt_types": { "title": "Stmt Types", "type": "array", "items": { "type": "string", "minLength": 1 } }, "source_filter": { "title": "Source Filter", "type": "array", "items": { "type": "string", "minLength": 1 } }, "max_results": { "title": "Max Results", "default": 50, "type": "integer" }, "node_blacklist": { "title": "Node Blacklist", "type": "array", "items": { "type": "string" } }, "belief_cutoff": { "title": "Belief Cutoff", "default": 0.0, "type": "number" }, "curated_db_only": { "title": "Curated Db Only", "default": false, "type": "boolean" }, "timeout": { "title": "Timeout", "default": 30, "minimum": 5.0, "maximum": 120.0, "type": "number" } }, "required": [ "nodes", "downstream" ] }
- Fields:
allowed_ns (Optional[List[indra_network_search.data_models.__init__.ConstrainedStrValue]])
source_filter (Optional[List[indra_network_search.data_models.__init__.ConstrainedStrValue]])
stmt_types (Optional[List[indra_network_search.data_models.__init__.ConstrainedStrValue]])
timeout (indra_network_search.data_models.__init__.ConstrainedFloatValue)
-
field allowed_ns:
Optional
[List
[ConstrainedStrValue
]] = None
-
field belief_cutoff:
float
= 0.0
-
field curated_db_only:
bool
= False
-
field downstream:
bool
[Required]
-
field max_results:
int
= 50
-
field node_blacklist:
Optional
[List
[str
]] = None
-
field nodes:
List
[str
] [Required]
-
field source_filter:
Optional
[List
[ConstrainedStrValue
]] = None
-
field stmt_types:
Optional
[List
[ConstrainedStrValue
]] = None
-
field timeout:
ConstrainedFloatValue
= 30 - Constraints:
minimum = 5.0
maximum = 120.0
- pydantic model indra_network_search.data_models.__init__.MultiInteractorsResults[source]
Results post direct_multi_interactors
Show JSON schema
{ "title": "MultiInteractorsResults", "description": "Results post direct_multi_interactors", "type": "object", "properties": { "targets": { "title": "Targets", "type": "array", "items": { "$ref": "#/definitions/Node" } }, "regulators": { "title": "Regulators", "type": "array", "items": { "$ref": "#/definitions/Node" } }, "edge_data": { "title": "Edge Data", "default": [], "type": "array", "items": { "$ref": "#/definitions/EdgeData" } } }, "required": [ "targets", "regulators" ], "definitions": { "Node": { "title": "Node", "description": "Data for a node", "type": "object", "properties": { "name": { "title": "Name", "minLength": 1, "type": "string" }, "namespace": { "title": "Namespace", "minLength": 1, "type": "string" }, "identifier": { "title": "Identifier", "minLength": 1, "type": "string" }, "lookup": { "title": "Lookup", "minLength": 1, "type": "string" }, "sign": { "title": "Sign", "minimum": 0, "maximum": 1, "type": "integer" } }, "required": [ "namespace", "identifier" ] }, "StmtData": { "title": "StmtData", "description": "Data for one statement supporting an edge", "type": "object", "properties": { "stmt_type": { "title": "Stmt Type", "type": "string" }, "evidence_count": { "title": "Evidence Count", "minimum": 1, "type": "integer" }, "stmt_hash": { "title": "Stmt Hash", "anyOf": [ { "type": "integer" }, { "type": "string", "minLength": 1, "maxLength": 2083, "format": "uri" } ] }, "source_counts": { "title": "Source Counts", "type": "object", "additionalProperties": { "type": "integer" } }, "belief": { "title": "Belief", "minimum": 0.0, "maximum": 1.0, "type": "number" }, "curated": { "title": "Curated", "type": "boolean" }, "english": { "title": "English", "type": "string" }, "weight": { "title": "Weight", "type": "number" }, "residue": { "title": "Residue", "default": "", "type": "string" }, "position": { "title": "Position", "default": "", "type": "string" }, "initial_sign": { "title": "Initial Sign", "minimum": 0, "maximum": 1, "type": "integer" }, "db_url_hash": { "title": "Db Url Hash", "type": "string" } }, "required": [ "stmt_type", "evidence_count", "stmt_hash", "source_counts", "belief", "curated", "english", "db_url_hash" ] }, "StmtTypeSupport": { "title": "StmtTypeSupport", "description": "Data per statement type", "type": "object", "properties": { "stmt_type": { "title": "Stmt Type", "type": "string" }, "source_counts": { "title": "Source Counts", "default": {}, "type": "object", "additionalProperties": { "type": "integer" } }, "statements": { "title": "Statements", "type": "array", "items": { "$ref": "#/definitions/StmtData" } } }, "required": [ "stmt_type", "statements" ] }, "EdgeData": { "title": "EdgeData", "description": "Data for one single edge", "type": "object", "properties": { "edge": { "title": "Edge", "type": "array", "items": { "$ref": "#/definitions/Node" } }, "statements": { "title": "Statements", "type": "object", "additionalProperties": { "$ref": "#/definitions/StmtTypeSupport" } }, "belief": { "title": "Belief", "minimum": 0, "maximum": 1, "type": "number" }, "weight": { "title": "Weight", "minimum": 0, "type": "number" }, "context_weight": { "title": "Context Weight", "default": "N/A", "anyOf": [ { "type": "string" }, { "type": "number", "exclusiveMinimum": 0 }, { "enum": [ "N/A" ], "type": "string" } ] }, "z_score": { "title": "Z Score", "type": "number" }, "corr_weight": { "title": "Corr Weight", "exclusiveMinimum": 0.0, "type": "number" }, "sign": { "title": "Sign", "minimum": 0, "maximum": 1, "type": "integer" }, "db_url_edge": { "title": "Db Url Edge", "type": "string" }, "source_counts": { "title": "Source Counts", "default": {}, "type": "object", "additionalProperties": { "type": "integer" } } }, "required": [ "edge", "statements", "belief", "weight", "db_url_edge" ] } } }
- Fields:
- pydantic model indra_network_search.data_models.__init__.NetworkSearchQuery[source]
The query model for network searches
Show JSON schema
{ "title": "NetworkSearchQuery", "description": "The query model for network searches", "type": "object", "properties": { "source": { "title": "Source", "default": "", "type": "string" }, "target": { "title": "Target", "default": "", "type": "string" }, "stmt_filter": { "title": "Stmt Filter", "default": [], "type": "array", "items": { "type": "string" } }, "filter_curated": { "title": "Filter Curated", "default": true, "type": "boolean" }, "allowed_ns": { "title": "Allowed Ns", "default": [], "type": "array", "items": { "type": "string" } }, "node_blacklist": { "title": "Node Blacklist", "default": [], "type": "array", "items": { "type": "string" } }, "path_length": { "title": "Path Length", "type": "integer" }, "depth_limit": { "title": "Depth Limit", "default": 2, "type": "integer" }, "sign": { "title": "Sign", "minimum": 0, "maximum": 1, "type": "integer" }, "weighted": { "title": "Weighted", "default": "unweighted", "enum": [ "belief", "context", "z_score", "unweighted" ], "type": "string" }, "belief_cutoff": { "title": "Belief Cutoff", "default": 0.0, "anyOf": [ { "type": "number" }, { "type": "boolean" } ] }, "curated_db_only": { "title": "Curated Db Only", "default": false, "type": "boolean" }, "fplx_expand": { "title": "Fplx Expand", "default": false, "type": "boolean" }, "k_shortest": { "title": "K Shortest", "default": 50, "type": "integer" }, "max_per_node": { "title": "Max Per Node", "default": 5, "type": "integer" }, "cull_best_node": { "title": "Cull Best Node", "type": "integer" }, "mesh_ids": { "title": "Mesh Ids", "default": [], "type": "array", "items": { "type": "string" } }, "strict_mesh_id_filtering": { "title": "Strict Mesh Id Filtering", "default": false, "type": "boolean" }, "const_c": { "title": "Const C", "default": 1, "type": "integer" }, "const_tk": { "title": "Const Tk", "default": 10, "type": "integer" }, "user_timeout": { "title": "User Timeout", "default": 30, "anyOf": [ { "type": "number" }, { "type": "boolean" } ] }, "two_way": { "title": "Two Way", "default": false, "type": "boolean" }, "shared_regulators": { "title": "Shared Regulators", "default": false, "type": "boolean" }, "terminal_ns": { "title": "Terminal Ns", "default": [], "type": "array", "items": { "type": "string" } }, "format": { "title": "Format", "default": "json", "type": "string" } }, "additionalProperties": false }
- Config:
allow_mutation: bool = False
extra: Extra = forbid
- Fields:
allowed_ns (List[indra_network_search.data_models.__init__.ConstrainedStrValue])
sign (Optional[indra_network_search.data_models.__init__.ConstrainedIntValue])
source (indra_network_search.data_models.__init__.ConstrainedStrValue)
stmt_filter (List[indra_network_search.data_models.__init__.ConstrainedStrValue])
target (indra_network_search.data_models.__init__.ConstrainedStrValue)
weighted (typing_extensions.Literal[belief, context, z_score, unweighted])
- Validators:
-
field allowed_ns:
List
[ConstrainedStrValue
] = []
-
field belief_cutoff:
Union
[float
,bool
] = 0.0
-
field const_c:
int
= 1
-
field const_tk:
int
= 10
-
field cull_best_node:
Optional
[int
] = None - Validated by:
-
field curated_db_only:
bool
= False
-
field depth_limit:
int
= 2
-
field filter_curated:
bool
= True
-
field format:
str
= 'json'
-
field fplx_expand:
bool
= False
-
field k_shortest:
int
= 50
-
field max_per_node:
int
= 5 - Validated by:
-
field mesh_ids:
List
[str
] = []
-
field node_blacklist:
List
[str
] = []
-
field path_length:
Optional
[int
] = None - Validated by:
-
field sign:
Optional
[ConstrainedIntValue
] = None - Constraints:
minimum = 0
maximum = 1
-
field source:
ConstrainedStrValue
= ''
-
field stmt_filter:
List
[ConstrainedStrValue
] = []
-
field strict_mesh_id_filtering:
bool
= False
-
field target:
ConstrainedStrValue
= ''
-
field terminal_ns:
List
[str
] = []
-
field two_way:
bool
= False
-
field user_timeout:
Union
[float
,bool
] = 30
-
field weighted:
Literal
['belief'
,'context'
,'z_score'
,'unweighted'
] = 'unweighted'
- validator is_int_gt2 » cull_best_node[source]
Validate cull_best_node >= 2
- is_overall_weighted()[source]
Return True if this query is weighted
This method is used to determine if a weighted search needs to be done using either of shortest_simple_paths and open_dijkstra_search.
The exception to self.weighted not being None but still be unweighted is strict mesh id search.
- Return type:
bool
- validator is_pos_int » max_per_node[source]
Validate max_per_node >= 1 if given
- validator is_positive_int » path_length[source]
Validate path_length >= 1 if given
- pydantic model indra_network_search.data_models.__init__.Node[source]
Data for a node
Show JSON schema
{ "title": "Node", "description": "Data for a node", "type": "object", "properties": { "name": { "title": "Name", "minLength": 1, "type": "string" }, "namespace": { "title": "Namespace", "minLength": 1, "type": "string" }, "identifier": { "title": "Identifier", "minLength": 1, "type": "string" }, "lookup": { "title": "Lookup", "minLength": 1, "type": "string" }, "sign": { "title": "Sign", "minimum": 0, "maximum": 1, "type": "integer" } }, "required": [ "namespace", "identifier" ] }
- Fields:
identifier (indra_network_search.data_models.__init__.ConstrainedStrValue)
lookup (Optional[indra_network_search.data_models.__init__.ConstrainedStrValue])
name (Optional[indra_network_search.data_models.__init__.ConstrainedStrValue])
namespace (indra_network_search.data_models.__init__.ConstrainedStrValue)
sign (Optional[indra_network_search.data_models.__init__.ConstrainedIntValue])
-
field identifier:
ConstrainedStrValue
[Required] - Constraints:
minLength = 1
-
field lookup:
Optional
[ConstrainedStrValue
] = None - Constraints:
minLength = 1
-
field name:
Optional
[ConstrainedStrValue
] = None - Constraints:
minLength = 1
-
field namespace:
ConstrainedStrValue
[Required] - Constraints:
minLength = 1
-
field sign:
Optional
[ConstrainedIntValue
] = None - Constraints:
minimum = 0
maximum = 1
- pydantic model indra_network_search.data_models.__init__.OntologyOptions[source]
Arguments for indra_network_search.pathfinding.shared_parents
Show JSON schema
{ "title": "OntologyOptions", "description": "Arguments for indra_network_search.pathfinding.shared_parents", "type": "object", "properties": { "source_ns": { "title": "Source Ns", "type": "string" }, "source_id": { "title": "Source Id", "type": "string" }, "target_ns": { "title": "Target Ns", "type": "string" }, "target_id": { "title": "Target Id", "type": "string" }, "max_paths": { "title": "Max Paths", "default": 50, "type": "integer" }, "immediate_only": { "title": "Immediate Only", "default": false, "type": "boolean" }, "is_a_part_of": { "title": "Is A Part Of", "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, "required": [ "source_ns", "source_id", "target_ns", "target_id" ] }
- Fields:
-
field immediate_only:
Optional
[bool
] = False
-
field is_a_part_of:
Optional
[Set
[str
]] = None
-
field max_paths:
int
= 50
-
field source_id:
str
[Required]
-
field source_ns:
str
[Required]
-
field target_id:
str
[Required]
-
field target_ns:
str
[Required]
- pydantic model indra_network_search.data_models.__init__.OntologyResults[source]
Results for shared_parents
Show JSON schema
{ "title": "OntologyResults", "description": "Results for shared_parents", "type": "object", "properties": { "source": { "$ref": "#/definitions/Node" }, "target": { "$ref": "#/definitions/Node" }, "parents": { "title": "Parents", "type": "array", "items": { "$ref": "#/definitions/Node" } } }, "required": [ "source", "target", "parents" ], "definitions": { "Node": { "title": "Node", "description": "Data for a node", "type": "object", "properties": { "name": { "title": "Name", "minLength": 1, "type": "string" }, "namespace": { "title": "Namespace", "minLength": 1, "type": "string" }, "identifier": { "title": "Identifier", "minLength": 1, "type": "string" }, "lookup": { "title": "Lookup", "minLength": 1, "type": "string" }, "sign": { "title": "Sign", "minimum": 0, "maximum": 1, "type": "integer" } }, "required": [ "namespace", "identifier" ] } } }
- Fields:
- pydantic model indra_network_search.data_models.__init__.Path[source]
Results for a single path
Show JSON schema
{ "title": "Path", "description": "Results for a single path", "type": "object", "properties": { "path": { "title": "Path", "type": "array", "items": { "$ref": "#/definitions/Node" } }, "edge_data": { "title": "Edge Data", "type": "array", "items": { "$ref": "#/definitions/EdgeData" } } }, "required": [ "path", "edge_data" ], "definitions": { "Node": { "title": "Node", "description": "Data for a node", "type": "object", "properties": { "name": { "title": "Name", "minLength": 1, "type": "string" }, "namespace": { "title": "Namespace", "minLength": 1, "type": "string" }, "identifier": { "title": "Identifier", "minLength": 1, "type": "string" }, "lookup": { "title": "Lookup", "minLength": 1, "type": "string" }, "sign": { "title": "Sign", "minimum": 0, "maximum": 1, "type": "integer" } }, "required": [ "namespace", "identifier" ] }, "StmtData": { "title": "StmtData", "description": "Data for one statement supporting an edge", "type": "object", "properties": { "stmt_type": { "title": "Stmt Type", "type": "string" }, "evidence_count": { "title": "Evidence Count", "minimum": 1, "type": "integer" }, "stmt_hash": { "title": "Stmt Hash", "anyOf": [ { "type": "integer" }, { "type": "string", "minLength": 1, "maxLength": 2083, "format": "uri" } ] }, "source_counts": { "title": "Source Counts", "type": "object", "additionalProperties": { "type": "integer" } }, "belief": { "title": "Belief", "minimum": 0.0, "maximum": 1.0, "type": "number" }, "curated": { "title": "Curated", "type": "boolean" }, "english": { "title": "English", "type": "string" }, "weight": { "title": "Weight", "type": "number" }, "residue": { "title": "Residue", "default": "", "type": "string" }, "position": { "title": "Position", "default": "", "type": "string" }, "initial_sign": { "title": "Initial Sign", "minimum": 0, "maximum": 1, "type": "integer" }, "db_url_hash": { "title": "Db Url Hash", "type": "string" } }, "required": [ "stmt_type", "evidence_count", "stmt_hash", "source_counts", "belief", "curated", "english", "db_url_hash" ] }, "StmtTypeSupport": { "title": "StmtTypeSupport", "description": "Data per statement type", "type": "object", "properties": { "stmt_type": { "title": "Stmt Type", "type": "string" }, "source_counts": { "title": "Source Counts", "default": {}, "type": "object", "additionalProperties": { "type": "integer" } }, "statements": { "title": "Statements", "type": "array", "items": { "$ref": "#/definitions/StmtData" } } }, "required": [ "stmt_type", "statements" ] }, "EdgeData": { "title": "EdgeData", "description": "Data for one single edge", "type": "object", "properties": { "edge": { "title": "Edge", "type": "array", "items": { "$ref": "#/definitions/Node" } }, "statements": { "title": "Statements", "type": "object", "additionalProperties": { "$ref": "#/definitions/StmtTypeSupport" } }, "belief": { "title": "Belief", "minimum": 0, "maximum": 1, "type": "number" }, "weight": { "title": "Weight", "minimum": 0, "type": "number" }, "context_weight": { "title": "Context Weight", "default": "N/A", "anyOf": [ { "type": "string" }, { "type": "number", "exclusiveMinimum": 0 }, { "enum": [ "N/A" ], "type": "string" } ] }, "z_score": { "title": "Z Score", "type": "number" }, "corr_weight": { "title": "Corr Weight", "exclusiveMinimum": 0.0, "type": "number" }, "sign": { "title": "Sign", "minimum": 0, "maximum": 1, "type": "integer" }, "db_url_edge": { "title": "Db Url Edge", "type": "string" }, "source_counts": { "title": "Source Counts", "default": {}, "type": "object", "additionalProperties": { "type": "integer" } } }, "required": [ "edge", "statements", "belief", "weight", "db_url_edge" ] } } }
- Fields:
- pydantic model indra_network_search.data_models.__init__.PathResultData[source]
Results for any of the path algorithms
Show JSON schema
{ "title": "PathResultData", "description": "Results for any of the path algorithms", "type": "object", "properties": { "source": { "$ref": "#/definitions/Node" }, "target": { "$ref": "#/definitions/Node" }, "paths": { "title": "Paths", "type": "object", "additionalProperties": { "type": "array", "items": { "$ref": "#/definitions/Path" } } } }, "required": [ "paths" ], "definitions": { "Node": { "title": "Node", "description": "Data for a node", "type": "object", "properties": { "name": { "title": "Name", "minLength": 1, "type": "string" }, "namespace": { "title": "Namespace", "minLength": 1, "type": "string" }, "identifier": { "title": "Identifier", "minLength": 1, "type": "string" }, "lookup": { "title": "Lookup", "minLength": 1, "type": "string" }, "sign": { "title": "Sign", "minimum": 0, "maximum": 1, "type": "integer" } }, "required": [ "namespace", "identifier" ] }, "StmtData": { "title": "StmtData", "description": "Data for one statement supporting an edge", "type": "object", "properties": { "stmt_type": { "title": "Stmt Type", "type": "string" }, "evidence_count": { "title": "Evidence Count", "minimum": 1, "type": "integer" }, "stmt_hash": { "title": "Stmt Hash", "anyOf": [ { "type": "integer" }, { "type": "string", "minLength": 1, "maxLength": 2083, "format": "uri" } ] }, "source_counts": { "title": "Source Counts", "type": "object", "additionalProperties": { "type": "integer" } }, "belief": { "title": "Belief", "minimum": 0.0, "maximum": 1.0, "type": "number" }, "curated": { "title": "Curated", "type": "boolean" }, "english": { "title": "English", "type": "string" }, "weight": { "title": "Weight", "type": "number" }, "residue": { "title": "Residue", "default": "", "type": "string" }, "position": { "title": "Position", "default": "", "type": "string" }, "initial_sign": { "title": "Initial Sign", "minimum": 0, "maximum": 1, "type": "integer" }, "db_url_hash": { "title": "Db Url Hash", "type": "string" } }, "required": [ "stmt_type", "evidence_count", "stmt_hash", "source_counts", "belief", "curated", "english", "db_url_hash" ] }, "StmtTypeSupport": { "title": "StmtTypeSupport", "description": "Data per statement type", "type": "object", "properties": { "stmt_type": { "title": "Stmt Type", "type": "string" }, "source_counts": { "title": "Source Counts", "default": {}, "type": "object", "additionalProperties": { "type": "integer" } }, "statements": { "title": "Statements", "type": "array", "items": { "$ref": "#/definitions/StmtData" } } }, "required": [ "stmt_type", "statements" ] }, "EdgeData": { "title": "EdgeData", "description": "Data for one single edge", "type": "object", "properties": { "edge": { "title": "Edge", "type": "array", "items": { "$ref": "#/definitions/Node" } }, "statements": { "title": "Statements", "type": "object", "additionalProperties": { "$ref": "#/definitions/StmtTypeSupport" } }, "belief": { "title": "Belief", "minimum": 0, "maximum": 1, "type": "number" }, "weight": { "title": "Weight", "minimum": 0, "type": "number" }, "context_weight": { "title": "Context Weight", "default": "N/A", "anyOf": [ { "type": "string" }, { "type": "number", "exclusiveMinimum": 0 }, { "enum": [ "N/A" ], "type": "string" } ] }, "z_score": { "title": "Z Score", "type": "number" }, "corr_weight": { "title": "Corr Weight", "exclusiveMinimum": 0.0, "type": "number" }, "sign": { "title": "Sign", "minimum": 0, "maximum": 1, "type": "integer" }, "db_url_edge": { "title": "Db Url Edge", "type": "string" }, "source_counts": { "title": "Source Counts", "default": {}, "type": "object", "additionalProperties": { "type": "integer" } } }, "required": [ "edge", "statements", "belief", "weight", "db_url_edge" ] }, "Path": { "title": "Path", "description": "Results for a single path", "type": "object", "properties": { "path": { "title": "Path", "type": "array", "items": { "$ref": "#/definitions/Node" } }, "edge_data": { "title": "Edge Data", "type": "array", "items": { "$ref": "#/definitions/EdgeData" } } }, "required": [ "path", "edge_data" ] } } }
- Fields:
- pydantic model indra_network_search.data_models.__init__.Results[source]
The model wrapping all results from the NetworkSearchQuery
Show JSON schema
{ "title": "Results", "description": "The model wrapping all results from the NetworkSearchQuery", "type": "object", "properties": { "query_hash": { "title": "Query Hash", "type": "string" }, "time_limit": { "title": "Time Limit", "type": "number" }, "timed_out": { "title": "Timed Out", "type": "boolean" }, "hashes": { "title": "Hashes", "default": [], "type": "array", "items": { "type": "string" } }, "path_results": { "$ref": "#/definitions/PathResultData" }, "reverse_path_results": { "$ref": "#/definitions/PathResultData" }, "ontology_results": { "$ref": "#/definitions/OntologyResults" }, "shared_target_results": { "$ref": "#/definitions/SharedInteractorsResults" }, "shared_regulators_results": { "$ref": "#/definitions/SharedInteractorsResults" } }, "required": [ "query_hash", "time_limit", "timed_out" ], "definitions": { "Node": { "title": "Node", "description": "Data for a node", "type": "object", "properties": { "name": { "title": "Name", "minLength": 1, "type": "string" }, "namespace": { "title": "Namespace", "minLength": 1, "type": "string" }, "identifier": { "title": "Identifier", "minLength": 1, "type": "string" }, "lookup": { "title": "Lookup", "minLength": 1, "type": "string" }, "sign": { "title": "Sign", "minimum": 0, "maximum": 1, "type": "integer" } }, "required": [ "namespace", "identifier" ] }, "StmtData": { "title": "StmtData", "description": "Data for one statement supporting an edge", "type": "object", "properties": { "stmt_type": { "title": "Stmt Type", "type": "string" }, "evidence_count": { "title": "Evidence Count", "minimum": 1, "type": "integer" }, "stmt_hash": { "title": "Stmt Hash", "anyOf": [ { "type": "integer" }, { "type": "string", "minLength": 1, "maxLength": 2083, "format": "uri" } ] }, "source_counts": { "title": "Source Counts", "type": "object", "additionalProperties": { "type": "integer" } }, "belief": { "title": "Belief", "minimum": 0.0, "maximum": 1.0, "type": "number" }, "curated": { "title": "Curated", "type": "boolean" }, "english": { "title": "English", "type": "string" }, "weight": { "title": "Weight", "type": "number" }, "residue": { "title": "Residue", "default": "", "type": "string" }, "position": { "title": "Position", "default": "", "type": "string" }, "initial_sign": { "title": "Initial Sign", "minimum": 0, "maximum": 1, "type": "integer" }, "db_url_hash": { "title": "Db Url Hash", "type": "string" } }, "required": [ "stmt_type", "evidence_count", "stmt_hash", "source_counts", "belief", "curated", "english", "db_url_hash" ] }, "StmtTypeSupport": { "title": "StmtTypeSupport", "description": "Data per statement type", "type": "object", "properties": { "stmt_type": { "title": "Stmt Type", "type": "string" }, "source_counts": { "title": "Source Counts", "default": {}, "type": "object", "additionalProperties": { "type": "integer" } }, "statements": { "title": "Statements", "type": "array", "items": { "$ref": "#/definitions/StmtData" } } }, "required": [ "stmt_type", "statements" ] }, "EdgeData": { "title": "EdgeData", "description": "Data for one single edge", "type": "object", "properties": { "edge": { "title": "Edge", "type": "array", "items": { "$ref": "#/definitions/Node" } }, "statements": { "title": "Statements", "type": "object", "additionalProperties": { "$ref": "#/definitions/StmtTypeSupport" } }, "belief": { "title": "Belief", "minimum": 0, "maximum": 1, "type": "number" }, "weight": { "title": "Weight", "minimum": 0, "type": "number" }, "context_weight": { "title": "Context Weight", "default": "N/A", "anyOf": [ { "type": "string" }, { "type": "number", "exclusiveMinimum": 0 }, { "enum": [ "N/A" ], "type": "string" } ] }, "z_score": { "title": "Z Score", "type": "number" }, "corr_weight": { "title": "Corr Weight", "exclusiveMinimum": 0.0, "type": "number" }, "sign": { "title": "Sign", "minimum": 0, "maximum": 1, "type": "integer" }, "db_url_edge": { "title": "Db Url Edge", "type": "string" }, "source_counts": { "title": "Source Counts", "default": {}, "type": "object", "additionalProperties": { "type": "integer" } } }, "required": [ "edge", "statements", "belief", "weight", "db_url_edge" ] }, "Path": { "title": "Path", "description": "Results for a single path", "type": "object", "properties": { "path": { "title": "Path", "type": "array", "items": { "$ref": "#/definitions/Node" } }, "edge_data": { "title": "Edge Data", "type": "array", "items": { "$ref": "#/definitions/EdgeData" } } }, "required": [ "path", "edge_data" ] }, "PathResultData": { "title": "PathResultData", "description": "Results for any of the path algorithms", "type": "object", "properties": { "source": { "$ref": "#/definitions/Node" }, "target": { "$ref": "#/definitions/Node" }, "paths": { "title": "Paths", "type": "object", "additionalProperties": { "type": "array", "items": { "$ref": "#/definitions/Path" } } } }, "required": [ "paths" ] }, "OntologyResults": { "title": "OntologyResults", "description": "Results for shared_parents", "type": "object", "properties": { "source": { "$ref": "#/definitions/Node" }, "target": { "$ref": "#/definitions/Node" }, "parents": { "title": "Parents", "type": "array", "items": { "$ref": "#/definitions/Node" } } }, "required": [ "source", "target", "parents" ] }, "SharedInteractorsResults": { "title": "SharedInteractorsResults", "description": "Results for shared targets and shared regulators", "type": "object", "properties": { "source_data": { "title": "Source Data", "type": "array", "items": { "$ref": "#/definitions/EdgeData" } }, "target_data": { "title": "Target Data", "type": "array", "items": { "$ref": "#/definitions/EdgeData" } }, "downstream": { "title": "Downstream", "type": "boolean" } }, "required": [ "source_data", "target_data", "downstream" ] } } }
- Fields:
ontology_results (Optional[indra_network_search.data_models.__init__.OntologyResults])
path_results (Optional[indra_network_search.data_models.__init__.PathResultData])
reverse_path_results (Optional[indra_network_search.data_models.__init__.PathResultData])
shared_target_results (Optional[indra_network_search.data_models.__init__.SharedInteractorsResults])
-
field hashes:
List
[str
] = []
-
field ontology_results:
Optional
[OntologyResults
] = None
-
field path_results:
Optional
[PathResultData
] = None
-
field query_hash:
str
[Required]
-
field reverse_path_results:
Optional
[PathResultData
] = None
-
field time_limit:
float
[Required]
-
field timed_out:
bool
[Required]
Arguments for indra_network_search.pathfinding.shared_interactors
Show JSON schema
{ "title": "SharedInteractorsOptions", "description": "Arguments for indra_network_search.pathfinding.shared_interactors", "type": "object", "properties": { "source": { "title": "Source", "anyOf": [ { "type": "string" }, { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "string" }, { "type": "integer" } ] } ] }, "target": { "title": "Target", "anyOf": [ { "type": "string" }, { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "string" }, { "type": "integer" } ] } ] }, "allowed_ns": { "title": "Allowed Ns", "type": "array", "items": { "type": "string" } }, "stmt_types": { "title": "Stmt Types", "type": "array", "items": { "type": "string" } }, "source_filter": { "title": "Source Filter", "type": "array", "items": { "type": "string" } }, "max_results": { "title": "Max Results", "default": 50, "type": "integer" }, "regulators": { "title": "Regulators", "default": false, "type": "boolean" }, "sign": { "title": "Sign", "type": "integer" } }, "required": [ "source", "target" ] }
- Fields:
Results for shared targets and shared regulators
Show JSON schema
{ "title": "SharedInteractorsResults", "description": "Results for shared targets and shared regulators", "type": "object", "properties": { "source_data": { "title": "Source Data", "type": "array", "items": { "$ref": "#/definitions/EdgeData" } }, "target_data": { "title": "Target Data", "type": "array", "items": { "$ref": "#/definitions/EdgeData" } }, "downstream": { "title": "Downstream", "type": "boolean" } }, "required": [ "source_data", "target_data", "downstream" ], "definitions": { "Node": { "title": "Node", "description": "Data for a node", "type": "object", "properties": { "name": { "title": "Name", "minLength": 1, "type": "string" }, "namespace": { "title": "Namespace", "minLength": 1, "type": "string" }, "identifier": { "title": "Identifier", "minLength": 1, "type": "string" }, "lookup": { "title": "Lookup", "minLength": 1, "type": "string" }, "sign": { "title": "Sign", "minimum": 0, "maximum": 1, "type": "integer" } }, "required": [ "namespace", "identifier" ] }, "StmtData": { "title": "StmtData", "description": "Data for one statement supporting an edge", "type": "object", "properties": { "stmt_type": { "title": "Stmt Type", "type": "string" }, "evidence_count": { "title": "Evidence Count", "minimum": 1, "type": "integer" }, "stmt_hash": { "title": "Stmt Hash", "anyOf": [ { "type": "integer" }, { "type": "string", "minLength": 1, "maxLength": 2083, "format": "uri" } ] }, "source_counts": { "title": "Source Counts", "type": "object", "additionalProperties": { "type": "integer" } }, "belief": { "title": "Belief", "minimum": 0.0, "maximum": 1.0, "type": "number" }, "curated": { "title": "Curated", "type": "boolean" }, "english": { "title": "English", "type": "string" }, "weight": { "title": "Weight", "type": "number" }, "residue": { "title": "Residue", "default": "", "type": "string" }, "position": { "title": "Position", "default": "", "type": "string" }, "initial_sign": { "title": "Initial Sign", "minimum": 0, "maximum": 1, "type": "integer" }, "db_url_hash": { "title": "Db Url Hash", "type": "string" } }, "required": [ "stmt_type", "evidence_count", "stmt_hash", "source_counts", "belief", "curated", "english", "db_url_hash" ] }, "StmtTypeSupport": { "title": "StmtTypeSupport", "description": "Data per statement type", "type": "object", "properties": { "stmt_type": { "title": "Stmt Type", "type": "string" }, "source_counts": { "title": "Source Counts", "default": {}, "type": "object", "additionalProperties": { "type": "integer" } }, "statements": { "title": "Statements", "type": "array", "items": { "$ref": "#/definitions/StmtData" } } }, "required": [ "stmt_type", "statements" ] }, "EdgeData": { "title": "EdgeData", "description": "Data for one single edge", "type": "object", "properties": { "edge": { "title": "Edge", "type": "array", "items": { "$ref": "#/definitions/Node" } }, "statements": { "title": "Statements", "type": "object", "additionalProperties": { "$ref": "#/definitions/StmtTypeSupport" } }, "belief": { "title": "Belief", "minimum": 0, "maximum": 1, "type": "number" }, "weight": { "title": "Weight", "minimum": 0, "type": "number" }, "context_weight": { "title": "Context Weight", "default": "N/A", "anyOf": [ { "type": "string" }, { "type": "number", "exclusiveMinimum": 0 }, { "enum": [ "N/A" ], "type": "string" } ] }, "z_score": { "title": "Z Score", "type": "number" }, "corr_weight": { "title": "Corr Weight", "exclusiveMinimum": 0.0, "type": "number" }, "sign": { "title": "Sign", "minimum": 0, "maximum": 1, "type": "integer" }, "db_url_edge": { "title": "Db Url Edge", "type": "string" }, "source_counts": { "title": "Source Counts", "default": {}, "type": "object", "additionalProperties": { "type": "integer" } } }, "required": [ "edge", "statements", "belief", "weight", "db_url_edge" ] } } }
- Fields:
Return True if both source and target data is empty
- pydantic model indra_network_search.data_models.__init__.ShortestSimplePathOptions[source]
Arguments for indra.explanation.pathfinding.shortest_simple_paths
Show JSON schema
{ "title": "ShortestSimplePathOptions", "description": "Arguments for indra.explanation.pathfinding.shortest_simple_paths", "type": "object", "properties": { "source": { "title": "Source", "anyOf": [ { "type": "string" }, { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "string" }, { "type": "integer" } ] } ] }, "target": { "title": "Target", "anyOf": [ { "type": "string" }, { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "string" }, { "type": "integer" } ] } ] }, "weight": { "title": "Weight", "type": "string" }, "ignore_nodes": { "title": "Ignore Nodes", "type": "array", "items": { "type": "string" }, "uniqueItems": true }, "ignore_edges": { "title": "Ignore Edges", "type": "array", "items": { "type": "array", "minItems": 2, "maxItems": 2, "items": [ { "type": "string" }, { "type": "string" } ] }, "uniqueItems": true }, "hashes": { "title": "Hashes", "type": "array", "items": { "type": "integer" } }, "strict_mesh_id_filtering": { "title": "Strict Mesh Id Filtering", "default": false, "type": "boolean" }, "const_c": { "title": "Const C", "default": 1, "type": "integer" }, "const_tk": { "title": "Const Tk", "default": 10, "type": "integer" } }, "required": [ "source", "target" ] }
- Fields:
-
field const_c:
Optional
[int
] = 1
-
field const_tk:
Optional
[int
] = 10
-
field hashes:
Optional
[List
[int
]] = None
-
field ignore_edges:
Optional
[Set
[Tuple
[str
,str
]]] = None
-
field ignore_nodes:
Optional
[Set
[str
]] = None
-
field ref_counts_function:
Optional
[Callable
] = None
-
field source:
Union
[str
,Tuple
[str
,int
]] [Required]
-
field strict_mesh_id_filtering:
Optional
[bool
] = False
-
field target:
Union
[str
,Tuple
[str
,int
]] [Required]
-
field weight:
Optional
[str
] = None
- pydantic model indra_network_search.data_models.__init__.StmtData[source]
Data for one statement supporting an edge
Show JSON schema
{ "title": "StmtData", "description": "Data for one statement supporting an edge", "type": "object", "properties": { "stmt_type": { "title": "Stmt Type", "type": "string" }, "evidence_count": { "title": "Evidence Count", "minimum": 1, "type": "integer" }, "stmt_hash": { "title": "Stmt Hash", "anyOf": [ { "type": "integer" }, { "type": "string", "minLength": 1, "maxLength": 2083, "format": "uri" } ] }, "source_counts": { "title": "Source Counts", "type": "object", "additionalProperties": { "type": "integer" } }, "belief": { "title": "Belief", "minimum": 0.0, "maximum": 1.0, "type": "number" }, "curated": { "title": "Curated", "type": "boolean" }, "english": { "title": "English", "type": "string" }, "weight": { "title": "Weight", "type": "number" }, "residue": { "title": "Residue", "default": "", "type": "string" }, "position": { "title": "Position", "default": "", "type": "string" }, "initial_sign": { "title": "Initial Sign", "minimum": 0, "maximum": 1, "type": "integer" }, "db_url_hash": { "title": "Db Url Hash", "type": "string" } }, "required": [ "stmt_type", "evidence_count", "stmt_hash", "source_counts", "belief", "curated", "english", "db_url_hash" ] }
- Fields:
-
field belief:
ConstrainedFloatValue
[Required] - Constraints:
minimum = 0.0
maximum = 1.0
-
field curated:
bool
[Required]
-
field db_url_hash:
str
[Required]
-
field english:
str
[Required]
-
field evidence_count:
ConstrainedIntValue
[Required] - Constraints:
minimum = 1
-
field initial_sign:
Optional
[ConstrainedIntValue
] = None - Constraints:
minimum = 0
maximum = 1
-
field position:
Optional
[str
] = ''
-
field residue:
Optional
[str
] = ''
-
field source_counts:
Dict
[str
,int
] [Required]
-
field stmt_hash:
Union
[int
,HttpUrl
] [Required]
-
field stmt_type:
str
[Required]
-
field weight:
Optional
[float
] = None
- pydantic model indra_network_search.data_models.__init__.StmtTypeSupport[source]
Data per statement type
Show JSON schema
{ "title": "StmtTypeSupport", "description": "Data per statement type", "type": "object", "properties": { "stmt_type": { "title": "Stmt Type", "type": "string" }, "source_counts": { "title": "Source Counts", "default": {}, "type": "object", "additionalProperties": { "type": "integer" } }, "statements": { "title": "Statements", "type": "array", "items": { "$ref": "#/definitions/StmtData" } } }, "required": [ "stmt_type", "statements" ], "definitions": { "StmtData": { "title": "StmtData", "description": "Data for one statement supporting an edge", "type": "object", "properties": { "stmt_type": { "title": "Stmt Type", "type": "string" }, "evidence_count": { "title": "Evidence Count", "minimum": 1, "type": "integer" }, "stmt_hash": { "title": "Stmt Hash", "anyOf": [ { "type": "integer" }, { "type": "string", "minLength": 1, "maxLength": 2083, "format": "uri" } ] }, "source_counts": { "title": "Source Counts", "type": "object", "additionalProperties": { "type": "integer" } }, "belief": { "title": "Belief", "minimum": 0.0, "maximum": 1.0, "type": "number" }, "curated": { "title": "Curated", "type": "boolean" }, "english": { "title": "English", "type": "string" }, "weight": { "title": "Weight", "type": "number" }, "residue": { "title": "Residue", "default": "", "type": "string" }, "position": { "title": "Position", "default": "", "type": "string" }, "initial_sign": { "title": "Initial Sign", "minimum": 0, "maximum": 1, "type": "integer" }, "db_url_hash": { "title": "Db Url Hash", "type": "string" } }, "required": [ "stmt_type", "evidence_count", "stmt_hash", "source_counts", "belief", "curated", "english", "db_url_hash" ] } } }
- Fields:
-
field source_counts:
Dict
[str
,int
] = {}
-
field stmt_type:
str
[Required]
- pydantic model indra_network_search.data_models.__init__.SubgraphOptions[source]
Argument for indra_network_search.pathfinding.get_subgraph_edges
Show JSON schema
{ "title": "SubgraphOptions", "description": "Argument for indra_network_search.pathfinding.get_subgraph_edges", "type": "object", "properties": { "nodes": { "title": "Nodes", "type": "array", "items": { "$ref": "#/definitions/Node" } } }, "required": [ "nodes" ], "definitions": { "Node": { "title": "Node", "description": "Data for a node", "type": "object", "properties": { "name": { "title": "Name", "minLength": 1, "type": "string" }, "namespace": { "title": "Namespace", "minLength": 1, "type": "string" }, "identifier": { "title": "Identifier", "minLength": 1, "type": "string" }, "lookup": { "title": "Lookup", "minLength": 1, "type": "string" }, "sign": { "title": "Sign", "minimum": 0, "maximum": 1, "type": "integer" } }, "required": [ "namespace", "identifier" ] } } }
- pydantic model indra_network_search.data_models.__init__.SubgraphRestQuery[source]
Subgraph query
Show JSON schema
{ "title": "SubgraphRestQuery", "description": "Subgraph query", "type": "object", "properties": { "nodes": { "title": "Nodes", "minItems": 1, "maxItems": 4000, "type": "array", "items": { "$ref": "#/definitions/Node" } }, "timeout": { "title": "Timeout", "default": 590, "minimum": 1, "maximum": 590, "type": "number" } }, "required": [ "nodes" ], "definitions": { "Node": { "title": "Node", "description": "Data for a node", "type": "object", "properties": { "name": { "title": "Name", "minLength": 1, "type": "string" }, "namespace": { "title": "Namespace", "minLength": 1, "type": "string" }, "identifier": { "title": "Identifier", "minLength": 1, "type": "string" }, "lookup": { "title": "Lookup", "minLength": 1, "type": "string" }, "sign": { "title": "Sign", "minimum": 0, "maximum": 1, "type": "integer" } }, "required": [ "namespace", "identifier" ] } } }
- Fields:
-
field timeout:
ConstrainedFloatValue
= 590 - Constraints:
minimum = 1
maximum = 590
- pydantic model indra_network_search.data_models.__init__.SubgraphResults[source]
Results for get_subgraph_edges
Show JSON schema
{ "title": "SubgraphResults", "description": "Results for get_subgraph_edges", "type": "object", "properties": { "input_nodes": { "title": "Input Nodes", "type": "array", "items": { "$ref": "#/definitions/Node" } }, "not_in_graph": { "title": "Not In Graph", "type": "array", "items": { "$ref": "#/definitions/Node" } }, "available_nodes": { "title": "Available Nodes", "type": "array", "items": { "$ref": "#/definitions/Node" } }, "edges": { "title": "Edges", "type": "array", "items": { "$ref": "#/definitions/EdgeDataByHash" } } }, "required": [ "input_nodes", "not_in_graph", "available_nodes", "edges" ], "definitions": { "Node": { "title": "Node", "description": "Data for a node", "type": "object", "properties": { "name": { "title": "Name", "minLength": 1, "type": "string" }, "namespace": { "title": "Namespace", "minLength": 1, "type": "string" }, "identifier": { "title": "Identifier", "minLength": 1, "type": "string" }, "lookup": { "title": "Lookup", "minLength": 1, "type": "string" }, "sign": { "title": "Sign", "minimum": 0, "maximum": 1, "type": "integer" } }, "required": [ "namespace", "identifier" ] }, "StmtData": { "title": "StmtData", "description": "Data for one statement supporting an edge", "type": "object", "properties": { "stmt_type": { "title": "Stmt Type", "type": "string" }, "evidence_count": { "title": "Evidence Count", "minimum": 1, "type": "integer" }, "stmt_hash": { "title": "Stmt Hash", "anyOf": [ { "type": "integer" }, { "type": "string", "minLength": 1, "maxLength": 2083, "format": "uri" } ] }, "source_counts": { "title": "Source Counts", "type": "object", "additionalProperties": { "type": "integer" } }, "belief": { "title": "Belief", "minimum": 0.0, "maximum": 1.0, "type": "number" }, "curated": { "title": "Curated", "type": "boolean" }, "english": { "title": "English", "type": "string" }, "weight": { "title": "Weight", "type": "number" }, "residue": { "title": "Residue", "default": "", "type": "string" }, "position": { "title": "Position", "default": "", "type": "string" }, "initial_sign": { "title": "Initial Sign", "minimum": 0, "maximum": 1, "type": "integer" }, "db_url_hash": { "title": "Db Url Hash", "type": "string" } }, "required": [ "stmt_type", "evidence_count", "stmt_hash", "source_counts", "belief", "curated", "english", "db_url_hash" ] }, "EdgeDataByHash": { "title": "EdgeDataByHash", "description": "Data for one single edge, with data keyed by hash", "type": "object", "properties": { "edge": { "title": "Edge", "type": "array", "items": { "$ref": "#/definitions/Node" } }, "stmts": { "title": "Stmts", "type": "object", "additionalProperties": { "$ref": "#/definitions/StmtData" } }, "belief": { "title": "Belief", "type": "number" }, "weight": { "title": "Weight", "type": "number" }, "db_url_edge": { "title": "Db Url Edge", "type": "string" }, "url_by_type": { "title": "Url By Type", "type": "object", "additionalProperties": { "type": "string" } } }, "required": [ "edge", "stmts", "belief", "weight", "db_url_edge", "url_by_type" ] } } }
- Fields:
-
field edges:
List
[EdgeDataByHash
] [Required]
- indra_network_search.data_models.__init__.basemodel_in_iterable(basemodel, iterable, any_item, exclude=None)[source]
Test if a basemodel object is part of a collection
- Parameters:
basemodel (
BaseModel
) – A BaseModel to test membership in iterable foriterable (
Iterable
) – An iterable that contains objects to test for equality with basemodelany_item (
bool
) – If True, use any() when testing collections for equality, otherwise use all(), i.e. the collections must match exactlyexclude (
Optional
[Set
[str
]]) – A set of field names to exclude from the basemodels
- Return type:
bool
- Returns:
True if basemodel is found in the collection
- indra_network_search.data_models.__init__.basemodels_equal(basemodel, other_basemodel, any_item, exclude=None)[source]
Wrapper to test two basemodels for equality, can exclude irrelevant keys
- Parameters:
basemodel (
BaseModel
) – BaseModel to test against other_basemodelother_basemodel (
BaseModel
) – BaseModel to test against basemodelany_item (
bool
) – If True, use any() when testing collections for equality, otherwise use all(), i.e. the collections must match exactlyexclude (
Optional
[Set
[str
]]) – A set of field names to exclude from the basemodels
- Return type:
bool
- Returns:
True if the two models are equal