Skip to content

Commit 1067acc

Browse files
committed
Corrected some errors in vizualize_assembly_graph_by_bin.py
1 parent e952c7a commit 1067acc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pipeline/vizualize_assembly_graph_by_bin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def getGraph(graph_file, paths_file):
111111
orientation = segment_string[-1]
112112
segment_tuple = (segment, orientation)
113113
scaffold_path_list.append(segment_tuple)
114-
if scaffold name in scaffold_paths:
114+
if scaffold_name in scaffold_paths:
115115
scaffold_paths[scaffold_name].extend(scaffold_path_list)
116116
else:
117117
scaffold_paths[scaffold_name] = scaffold_path_list
@@ -283,12 +283,12 @@ def bfs(graph, start_set):
283283
exit(1)
284284

285285
graph_filename = graph_file_path.split('/')[-1]
286-
if graph_filename != 'assembly_graph.gfa' and graph_filename != 'assembly_graph_with_scaffolds.gfa':
286+
if (graph_filename != 'assembly_graph.gfa' or graph_filename != 'assembly_graph.gfa.gz') and (graph_filename != 'assembly_graph_with_scaffolds.gfa' or graph_filename != 'assembly_graph_with_scaffolds.gfa.gz'):
287287
print('Error! You must provide either the file assembly_graph.gfa or assembly_graph_with_scaffolds.gfa as the graph file')
288288
exit(1)
289289

290290
# Check that a paths file is supplied if the graph file is assembly_graph.gfa
291-
if graph_filename == 'assembly_graph.gfa' and paths_file_path is None:
291+
if (graph_filename == 'assembly_graph.gfa' or graph_filename == 'assembly_graph.gfa.gz') and paths_file_path is None:
292292
print('Error! If you provide the file assembly_graph.gfa, you must also provide scaffolds.paths')
293293
exit(1)
294294

0 commit comments

Comments
 (0)