Skip to content

Commit

Permalink
Make logic consistent for partial graphs
Browse files Browse the repository at this point in the history
  • Loading branch information
nickjcroucher committed Nov 4, 2024
1 parent 3ab5079 commit 42b1c20
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions PopPUNK/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ def drawMST(mst, outPrefix, isolate_clustering, clustering_name, overwrite):
output=graph2_file_name, output_size=(3000, 3000))

def outputsForCytoscape(G, G_mst, isolate_names, clustering, outPrefix, epiCsv, queryList = None,
suffix = None, writeCsv = True, use_partial_query_graph = False):
suffix = None, writeCsv = True, use_partial_query_graph = None):
"""Write outputs for cytoscape. A graphml of the network, and CSV with metadata
Args:
Expand All @@ -536,8 +536,8 @@ def outputsForCytoscape(G, G_mst, isolate_names, clustering, outPrefix, epiCsv,
(default = None)
writeCsv (bool)
Whether to print CSV file to accompany network
use_partial_query_graph (bool)
Whether to optimise output for outputting only partial graphs
use_partial_query_graph (str)
File listing sequences to be included in output graph
"""

# Avoid circular import
Expand All @@ -556,7 +556,7 @@ def outputsForCytoscape(G, G_mst, isolate_names, clustering, outPrefix, epiCsv,
else:
suffix = suffix + '_cytoscape'
if use_partial_query_graph is None:
save_network(G, prefix = outPrefix, suffix = suffix, use_graphml = True)
save_network(G, prefix = outPrefix, suffix = suffix, use_graphml = True)

# Save each component too (useful for very large graphs)
component_assignments, component_hist = gt.label_components(G)
Expand Down

0 comments on commit 42b1c20

Please sign in to comment.