Skip to content

Extend BridgeDb metabolite ID coverage and add compound-name lookup - #184

Open
hechth with Copilot wants to merge 3 commits into
mainfrom
copilot/extend-briddgedb-identifier-conversions
Open

Extend BridgeDb metabolite ID coverage and add compound-name lookup#184
hechth with Copilot wants to merge 3 commits into
mainfrom
copilot/extend-briddgedb-identifier-conversions

Conversation

Copilot AI commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

BridgeDb support in the web converter was limited to a subset of metabolite identifiers and lacked name-based lookup. This update expands BridgeDb conversions for MS-relevant identifiers and enables identifier retrieval from compound names via BridgeDb search.

  • Conversion surface expansion

    • Added BridgeDb source codes for:
      • casno (Ca)
      • inchikey (Ik)
    • Added explicit conversion entry points:
      • from_casno()
      • from_inchikey()
    • Switched conversion registration to generate all pairwise conversions across supported BridgeDb identifiers, so newly added ID types are automatically exposed in the converter matrix.
  • BridgeDb name search support

    • Added BridgeDbSearch endpoint (/Human/search/).
    • Added from_name() to support compound_name -> <BridgeDb identifiers> conversions via BridgeDb search.
  • Response parsing robustness

    • Extended BridgeDb response parsing to accept both datasource labels and BridgeDb system codes (e.g., PubChem-compound and Cpc), preventing dropped mappings when response format varies.
self.codes.update({
    "casno": "Ca",
    "inchikey": "Ik",
})

self.endpoints["BridgeDbSearch"] = "https://webservice.bridgedb.org/Human/search/"

async def from_name(self, name):
    response = await self.query_the_service("BridgeDbSearch", name)
    return self.parse_attributes(response) if response else None

Copilot AI linked an issue Aug 25, 2026 that may be closed by this pull request
Co-authored-by: hechth <12066490+hechth@users.noreply.github.com>
Copilot AI changed the title [WIP] Add additional conversion functions from BridgeDb for web converter Extend BridgeDb metabolite ID coverage and add compound-name lookup Aug 25, 2026
Copilot AI requested a review from hechth August 25, 2026 13:36
@hechth

hechth commented Aug 25, 2026

Copy link
Copy Markdown
Member

@copilot mark the test checking for availability of the CIR service with xfail and skip other tests using the service in case it is not available

Co-authored-by: hechth <12066490+hechth@users.noreply.github.com>

Copilot AI commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

@copilot mark the test checking for availability of the CIR service with xfail and skip other tests using the service in case it is not available

Implemented in commit cb25284. test_service_available in tests/test_CIR.py is now marked xfail for CIR outage exceptions, and test_format now skips when the CIR service is unavailable.

@hechth
hechth marked this pull request as ready for review August 25, 2026 14:02
@egonw

egonw commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

@copilot, please add LIPID MAPS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extend BridgeDb identifier conversions

3 participants