Commit f949a1e6 authored by Bertrand  NÉRON's avatar Bertrand NÉRON
Browse files

file containig system info could refer replicon which are not in replicon file

so skip these systems and log them
parent 2e8a3cdf
......@@ -179,13 +179,19 @@ def fill_db(server_uri, db_name, user, passwd, replicon_db, system_db, force_upd
secreton_db = server.get_or_create_db(db_name)
system_codes = system_db.keys()
print("number of documents:", len(system_codes), file=sys.stderr)
for syst_code in system_codes:
system = system_db[syst_code]
replicon = replicon_db[system.replicon]
replicon = replicon_db[system.replicon]
except KeyError:
print("ERROR Replicon {0} referenced in system annotation file is not present in replicon information file: replicon skipped")
secretion_system = SecretionSystem()
secretion_system._id = system.code
secretion_system.code = system.code
secretion_system.predicted_system = system.predicted_system
secretion_system.system_status = system.system_status
secretion_system.replicon = {'name':,
'ncbi_id': replicon.ncbi_id,
'taxid': replicon.taxid,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment