From 8d3e9971edebcf6ae3ef80cddf2fe2142c628875 Mon Sep 17 00:00:00 2001 From: AndreaGuarracino Date: Wed, 11 Nov 2020 11:43:50 +0100 Subject: create_sra_metadata script doesn't trick the quality control about missing date aymore --- scripts/create_sra_metadata/create_sra_metadata.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'scripts/create_sra_metadata/create_sra_metadata.py') diff --git a/scripts/create_sra_metadata/create_sra_metadata.py b/scripts/create_sra_metadata/create_sra_metadata.py index 59218e9..2aac0e5 100644 --- a/scripts/create_sra_metadata/create_sra_metadata.py +++ b/scripts/create_sra_metadata/create_sra_metadata.py @@ -270,12 +270,18 @@ for i, EXPERIMENT_PACKAGE in enumerate(EXPERIMENT_PACKAGE_SET): if Organization_Address is not None: info_for_yaml_dict['submitter']['lab_address'] = '; '.join([x.text for x in Organization_Address] + ['Postal code ' + Organization_Address.attrib['postal_code']]) - if 'collection_date' not in info_for_yaml_dict['sample']: - info_for_yaml_dict['sample']['collection_date'] = '1970-01-01' - info_for_yaml_dict['sample']['additional_collection_information'] = "The real 'collection_date' is missing" - + # Do not trick the quality control! + #if 'collection_date' not in info_for_yaml_dict['sample']: + # info_for_yaml_dict['sample']['collection_date'] = '1970-01-01' + # info_for_yaml_dict['sample']['additional_collection_information'] = "The real 'collection_date' is missing" # Check if mandatory fields are missing + if 'collection_date' not in info_for_yaml_dict['sample']: + # print(accession_version, ' - collection_date not found') + if accession not in not_created_accession_dict: + not_created_accession_dict[accession] = [] + not_created_accession_dict[accession].append('collection_date not found') + if 'sample_sequencing_technology' not in info_for_yaml_dict['technology']: # print(accession_version, ' - technology not found') if accession not in not_created_accession_dict: -- cgit v1.2.3