Skip to content
Snippets Groups Projects
Commit 8dbf0bfc authored by Sara Schulte's avatar Sara Schulte
Browse files

Bug fix for graph drawing with pydot

parent e40e7845
No related branches found
No related tags found
No related merge requests found
......@@ -29,4 +29,4 @@ def draw_hog(hog, leaves, vals, key, draw_all=False):
attr = node.get_attributes()
node.set_label(node.get_name() + ', ' + attr['string'] + ', ' + attr['interval_size'])
dot.write_png('peptides_output/' + key + '_colored_graph.png')
\ No newline at end of file
dot.write_png(key)
\ No newline at end of file
......@@ -60,6 +60,8 @@ def main():
args = get_parser().parse_args()
if args.outdir:
if '/' not in args.outdir:
args.outdir = args.outdir + '/'
if not os.path.exists(args.outdir):
os.mkdir(args.outdir)
......@@ -69,7 +71,7 @@ def main():
pep_count = len(peptides)
drawing_enabled = False
if pep_count < 30:
if pep_count <= 30:
print('Number of peptides below 30 -> drawing enabled')
drawing_enabled = True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment