diff options
author | AndreaGuarracino | 2020-07-07 23:01:48 +0200 |
---|---|---|
committer | AndreaGuarracino | 2020-07-07 23:01:48 +0200 |
commit | f77e86dbb84baf8add3d7a71f8f06fb44a99507b (patch) | |
tree | 32d908d37f88a03614e8e866b3d5644a959c378b | |
parent | 9b1457763c08028179b0987d385d1fe879062b64 (diff) | |
download | bh20-seq-resource-f77e86dbb84baf8add3d7a71f8f06fb44a99507b.tar.gz bh20-seq-resource-f77e86dbb84baf8add3d7a71f8f06fb44a99507b.tar.lz bh20-seq-resource-f77e86dbb84baf8add3d7a71f8f06fb44a99507b.zip |
fix missing authors #91
-rwxr-xr-x | scripts/download_genbank_data/from_genbank_to_fasta_and_yaml.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/download_genbank_data/from_genbank_to_fasta_and_yaml.py b/scripts/download_genbank_data/from_genbank_to_fasta_and_yaml.py index 44308ed..cb94787 100755 --- a/scripts/download_genbank_data/from_genbank_to_fasta_and_yaml.py +++ b/scripts/download_genbank_data/from_genbank_to_fasta_and_yaml.py @@ -173,7 +173,9 @@ for path_metadata_xxx_xml in [os.path.join(dir_metadata, name_metadata_xxx_xml) # submitter info GBSeq_references = GBSeq.find('GBSeq_references') if GBSeq_references is not None: - info_for_yaml_dict['submitter']['authors'] = ["{}".format(x.text) for x in GBSeq_references.iter('GBAuthor')] + author_list = ["{}".format(x.text) for x in GBSeq_references.iter('GBAuthor')] + if len(author_list) > 0: + info_for_yaml_dict['submitter']['authors'] = author_list GBReference = GBSeq_references.find('GBReference') if GBReference is not None: |