aboutsummaryrefslogtreecommitdiff
path: root/scripts/create_sra_metadata/create_sra_metadata.py
diff options
context:
space:
mode:
authorAndreaGuarracino2020-11-11 11:43:50 +0100
committerAndreaGuarracino2020-11-11 11:43:50 +0100
commit8d3e9971edebcf6ae3ef80cddf2fe2142c628875 (patch)
tree719b82c111658d42aa47d40a738dfbe21c84436c /scripts/create_sra_metadata/create_sra_metadata.py
parentd6aa323b6fc7a82e45cc1df51fc72c2d547146eb (diff)
downloadbh20-seq-resource-8d3e9971edebcf6ae3ef80cddf2fe2142c628875.tar.gz
bh20-seq-resource-8d3e9971edebcf6ae3ef80cddf2fe2142c628875.tar.lz
bh20-seq-resource-8d3e9971edebcf6ae3ef80cddf2fe2142c628875.zip
create_sra_metadata script doesn't trick the quality control about missing date aymore
Diffstat (limited to 'scripts/create_sra_metadata/create_sra_metadata.py')
-rw-r--r--scripts/create_sra_metadata/create_sra_metadata.py14
1 files changed, 10 insertions, 4 deletions
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: