Skip to content

Commit

Permalink
fix UniParc ID prefix clipping
Browse files Browse the repository at this point in the history
  • Loading branch information
oschwengers committed Jun 25, 2021
1 parent d751432 commit c861af8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions db-scripts/init-ups-ips.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ def is_taxon_child(child, LCA, taxonomy):
uniparc_id = uniparc_id.attrib['value'][3:]
else:
uniparc_id = rep_member_dbref.get('id', None) if rep_member_dbref.get('type', '') == 'UniParc ID' else None
if uniparc_id is not None:
uniparc_id = uniparc_id[3:]
conn.execute('INSERT INTO ups (hash, length, uniparc_id, uniref100_id) VALUES (?,?,?,?)', (seq_hash.digest(), length, uniparc_id, uniref100_id))
log_ups.info('INSERT INTO ups (hash, length, uniparc_id, uniref100_id) VALUES (%s,%s,%s,%s)', seq_hash_hexdigest, length, uniparc_id, uniref100_id)
db_updates += 1
Expand Down

0 comments on commit c861af8

Please sign in to comment.