Skip to content

Commit

Permalink
Prefix Cog and Ko ids with COG and KO.
Browse files Browse the repository at this point in the history
  • Loading branch information
njohner committed Nov 21, 2024
1 parent 83d0f0c commit fa6d6f1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions utils/export_loci_annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def get_tables(db_file, taxonid):
columns=["seqid", "cog"]).set_index("seqid")

cogs = loci.merge(cog_hits, left_index=True, right_index=True)
cogs["cog"] = cogs["cog"].map(lambda x: f"COG{x}")

query = ("SELECT sequence_hash_dictionnary.seqid, ko_hits.ko_id "
"FROM ko_hits INNER JOIN sequence_hash_dictionnary "
Expand All @@ -43,6 +44,9 @@ def get_tables(db_file, taxonid):
columns=["seqid", "ko"]).set_index("seqid")

kos = loci.merge(ko_hits, left_index=True, right_index=True)
kos["ko"] = kos["ko"].map(lambda x: f"KO{x}")

import pdb; pdb.set_trace()
return cogs, kos


Expand Down

0 comments on commit fa6d6f1

Please sign in to comment.