From d466aad41d1983661b5dd811fbd4fddb28c63b0b Mon Sep 17 00:00:00 2001 From: iquasere Date: Wed, 8 Nov 2023 13:54:55 +0000 Subject: [PATCH] Intialize with these columns so if it has no rows, at least it has the columns to groupby --- recognizer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recognizer.py b/recognizer.py index 6bb80ce..77c37b6 100644 --- a/recognizer.py +++ b/recognizer.py @@ -848,7 +848,7 @@ def organize_results(file, output, resources_directory, databases, hmm_pgap, cdd timed_message("Organizing annotation results") i = 1 xlsx_report = pd.ExcelWriter(f'{output}/reCOGnizer_results.xlsx', engine='xlsxwriter') - all_reports = pd.DataFrame() + all_reports = pd.DataFrame(columns=['qseqid', 'DB ID']) # intialize with these columns so if it has no rows, at least it has the columns to groupby for db in databases: run_pipe_command(f'cat {output}/blast/{db}_*_aligned.blast', file=f'{output}/blast/{db}_aligned.blast') print(f'[{i}/{len(databases)}] Handling {db} annotation')