From 0589c9ea6abbddf52292b80508346e15c98c9f26 Mon Sep 17 00:00:00 2001 From: napakalas Date: Tue, 26 Aug 2025 14:13:53 +1200 Subject: [PATCH] Support node lookup using both node and node['node'], allowing alias anatomical_node resolution (#159) --- mapmaker/properties/pathways.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mapmaker/properties/pathways.py b/mapmaker/properties/pathways.py index 84c3bac8..a211bc01 100644 --- a/mapmaker/properties/pathways.py +++ b/mapmaker/properties/pathways.py @@ -329,8 +329,8 @@ def list_to_tuple(obj): # remove the missing nodes: removed_nodes = [] - for node in connectivity_graph.nodes: - if node not in available_nodes: + for node, node_dict in connectivity_graph.nodes(data=True): + if node not in available_nodes and node_dict['node'] not in available_nodes: removed_nodes += [node] neighbors = list(connectivity_graph.neighbors(node)) predecessors = [n for n in neighbors if n == connectivity_graph.edges[(node, n)]['predecessor']]