Interface ChemblCodeResolver

All Known Implementing Classes:
ChemblCodeResolverImpl

public interface ChemblCodeResolver
Identifies a drug developmental / trial code against ChEMBL's synonym table.

Gemma annotates chemicals in CHEBI, and CHEBI covers the codes it curates well — of 60 ungrounded treatment-category codes taken from the corpus, 34 already resolve. This exists for part of the rest, and specifically for the case where the compound IS in CHEBI under a name nobody wrote on the sample: WY-14643 is pirinixic acid, CHEBI_32509, already used 17 times in the corpus, and the only missing link was that nothing connected the code to the name. ChEMBL supplies that link, and Gemma's own search does the grounding.

🛑 The fuzzy /molecule/search endpoint must not be used for this. Asked about wy-14643 it returns CHEMBL4303324 — a different molecule — while an exact synonym lookup returns CHEMBL295416, pirinixic acid, correctly. Fuzzy search also returns IDs whose records carry no synonym matching the query at all, which is an identification with no evidence behind it. Adopting it would relocate the near-match fabrication this whole area exists to prevent from our index into ChEMBL's. Only exact synonym equality counts.

Coverage is modest and worth stating plainly: of 26 corpus codes CHEBI could not reach, 4 are identifiable this way and 22 are not in ChEMBL at all — NCI NSC registry numbers, an oncolytic virus, an antibody conjugate. The drug-code gap is mostly not a ChEMBL-shaped problem.

  • Method Summary

    Modifier and Type
    Method
    Description
    Identify a code against ChEMBL.
  • Method Details

    • identify

      @Nullable ChemblCompound identify(String code)
      Identify a code against ChEMBL.

      Never throws for an unreachable or misbehaving ChEMBL: this is advisory enrichment sitting on a search path, and a naming authority being down is not a reason to fail a user's query. Failures are logged and reported as "not identified", and are NOT cached, so the next call retries.

      Parameters:
      code - the code as the submitter wrote it; separator spelling does not matter
      Returns:
      the identified compound, or null when ChEMBL has no exact synonym match, when the resolver is disabled, or when ChEMBL could not be reached