check_valid_prefix_id

check_valid_prefix_id(prefix: str, identifier: str)[source]

Check the prefix/identifier pair is valid.

Parameters:
  • prefix – The prefix from a CURIE

  • identifier – The local unique identifier from a CURIE

Raises:
  • UnregisteredPrefix – if the prefix is not registered with the Bioregistry

  • UnstandardizedPrefix – if the prefix is not standardized w.r.t. the Bioregistry

  • InvalidNormIdentifier – if the identifier is not standardized, either against the MIRIAM standard, if available, or against the Bioregistry standard

  • InvalidIdentifierPattern – if the does not match the appropriate regular expression for MIRIAM (if available) or for the Bioregistry. If no regular expression is available, then this check is not applied.

  • RuntimeError – If the preconditions for miriam standardization aren’t met. However, this shouldn’t be possible in practice, and this documentation is merely a formality.