Skip to content

Deprecated biolink:ChemicalSubstance still used in custom_curies.yaml and merged graph #557

@turbomam

Description

@turbomam

biolink:ChemicalSubstance was renamed to biolink:ChemicalEntity in the BioLink v2 chemical refactor (May 2021). KG-Microbe has two remaining uses of the deprecated term:

1. Live bug in kg_microbe/transform_utils/custom_curies.yaml (line 14):

chemical_production: &chemical_production_block
  category: "biolink:ChemicalSubstance"  # deprecated
  predicate: "METPO:2000202"  # produces

Any new transform run will emit ChemicalSubstance for chemical production outputs.

2. ~224k stale nodes in data/merged/merged-kg_nodes.tsv

Nodes sourced from ChEBI and BacDive carry biolink:ChemicalSubstance either alone or alongside biolink:ChemicalEntity. Example: CHEBI:30769 (Citric acid) has category biolink:ChemicalEntity|biolink:ChemicalSubstance.

Note: ontology_utils.py already has a replace_deprecated_categories() function mapping ChemicalSubstance → SmallMolecule, but it is not applied to the custom-curies path.

Before fixing, worth confirming the right replacement category for chemical production outputs — SmallMolecule may not always be appropriate for complex metabolites or mixtures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions