diff options
author | AndreaGuarracino | 2020-07-07 22:07:35 +0200 |
---|---|---|
committer | AndreaGuarracino | 2020-07-07 22:07:35 +0200 |
commit | 9b1457763c08028179b0987d385d1fe879062b64 (patch) | |
tree | 081fb21af3deb27160e23f35a1b3cb968f36b87f /scripts/create_sra_metadata/create_sra_metadata.py | |
parent | 4e2ac9bdef97175f5d762c6e7f065a83512a3c40 (diff) | |
download | bh20-seq-resource-9b1457763c08028179b0987d385d1fe879062b64.tar.gz bh20-seq-resource-9b1457763c08028179b0987d385d1fe879062b64.tar.lz bh20-seq-resource-9b1457763c08028179b0987d385d1fe879062b64.zip |
if the technology is not found, the YAML file is not created; managed longer species strings
Diffstat (limited to 'scripts/create_sra_metadata/create_sra_metadata.py')
-rw-r--r-- | scripts/create_sra_metadata/create_sra_metadata.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/create_sra_metadata/create_sra_metadata.py b/scripts/create_sra_metadata/create_sra_metadata.py index 470980e..ef0d119 100644 --- a/scripts/create_sra_metadata/create_sra_metadata.py +++ b/scripts/create_sra_metadata/create_sra_metadata.py @@ -197,7 +197,6 @@ for i, EXPERIMENT_PACKAGE in enumerate(EXPERIMENT_PACKAGE_SET): if INSTRUMENT_MODEL in term_to_uri_dict: info_for_yaml_dict['technology']['sample_sequencing_technology'] = [term_to_uri_dict[INSTRUMENT_MODEL]] else: - info_for_yaml_dict['technology']['additional_technology_information'] = INSTRUMENT_MODEL missing_value_list.append('\t'.join([accession, 'sample_sequencing_technology', INSTRUMENT_MODEL])) #else: # print(accession, 'Missing INSTRUMENT_MODEL', info_for_yaml_dict) @@ -237,6 +236,10 @@ for i, EXPERIMENT_PACKAGE in enumerate(EXPERIMENT_PACKAGE_SET): info_for_yaml_dict['sample']['collection_date'] = '1970-01-01' info_for_yaml_dict['sample']['additional_collection_information'] = "The real 'collection_date' is missing" + if 'sample_sequencing_technology' not in info_for_yaml_dict['technology']: + print(accession, ' - technology not found') + continue + with open(os.path.join(dir_yaml, '{}.yaml'.format(accession)), 'w') as fw: json.dump(info_for_yaml_dict, fw, indent=2) |