Skip to content

Commit

Permalink
update analysis alias in update_metadata_spreadsheet
Browse files Browse the repository at this point in the history
  • Loading branch information
apriltuesday committed Aug 3, 2023
1 parent 05ca0c6 commit e199906
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions eva_submission/eload_submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit e199906

Please sign in to comment.