From 4ed5e24e6cc1dd8068e2391573ae2438acd32db2 Mon Sep 17 00:00:00 2001 From: Kendell Clement Date: Tue, 13 Sep 2022 14:12:11 -0400 Subject: [PATCH] print files in curr dir if Aggregate can't find files --- CRISPResso2/CRISPRessoAggregateCORE.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CRISPResso2/CRISPRessoAggregateCORE.py b/CRISPResso2/CRISPRessoAggregateCORE.py index a67de0ed..b66664da 100644 --- a/CRISPResso2/CRISPRessoAggregateCORE.py +++ b/CRISPResso2/CRISPRessoAggregateCORE.py @@ -842,6 +842,12 @@ def main(): quilt_plots_to_show) crispresso2_info['running_info']['report_location'] = report_filename crispresso2_info['running_info']['report_filename'] = os.path.basename(report_filename) + else: #no files successfully imported + files_in_curr_dir = os.listdir('.') + if len(files_in_curr_dir) > 15: + files_in_curr_dir = files_in_curr_dir[0:15] + files_in_curr_dir.append("(Complete listing truncated)") + info('No CRISPResso runs could be imported.\nFiles in current directory:\n\t' + "\n\t".join(files_in_curr_dir)) end_time = datetime.now() end_time_string = end_time.strftime('%Y-%m-%d %H:%M:%S')