Result Handlers (indra_network_search.result_handler)

Handles the aggregation of results from the IndraNetworkSearchAPI

The result manager deals with things like:

  • Stopping path iteration when timeout is reached

  • Keeping count of number of paths returned

  • Filtering results when it’s not done in the algorithm

class indra_network_search.result_handler.BreadthFirstSearchResultManager(path_generator, graph, filter_options, source, target, reverse, timeout=30)[source]

Handles results from bfs_search

class indra_network_search.result_handler.DijkstraResultManager(path_generator, graph, filter_options, source, target, reverse, timeout=30, hash_blacklist=None)[source]

Handles results from open_dijkstra_search

class indra_network_search.result_handler.MultiInteractorsResultManager(path_generator, graph, input_nodes, filter_options, downstream, timeout=30)[source]

Handles results from pathfinding.direct_multi_interactors

get_results()[source]

Execute the result assembly with the loaded generator

Return type:

MultiInteractorsResults

Returns:

Results for direct_multi_interactors as a BaseModel

class indra_network_search.result_handler.OntologyResultManager(path_generator, graph, filter_options, source, target)[source]

Handles results from shared_parents

get_results()[source]

Execute the result assembly with the loaded generator

Return type:

OntologyResults

Returns:

Results for shared_parents as a BaseModel

class indra_network_search.result_handler.SharedInteractorsResultManager(path_generator, filter_options, graph, source, target, is_targets_query)[source]

Handles results from shared_interactors, both up and downstream

downstream is True for shared targets and False for shared regulators

get_results()[source]

Execute the result assembly with the loaded generator

Return type:

SharedInteractorsResults

Returns:

Results for shared_interactors as a BaseModel

class indra_network_search.result_handler.ShortestSimplePathsResultManager(path_generator, graph, filter_options, source, target, timeout=30, hash_blacklist=None)[source]

Handles results from shortest_simple_paths

class indra_network_search.result_handler.SubgraphResultManager(path_generator, graph, filter_options, original_nodes, nodes_in_graph, not_in_graph, ev_limit=10, timeout=590)[source]

Handles results from get_subgraph_edges

get_results()[source]

Execute the result assembly with the loaded generator

Return type:

SubgraphResults

Returns:

Results for get_subgraph_edges as a BaseModel