From 2eab71a70b8630649303a9319e1baf9fa06f8ab4 Mon Sep 17 00:00:00 2001 From: AndreaGuarracino Date: Fri, 10 Jul 2020 15:39:02 +0200 Subject: metadata with missing host_species are not created --- scripts/create_sra_metadata/create_sra_metadata.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/create_sra_metadata/create_sra_metadata.py b/scripts/create_sra_metadata/create_sra_metadata.py index 10ac85b..a31bd36 100644 --- a/scripts/create_sra_metadata/create_sra_metadata.py +++ b/scripts/create_sra_metadata/create_sra_metadata.py @@ -242,6 +242,11 @@ for i, EXPERIMENT_PACKAGE in enumerate(EXPERIMENT_PACKAGE_SET): not_created_accession_list.append([accession, 'technology not found']) continue + if 'host_species' not in info_for_yaml_dict['host']: + #print(accession, ' - technology not found') + not_created_accession_list.append([accession, 'missing host species']) + continue + with open(os.path.join(dir_yaml, '{}.yaml'.format(accession)), 'w') as fw: json.dump(info_for_yaml_dict, fw, indent=2) -- cgit v1.2.3