From 8dbf0bfc7f6f9c46e71a3035e18633ef71f050f9 Mon Sep 17 00:00:00 2001 From: Sara Schulte <sara.schulte@hhu.de> Date: Wed, 23 Nov 2022 14:59:47 +0100 Subject: [PATCH] Bug fix for graph drawing with pydot --- HOGVAX/draw_hog.py | 2 +- HOGVAX/hogvax.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/HOGVAX/draw_hog.py b/HOGVAX/draw_hog.py index 8327267..23b238e 100644 --- a/HOGVAX/draw_hog.py +++ b/HOGVAX/draw_hog.py @@ -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 diff --git a/HOGVAX/hogvax.py b/HOGVAX/hogvax.py index 6089062..edeb38b 100644 --- a/HOGVAX/hogvax.py +++ b/HOGVAX/hogvax.py @@ -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 -- GitLab