@@ -68,7 +68,7 @@ def calculate_md5(file_path):
6868 return md5 .hexdigest ()
6969
7070
71- def get_files_info (file_to_upload , wf_short_name , wf_version , somatic_or_germline , normal_analysis , tumour_analysis ):
71+ def get_files_info (file_to_upload , wf_short_name , wf_version , somatic_or_germline , normal_analysis , tumour_analysis , date_str ):
7272 file_info = {
7373 'fileType' : 'VCF' if file_to_upload .endswith ('.vcf.gz' ) else file_to_upload .split ("." )[- 1 ].upper (),
7474 'fileSize' : calculate_size (file_to_upload ),
@@ -85,7 +85,6 @@ def get_files_info(file_to_upload, wf_short_name, wf_version, somatic_or_germli
8585 pass # should never happen
8686
8787 experimental_strategy = metadata ['experiment' ]['experimental_strategy' ].lower () if 'experimental_strategy' in metadata ['experiment' ] else metadata ['experiment' ]['library_strategy' ].lower ()
88- date_str = date .today ().strftime ("%Y%m%d" )
8988
9089 variant_type = ''
9190 if wf_short_name in (['sanger-wgs' , 'sanger-wxs' ]):
@@ -280,11 +279,12 @@ def main(args):
280279 }
281280
282281 analysis_type = 'variant_calling'
282+ date_str = date .today ().strftime ("%Y%m%d" )
283283 for f in args .files_to_upload :
284284 if f .endswith ('-supplement.tgz' ): analysis_type = 'variant_calling_supplement'
285285 if f .endswith ('_metrics.tgz' ): analysis_type = 'qc_metrics'
286286
287- file_info = get_files_info (f , args .wf_short_name , args .wf_version , somatic_or_germline , normal_analysis , tumour_analysis )
287+ file_info = get_files_info (f , args .wf_short_name , args .wf_version , somatic_or_germline , normal_analysis , tumour_analysis , date_str )
288288
289289 payload ['files' ].append (file_info )
290290
0 commit comments