From ade6f728552abaa62b11b84596661faa5c727c08 Mon Sep 17 00:00:00 2001 From: Tim O'Donnell Date: Fri, 26 Jul 2024 15:29:48 -0400 Subject: [PATCH 1/3] add gene name to report xlsx and csv --- vaxrank/report.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vaxrank/report.py b/vaxrank/report.py index 9b4560f..e55e52c 100644 --- a/vaxrank/report.py +++ b/vaxrank/report.py @@ -426,6 +426,7 @@ def new_columns(): ("pos", []), ("ref", []), ("alt", []), + ("gene_name", []), ("variant_rank", []), ("peptide_rank", []), ("mutation_start", []), @@ -546,6 +547,7 @@ def make_csv_report( columns["pos"].append(variant.original_start) columns["ref"].append(variant.original_ref) columns["alt"].append(variant.original_alt) + columns["gene_name"].append(vaccine_peptide.mutant_protein_fragment.gene_name) columns["variant_rank"].append(i + 1) columns["peptide_rank"].append(j + 1) columns["amino_acids"].append(vaccine_peptide.mutant_protein_fragment.amino_acids) From 7dd3b180aeae5943b88442f1803fd76411b2da10 Mon Sep 17 00:00:00 2001 From: Tim O'Donnell Date: Fri, 26 Jul 2024 17:35:29 -0400 Subject: [PATCH 2/3] Call close not save --- vaxrank/report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vaxrank/report.py b/vaxrank/report.py index e55e52c..1cc9849 100644 --- a/vaxrank/report.py +++ b/vaxrank/report.py @@ -513,7 +513,7 @@ def make_minimal_neoepitope_report( worksheet.set_column('%s:%s' % ('G', 'G'), 30) worksheet.set_column('%s:%s' % ('H', 'H'), 9) worksheet.set_column('%s:%s' % ('I', 'I'), 18) - writer.save() + writer.close() logger.info('Wrote XLSX neoepitope report file to %s', excel_report_path) From 9d0cc7fcc6c2a06299e5e19b85d7662998491986 Mon Sep 17 00:00:00 2001 From: Tim O'Donnell Date: Sun, 28 Jul 2024 12:13:35 -0400 Subject: [PATCH 3/3] close not save --- vaxrank/report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vaxrank/report.py b/vaxrank/report.py index 1cc9849..8fe21aa 100644 --- a/vaxrank/report.py +++ b/vaxrank/report.py @@ -598,5 +598,5 @@ def make_csv_report( df.to_excel(writer, sheet_name=shortened_sheet_name, index=False) resize_columns(writer.sheets[shortened_sheet_name], 'A', 'C') - writer.save() + writer.close() logger.info('Wrote manufacturer XLSX file to %s', excel_report_path)