aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreaGuarracino2020-07-10 15:39:02 +0200
committerAndreaGuarracino2020-07-10 15:39:02 +0200
commit2eab71a70b8630649303a9319e1baf9fa06f8ab4 (patch)
tree02d6fed548b09381ef2de611d83a89647bd0594a
parent8cb542fdf60273aec7ec107f8bc4896375381263 (diff)
downloadbh20-seq-resource-2eab71a70b8630649303a9319e1baf9fa06f8ab4.tar.gz
bh20-seq-resource-2eab71a70b8630649303a9319e1baf9fa06f8ab4.tar.lz
bh20-seq-resource-2eab71a70b8630649303a9319e1baf9fa06f8ab4.zip
metadata with missing host_species are not created
-rw-r--r--scripts/create_sra_metadata/create_sra_metadata.py5
1 files changed, 5 insertions, 0 deletions
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)