Skip to content

Commit

Permalink
Change network parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
nickjcroucher committed Mar 11, 2024
1 parent f5ec728 commit e8cb660
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion PopPUNK/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,10 @@ def extractReferences(G, dbOrder, outPrefix, outSuffix = '', type_isolate = None
# Make a graph of the component from the overall graph
vertices_in_component = component_assignments[component_assignments['labels']==component]['vertex']
references_in_component = vertices_in_component[vertices_in_component.isin(reference_indices)].values
G_component_df = G_df[G_df['source'].isin(vertices_in_component) & G_df['destination'].isin(vertices_in_component)]
if 'src' in G_df.columns:
G_component_df = G_df[G_df['src'].isin(vertices_in_component) & G_df['dst'].isin(vertices_in_component)]
else:
G_component_df = G_df[G_df['source'].isin(vertices_in_component) & G_df['destination'].isin(vertices_in_component)]
G_component = cugraph.Graph()
G_component.from_cudf_edgelist(G_component_df)
# Find single shortest path from a reference to all other nodes in the component
Expand Down

0 comments on commit e8cb660

Please sign in to comment.