NormalizedReference

pydantic model NormalizedReference[source]

Extends curies.Reference to normalize the prefix against the Bioregistry.

>>> NormalizedReference(prefix="go", identifier="0032571")
NormalizedReference(prefix='go', identifier='0032571')

With a name:

>>> NormalizedReference(prefix="go", identifier="0032571")
NormalizedReference(prefix='go', identifier='0032571')

Standardizes capitalization to lowercase:

>>> NormalizedReference(prefix="GO", identifier="0032571")
NormalizedReference(prefix='go', identifier='0032571')

Standardizes prefix synonyms to lowercase:

>>> NormalizedReference(prefix="GOBP", identifier="0032571")
NormalizedReference(prefix='go', identifier='0032571')

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Show JSON schema
{
   "title": "NormalizedReference",
   "description": "Extends :class:`curies.Reference` to normalize the prefix against the Bioregistry.\n\n>>> NormalizedReference(prefix=\"go\", identifier=\"0032571\")\nNormalizedReference(prefix='go', identifier='0032571')\n\nWith a name:\n\n>>> NormalizedReference(prefix=\"go\", identifier=\"0032571\")\nNormalizedReference(prefix='go', identifier='0032571')\n\nStandardizes capitalization to lowercase:\n\n>>> NormalizedReference(prefix=\"GO\", identifier=\"0032571\")\nNormalizedReference(prefix='go', identifier='0032571')\n\nStandardizes prefix synonyms to lowercase:\n\n>>> NormalizedReference(prefix=\"GOBP\", identifier=\"0032571\")\nNormalizedReference(prefix='go', identifier='0032571')",
   "type": "object",
   "properties": {
      "prefix": {
         "description": "The prefix used in a compact URI (CURIE).",
         "title": "Prefix",
         "type": "string"
      },
      "identifier": {
         "description": "The local unique identifier used in a compact URI (CURIE).",
         "title": "Identifier",
         "type": "string"
      }
   },
   "required": [
      "prefix",
      "identifier"
   ]
}

Config:
  • frozen: bool = True

Fields:

Validators:
validator validate_identifier  »  all fields[source]

Validate the identifier.