Reference

class pyobo.Reference(prefix, identifier, name=None, registry_id=None)[source]

Bases: object

A namespace, identifier, and label.

Attributes Summary

bioregistry_link

Get the bioregistry link.

curie

The CURIE for this reference.

link

Get a link for this term.

name

pair

The pair of namespace/identifier.

registry_id

The namespace's identifier in the registry

Methods Summary

auto(prefix, identifier)

Create a reference and auto-populate its name.

default(identifier[, name])

Return a reference from the PyOBO namespace.

from_curie(curie[, name, strict, auto])

Get a reference from a CURIE.

get_url()

Return a URL for this reference, if possible.

to_dict()

Return the reference as a dictionary.

Attributes Documentation

Get the bioregistry link.

curie

The CURIE for this reference.

Get a link for this term.

name: Optional[str] = None
pair

The pair of namespace/identifier.

registry_id: Optional[str] = None

The namespace’s identifier in the registry

Methods Documentation

classmethod auto(prefix, identifier)[source]

Create a reference and auto-populate its name.

Return type:

Reference

static default(identifier, name=None)[source]

Return a reference from the PyOBO namespace.

Return type:

Reference

static from_curie(curie, name=None, *, strict=True, auto=False)[source]

Get a reference from a CURIE.

Parameters:
  • curie (str) – The compact URI (CURIE) to parse in the form of <prefix>:<identifier>

  • name (Optional[str]) – The name associated with the CURIE

  • strict (bool) – If true, raises an error if the CURIE can not be parsed.

  • auto (bool) – Automatically look up name

Return type:

Optional[Reference]

get_url()[source]

Return a URL for this reference, if possible.

Return type:

Optional[str]

to_dict()[source]

Return the reference as a dictionary.

Return type:

Mapping[str, str]