PyOBOTextCache

class PyOBOTextCache(*args, **kwargs)[source]

Bases: TextCache

A cache that looks up labels of biomedical entities based on their CURIEs.

Instantiate the PyOBO cache, ensuring PyOBO is installed.

Methods Summary

get_texts(identifiers)

Get text for the given CURIEs.

Methods Documentation

get_texts(identifiers: Sequence[str]) Sequence[str | None][source]

Get text for the given CURIEs.

Parameters:

identifiers (Sequence[str]) – The compact URIs for each entity (e.g., ['doid:1234', ...])

Returns:

the label for each entity, looked up via pyobo.get_name(). Might be none if no label is available.

Return type:

Sequence[str | None]