From 510ee2962c078a3ec5fc209d2691cc44cd8b6bcd Mon Sep 17 00:00:00 2001 From: AndrewQuijano Date: Wed, 1 Jan 2025 18:51:45 -0500 Subject: [PATCH] Remove images folder, make sure you get latest one --- run_treespace.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/run_treespace.py b/run_treespace.py index a26f319..00cbeba 100644 --- a/run_treespace.py +++ b/run_treespace.py @@ -2,6 +2,7 @@ import argparse import os +import shutil from os import listdir from os.path import isfile, join @@ -20,6 +21,8 @@ def analyze_generated_graphs(input_dir: str, is_newick: bool, draw_image: bool): list_of_network_files = [f for f in listdir(input_dir) if isfile(join(input_dir, f))] output_image_dir = os.path.join(input_dir, 'images') + if os.path.exists(output_image_dir): + shutil.rmtree(output_image_dir) os.makedirs(output_image_dir, exist_ok=True) # Create Headers of CSV results like answers.csv