Skip to content

Commit

Permalink
Update embed script to remove Other types
Browse files Browse the repository at this point in the history
  • Loading branch information
althonos committed Mar 17, 2022
1 parent ac9faf6 commit 3cac963
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/embed/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ def load_mibig_records(path):
Bio.SeqIO.write(record, gbk, "genbank")
Bio.SeqIO.write(record, fna, "fasta")

types = ";".join(sorted(mibig_meta[bgc_id]["biosyn_class"]))
types = ";".join(sorted(ty for ty in mibig_meta[bgc_id]["biosyn_class"] if ty != "Other"))
if types == "Nucleoside": # fix bad annotation of BGC0000880 in MIBiG 1.3 JSON
types = "Other"
types = "Unknown"
print(record.id, bgc_id, insert_loc, insert_loc + len(bgc_gbk), types, file=tsv, sep="\t")

print("Skipped", n_skipped, "GenBank records that were not in metadata")
Expand Down
2 changes: 2 additions & 0 deletions src/embed/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
biopython >=1.79
tqdm >=2

0 comments on commit 3cac963

Please sign in to comment.