Skip to content

Commit

Permalink
Load molecular structures properly
Browse files Browse the repository at this point in the history
  • Loading branch information
woodthom2 committed Aug 8, 2024
1 parent 7ca9328 commit b00d195
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion harvesting_data_from_source/05_combine_data_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@

def add_canonical(canonical: str, data: dict):
canonical_norm = canonical.lower().strip()
data["name"] = canonical
if canonical_norm in drug_variant_to_canonical and canonical_norm not in drug_variant_to_canonical[canonical_norm]:
print(f"Adding canonical {canonical_norm} but it already maps to {drug_variant_to_canonical[canonical_norm]}")
canonical_norm = drug_variant_to_canonical[canonical_norm][0]
elif canonical_norm not in drug_variant_to_canonical:
data["name"] = canonical
if canonical_norm not in drug_canonical_to_data:
drug_canonical_to_data[canonical_norm] = data
else:
Expand Down
Binary file modified src/drug_named_entity_recognition/drug_ner_dictionary.pkl.bz2
Binary file not shown.

0 comments on commit b00d195

Please sign in to comment.