TCT.TCT_pathfinder

TCT.TCT_pathfinder.build_query_graph(start_node_id, end_node_id, start_node_categories=None, end_node_categories=None, constraints_path=None)[source]

start_node_categories and end_node_categories are lists of categories.

TCT.TCT_pathfinder.generate_score_results(results, method='infores')[source]

Generates a score dict, and a list of “analyses”. method can be ‘infores’ or ‘edges’

TCT.TCT_pathfinder.parse_results_for_pathfinder(start_node_id: str, end_node_id: str, result1: dict, result2: dict, start_node_categories=None, end_node_categories=None, get_node_info=True, scoring_method='infores')[source]

Converts the results of two TRAPI queries into the same general json format as the other pathfinder APIs. scoring_method is how the node scores are generated, and could be ‘infores’ or ‘edges’.

TCT.TCT_pathfinder.pathfinder(input_node1_id: str, input_node2_id: str, intermediate_categories: list, APInames, metaKG, API_predicates, scoring_method='infores')[source]

Returns a Pathfinder output for the given pair of nodes. scoring_method could be ‘infores’ or ‘edges’.