From d35363996ce49da6c638ce768027f3a97881c2fa Mon Sep 17 00:00:00 2001 From: AndreaGuarracino Date: Sat, 6 Jun 2020 17:29:01 +0200 Subject: fixed collection_location when it is not present in the dictionary terms --- scripts/from_genbank_to_fasta_and_yaml.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/from_genbank_to_fasta_and_yaml.py b/scripts/from_genbank_to_fasta_and_yaml.py index 9c8e9b9..befd64d 100755 --- a/scripts/from_genbank_to_fasta_and_yaml.py +++ b/scripts/from_genbank_to_fasta_and_yaml.py @@ -320,11 +320,9 @@ for path_metadata_xxx_xml in [os.path.join(dir_metadata, name_metadata_xxx_xml) GBQualifier_value_text = 'China: Hong Kong' if GBQualifier_value_text in term_to_uri_dict: - GBQualifier_value_text = term_to_uri_dict[GBQualifier_value_text] + info_for_yaml_dict['sample']['collection_location'] = term_to_uri_dict[GBQualifier_value_text] else: missing_value_list.append('\t'.join([accession_version, GBQualifier_name_text, GBQualifier_value_text])) - - info_for_yaml_dict['sample']['collection_location'] = GBQualifier_value_text elif GBQualifier_name_text == 'note': if 'additional_collection_information' in info_for_yaml_dict['sample']: info_for_yaml_dict['sample']['additional_collection_information'] += '; ' + GBQualifier_value_text -- cgit v1.2.3