From e199906586b424d7946cb9de9dd7e544e9c2ec43 Mon Sep 17 00:00:00 2001 From: April Shen Date: Thu, 3 Aug 2023 12:50:30 +0100 Subject: [PATCH] update analysis alias in update_metadata_spreadsheet --- eva_submission/eload_submission.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/eva_submission/eload_submission.py b/eva_submission/eload_submission.py index d664669..c58b6cd 100755 --- a/eva_submission/eload_submission.py +++ b/eva_submission/eload_submission.py @@ -151,11 +151,19 @@ def update_metadata_spreadsheet(self, input_spreadsheet, output_spreadsheet=None elif self.eload not in project_row['Project Alias']: # Add the eload id to ensure that the project alias is unique project_row['Project Alias'] = self._unique_alias(project_row['Project Alias']) + + analysis_rows = reader.analysis + for analysis_row in analysis_rows: + if self.eload not in analysis_row['Analysis Alias']: + # Add the eload id to ensure that the analysis alias is unique + analysis_row['Analysis Alias'] = self._unique_alias(analysis_row['Analysis Alias']) + if output_spreadsheet: eva_xls_writer = EvaXlsxWriter(input_spreadsheet, output_spreadsheet) else: eva_xls_writer = EvaXlsxWriter(input_spreadsheet) eva_xls_writer.set_project(project_row) + eva_xls_writer.set_analysis(analysis_rows) eva_xls_writer.set_samples(sample_rows) eva_xls_writer.set_files(file_rows) eva_xls_writer.save()