Schema

Pydantic models for the Bioregistry.

pydantic model Attributable[source]

An upper-level metadata for a researcher.

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

Raises ValidationError if the input data cannot be parsed to form a valid model.

Show JSON schema
{
   "title": "Attributable",
   "description": "An upper-level metadata for a researcher.",
   "type": "object",
   "properties": {
      "name": {
         "title": "Name",
         "description": "The full name of the researcher",
         "type": "string"
      },
      "orcid": {
         "title": "Open Researcher and Contributor Identifier",
         "description": "The Open Researcher and Contributor Identifier (ORCiD) provides researchers with an open, unambiguous identifier for connecting various digital assets (e.g., publications, reviews) across the semantic web. An account can be made in seconds at https://orcid.org.",
         "type": "string"
      },
      "email": {
         "title": "Email address",
         "description": "The email address specific to the researcher.",
         "type": "string"
      },
      "github": {
         "title": "GitHub handle",
         "description": "The GitHub handle enables contacting the researcher on GitHub: the *de facto* version control in the computer sciences and life sciences.",
         "type": "string"
      }
   },
   "required": [
      "name"
   ]
}

Fields
field email: Optional[str] = PydanticUndefined

The email address specific to the researcher.

field github: Optional[str] = PydanticUndefined

The GitHub handle for the author

The GitHub handle enables contacting the researcher on GitHub: the de facto version control in the computer sciences and life sciences.

field name: str [Required]

The full name of the researcher

field orcid: Optional[str] = PydanticUndefined

The Open Researcher and Contributor Identifier (ORCiD) provides researchers with an open, unambiguous identifier for connecting various digital assets (e.g., publications, reviews) across the semantic web. An account can be made in seconds at https://orcid.org.

add_triples(graph)[source]

Add triples to an RDF graph for this author.

Parameters

graph (rdflib.Graph) – An RDF graph

Return type

rdflib.term.Node

Returns

The RDF node representing this author using an ORCiD URI.

pydantic model Author[source]

Metadata for an author.

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

Raises ValidationError if the input data cannot be parsed to form a valid model.

Show JSON schema
{
   "title": "Author",
   "description": "Metadata for an author.",
   "type": "object",
   "properties": {
      "name": {
         "title": "Name",
         "description": "The full name of the researcher",
         "type": "string"
      },
      "orcid": {
         "title": "Open Researcher and Contributor Identifier",
         "description": "The Open Researcher and Contributor Identifier (ORCiD) provides researchers with an open, unambiguous identifier for connecting various digital assets (e.g., publications, reviews) across the semantic web. An account can be made in seconds at https://orcid.org.",
         "type": "string"
      },
      "email": {
         "title": "Email address",
         "description": "The email address specific to the researcher.",
         "type": "string"
      },
      "github": {
         "title": "GitHub handle",
         "description": "The GitHub handle enables contacting the researcher on GitHub: the *de facto* version control in the computer sciences and life sciences.",
         "type": "string"
      }
   },
   "required": [
      "name",
      "orcid"
   ]
}

Fields
field orcid: str [Required]

This field is redefined on top of Attributable to make it required. Otherwise, it has the same semantics.

The Open Researcher and Contributor Identifier (ORCiD) provides researchers with an open, unambiguous identifier for connecting various digital assets (e.g., publications, reviews) across the semantic web. An account can be made in seconds at https://orcid.org.

pydantic model Provider[source]

A provider.

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

Raises ValidationError if the input data cannot be parsed to form a valid model.

Show JSON schema
{
   "title": "Provider",
   "description": "A provider.",
   "type": "object",
   "properties": {
      "code": {
         "title": "Code",
         "description": "A locally unique code within the prefix for the provider",
         "type": "string"
      },
      "name": {
         "title": "Name",
         "description": "Name of the provider",
         "type": "string"
      },
      "description": {
         "title": "Description",
         "description": "Description of the provider",
         "type": "string"
      },
      "homepage": {
         "title": "Homepage",
         "description": "Homepage of the provider",
         "type": "string"
      },
      "uri_format": {
         "title": "URI Format",
         "description": "The URI format string, which must have at least one ``$1`` in it",
         "type": "string"
      }
   },
   "required": [
      "code",
      "name",
      "description",
      "homepage",
      "uri_format"
   ]
}

Fields
field code: str [Required]

A locally unique code within the prefix for the provider

field description: str [Required]

Description of the provider

field homepage: str [Required]

Homepage of the provider

field name: str [Required]

Name of the provider

field uri_format: str [Required]

The URI format string, which must have at least one $1 in it

resolve(identifier)[source]

Resolve the identifier into a URI.

Parameters

identifier (str) – The identifier in the semantic space

Return type

str

Returns

The URI for the identifier

pydantic model Resource[source]

Metadata about an ontology, database, or other resource.

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

Raises ValidationError if the input data cannot be parsed to form a valid model.

Show JSON schema
{
   "title": "Resource",
   "description": "Metadata about an ontology, database, or other resource.",
   "type": "object",
   "properties": {
      "prefix": {
         "title": "Prefix",
         "description": "The prefix for this resource",
         "integration_status": "required",
         "type": "string"
      },
      "name": {
         "title": "Name",
         "description": "The name of the resource",
         "integration_status": "required",
         "type": "string"
      },
      "description": {
         "title": "Description",
         "description": "A description of the resource",
         "integration_status": "required",
         "type": "string"
      },
      "pattern": {
         "title": "Pattern",
         "description": "The regular expression pattern for local unique identifiers in the resource",
         "integration_status": "required_for_new",
         "type": "string"
      },
      "uri_format": {
         "title": "URI format string",
         "description": "The URI format string, which must have at least one ``$1`` in it",
         "integration_status": "required_for_new",
         "type": "string"
      },
      "providers": {
         "title": "Providers",
         "description": "Additional, non-default providers for the resource",
         "type": "array",
         "items": {
            "$ref": "#/definitions/Provider"
         }
      },
      "homepage": {
         "title": "Homepage",
         "description": "The URL for the homepage of the resource, preferably using HTTPS",
         "integration_status": "required",
         "type": "string"
      },
      "repository": {
         "title": "Repository",
         "description": "The URL for the repository of the resource",
         "type": "string"
      },
      "contact": {
         "title": "Contact",
         "description": "The contact email address for the resource. This must correspond to a specific person and not be a listserve nor a shared email account.",
         "integration_status": "suggested",
         "allOf": [
            {
               "$ref": "#/definitions/Attributable"
            }
         ]
      },
      "example": {
         "title": "Example",
         "description": "An example local identifier for the resource, explicitly excluding any redundant usage of the prefix in the identifier. For example, a GO identifier should only look like ``1234567`` and not like ``GO:1234567``",
         "integration_status": "required",
         "type": "string"
      },
      "example_extras": {
         "title": "Example Extras",
         "description": "Extra example identifiers",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "example_decoys": {
         "title": "Example Decoys",
         "description": "Extra example identifiers that explicitly fail regex tests",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "license": {
         "title": "License",
         "description": "The license for the resource",
         "type": "string"
      },
      "version": {
         "title": "Version",
         "description": "The version for the resource",
         "type": "string"
      },
      "part_of": {
         "title": "Part Of",
         "description": "An annotation between this prefix and a super-prefix. For example, ``chembl.compound`` is a part of ``chembl``.",
         "type": "string"
      },
      "provides": {
         "title": "Provides",
         "description": "An annotation between this prefix and a prefix for which it is redundant. For example, ``ctd.gene`` has been given a prefix by Identifiers.org, but it actually just reuses identifies from ``ncbigene``, so ``ctd.gene`` provides ``ncbigene``.",
         "type": "string"
      },
      "download_owl": {
         "title": "OWL Download URL",
         "description": "The URL to download the resource as an ontology encoded in the OWL format. More information about this format can be found at https://www.w3.org/TR/owl2-syntax/.",
         "type": "string"
      },
      "download_obo": {
         "title": "OBO Download URL",
         "description": "The URL to download the resource as an ontology encoded in the OBO format. More information about this format can be found at https://owlcollab.github.io/oboformat/doc/obo-syntax.html.",
         "type": "string"
      },
      "download_json": {
         "title": "OBO Graph JSON Download URL",
         "description": "The URL to download the resource as an ontology encoded in the OBO Graph JSON format. More information about this format can be found at https://github.com/geneontology/obographs.",
         "type": "string"
      },
      "banana": {
         "title": "Banana",
         "description": "The `banana` is a generalization of the concept of the \"namespace embedded in local unique identifier\". Many OBO foundry ontologies use the redundant uppercased name of the ontology in the local identifier, such as the Gene Ontology, which makes the prefixes have a redundant usage as in ``GO:GO:1234567``. The `banana` tag explicitly annotates the part in the local identifier that should be stripped, if found. While the Bioregistry automatically knows how to handle all OBO Foundry ontologies' bananas because the OBO Foundry provides the \"preferredPrefix\" field, the banana can be annotated on non-OBO ontologies to more explicitly write the beginning part of the identifier that should be stripped. This allowed for solving one of the long-standing issues with the Identifiers.org resolver (e.g., for ``oma.hog``; see https://github.com/identifiers-org/identifiers-org.github.io/issues/155) as well as better annotate new entries, such as SwissMap Lipids, which have the prefix ``swisslipid`` but have the redundant information ``SLM:`` in the beginning of identifiers. Therefore, ``SLM:`` is the banana.",
         "type": "string"
      },
      "deprecated": {
         "title": "Deprecated",
         "description": "A flag denoting if this resource is deprecated. Currently, this is a blanket term that covers cases when the prefix is no longer maintained, when it has been rolled into another resource, when the website related to the resource goes down, or any other reason that it's difficult or impossible to find full metadata on the resource. If this is set to true, please add a comment explaining why. This flag will override annotations from the OLS, OBO Foundry, and Prefix Commons on the deprecation status, since they often disagree and are very conservative in calling dead resources.",
         "type": "boolean"
      },
      "mappings": {
         "title": "Mappings",
         "description": "A dictionary of metaprefixes (i.e., prefixes for registries) to prefixes in external registries. These also correspond to the registry-specific JSON fields in this model like ``miriam`` field.",
         "type": "object",
         "additionalProperties": {
            "type": "string"
         }
      },
      "synonyms": {
         "title": "Synonyms",
         "description": "A list of synonyms for the prefix of this resource. These are used in normalization of prefixes and are a useful reference tool for prefixes that are written many ways. For example, ``snomedct`` has many synonyms including typos like ``SNOWMEDCT``, lexical variants like ``SNOMED_CT``, version-variants like ``SNOMEDCT_2010_1_31``, and tons of other nonsense like ``SNOMEDCTCT``.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "references": {
         "title": "References",
         "description": "A list of URLs to also see, such as publications describing the resource",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "appears_in": {
         "title": "Appears In",
         "description": "A list of prefixes that use this resource for xrefs, provenance, etc.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "depends_on": {
         "title": "Depends On",
         "description": "A list of prefixes that use this resource depends on, e.g., ontologies that import each other.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "namespace_in_lui": {
         "title": "Namespace Embedded in Local Unique Identifier",
         "description": "A flag denoting if the namespace is embedded in the LUI (if this is true and it is not accompanied by a banana, assume that the banana is the prefix in all caps plus a colon, as is standard in OBO). Currently this flag is only used to override identifiers.org in the case of ``gramene.growthstage``, ``oma.hog``, and ``vario``.",
         "type": "boolean"
      },
      "no_own_terms": {
         "title": "No Own Terms",
         "description": "A flag denoting if the resource mints its own identifiers. Omission or explicit marking as false means that the resource does have its own terms. This is most applicable to ontologies, specifically application ontologies, which only reuse terms from others. One example is ChIRO.",
         "type": "boolean"
      },
      "comment": {
         "title": "Comment",
         "description": "A field for a free text comment",
         "type": "string"
      },
      "contributor": {
         "title": "Contributor",
         "description": "The contributor of the prefix to the Bioregistry, including at a minimum their name and ORCiD and optionall their email address and GitHub handle. All entries curated through the Bioregistry GitHub Workflow must contain this field.",
         "integration_status": "required_for_new",
         "allOf": [
            {
               "$ref": "#/definitions/Author"
            }
         ]
      },
      "contributor_extras": {
         "title": "Contributor Extras",
         "description": "Additional contributors besides the original submitter.",
         "type": "array",
         "items": {
            "$ref": "#/definitions/Author"
         }
      },
      "reviewer": {
         "title": "Reviewer",
         "description": "The reviewer of the prefix to the Bioregistry, including at a minimum their name and ORCiD and optionall their email address and GitHub handle. All entries curated through the Bioregistry GitHub Workflow should contain this field pointing to the person who reviewed it on GitHub.",
         "integration_status": "required_for_new",
         "allOf": [
            {
               "$ref": "#/definitions/Author"
            }
         ]
      },
      "proprietary": {
         "title": "Proprietary",
         "description": "A flag to denote if this database is proprietary and therefore can not be included in normal quality control checks nor can it be resolved. Omission or explicit marking as false means that the resource is not proprietary.",
         "type": "boolean"
      },
      "has_canonical": {
         "title": "Has Canonical",
         "description": "If this shares an IRI with another entry, maps to which should be be considered as canonical",
         "type": "string"
      },
      "preferred_prefix": {
         "title": "Preferred Prefix",
         "description": "An annotation of stylization of the prefix. This appears in OBO ontologies like FBbt as well as databases like NCBIGene. If it's not given, then assume that the normalized prefix used in the Bioregistry is canonical.",
         "type": "string"
      },
      "twitter": {
         "title": "Twitter",
         "description": "The twitter handle for the project",
         "type": "string"
      },
      "miriam": {
         "title": "Miriam",
         "type": "object"
      },
      "n2t": {
         "title": "N2T",
         "type": "object"
      },
      "prefixcommons": {
         "title": "Prefixcommons",
         "type": "object"
      },
      "wikidata": {
         "title": "Wikidata",
         "type": "object"
      },
      "go": {
         "title": "Go",
         "type": "object"
      },
      "obofoundry": {
         "title": "Obofoundry",
         "type": "object"
      },
      "bioportal": {
         "title": "Bioportal",
         "type": "object"
      },
      "ols": {
         "title": "Ols",
         "type": "object"
      },
      "ncbi": {
         "title": "Ncbi",
         "type": "object"
      },
      "uniprot": {
         "title": "Uniprot",
         "type": "object"
      },
      "biolink": {
         "title": "Biolink",
         "type": "object"
      },
      "cellosaurus": {
         "title": "Cellosaurus",
         "type": "object"
      },
      "ontobee": {
         "title": "Ontobee",
         "type": "object"
      },
      "cheminf": {
         "title": "Cheminf",
         "type": "object"
      },
      "fairsharing": {
         "title": "Fairsharing",
         "type": "object"
      }
   },
   "required": [
      "prefix"
   ],
   "definitions": {
      "Provider": {
         "title": "Provider",
         "description": "A provider.",
         "type": "object",
         "properties": {
            "code": {
               "title": "Code",
               "description": "A locally unique code within the prefix for the provider",
               "type": "string"
            },
            "name": {
               "title": "Name",
               "description": "Name of the provider",
               "type": "string"
            },
            "description": {
               "title": "Description",
               "description": "Description of the provider",
               "type": "string"
            },
            "homepage": {
               "title": "Homepage",
               "description": "Homepage of the provider",
               "type": "string"
            },
            "uri_format": {
               "title": "URI Format",
               "description": "The URI format string, which must have at least one ``$1`` in it",
               "type": "string"
            }
         },
         "required": [
            "code",
            "name",
            "description",
            "homepage",
            "uri_format"
         ]
      },
      "Attributable": {
         "title": "Attributable",
         "description": "An upper-level metadata for a researcher.",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "description": "The full name of the researcher",
               "type": "string"
            },
            "orcid": {
               "title": "Open Researcher and Contributor Identifier",
               "description": "The Open Researcher and Contributor Identifier (ORCiD) provides researchers with an open, unambiguous identifier for connecting various digital assets (e.g., publications, reviews) across the semantic web. An account can be made in seconds at https://orcid.org.",
               "type": "string"
            },
            "email": {
               "title": "Email address",
               "description": "The email address specific to the researcher.",
               "type": "string"
            },
            "github": {
               "title": "GitHub handle",
               "description": "The GitHub handle enables contacting the researcher on GitHub: the *de facto* version control in the computer sciences and life sciences.",
               "type": "string"
            }
         },
         "required": [
            "name"
         ]
      },
      "Author": {
         "title": "Author",
         "description": "Metadata for an author.",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "description": "The full name of the researcher",
               "type": "string"
            },
            "orcid": {
               "title": "Open Researcher and Contributor Identifier",
               "description": "The Open Researcher and Contributor Identifier (ORCiD) provides researchers with an open, unambiguous identifier for connecting various digital assets (e.g., publications, reviews) across the semantic web. An account can be made in seconds at https://orcid.org.",
               "type": "string"
            },
            "email": {
               "title": "Email address",
               "description": "The email address specific to the researcher.",
               "type": "string"
            },
            "github": {
               "title": "GitHub handle",
               "description": "The GitHub handle enables contacting the researcher on GitHub: the *de facto* version control in the computer sciences and life sciences.",
               "type": "string"
            }
         },
         "required": [
            "name",
            "orcid"
         ]
      }
   }
}

Fields
field appears_in: Optional[List[str]] = PydanticUndefined

A list of prefixes that use this resource for xrefs, provenance, etc.

field banana: Optional[str] = PydanticUndefined

The banana is a generalization of the concept of the “namespace embedded in local unique identifier”. Many OBO foundry ontologies use the redundant uppercased name of the ontology in the local identifier, such as the Gene Ontology, which makes the prefixes have a redundant usage as in GO:GO:1234567. The banana tag explicitly annotates the part in the local identifier that should be stripped, if found. While the Bioregistry automatically knows how to handle all OBO Foundry ontologies’ bananas because the OBO Foundry provides the “preferredPrefix” field, the banana can be annotated on non-OBO ontologies to more explicitly write the beginning part of the identifier that should be stripped. This allowed for solving one of the long-standing issues with the Identifiers.org resolver (e.g., for oma.hog; see https://github.com/identifiers-org/identifiers-org.github.io/issues/155) as well as better annotate new entries, such as SwissMap Lipids, which have the prefix swisslipid but have the redundant information SLM: in the beginning of identifiers. Therefore, SLM: is the banana.

External data from the BioLink Model’s custom registry

field bioportal: Optional[Mapping[str, Any]] = PydanticUndefined

External data from the BioPortal ontology repository

field cellosaurus: Optional[Mapping[str, Any]] = PydanticUndefined

External data from the Cellosaurus custom registry

field cheminf: Optional[Mapping[str, Any]] = PydanticUndefined

External data from ChemInf

field comment: Optional[str] = PydanticUndefined

A field for a free text comment.

A field for a free text comment

field contact: Optional[bioregistry.schema.struct.Attributable] = PydanticUndefined

The contact email address for the resource. This must correspond to a specific person and not be a listserve nor a shared email account.

field contributor: Optional[bioregistry.schema.struct.Author] = PydanticUndefined

The contributor of the prefix to the Bioregistry, including at a minimum their name and ORCiD and optionall their email address and GitHub handle. All entries curated through the Bioregistry GitHub Workflow must contain this field.

field contributor_extras: Optional[List[bioregistry.schema.struct.Author]] = PydanticUndefined

Additional contributors besides the original submitter.

field depends_on: Optional[List[str]] = PydanticUndefined

A list of prefixes that use this resource depends on, e.g., ontologies that import each other.

field deprecated: Optional[bool] = PydanticUndefined

A flag denoting if this resource is deprecated. Currently, this is a blanket term that covers cases when the prefix is no longer maintained, when it has been rolled into another resource, when the website related to the resource goes down, or any other reason that it’s difficult or impossible to find full metadata on the resource. If this is set to true, please add a comment explaining why. This flag will override annotations from the OLS, OBO Foundry, and Prefix Commons on the deprecation status, since they often disagree and are very conservative in calling dead resources.

field description: Optional[str] = PydanticUndefined

A description of the resource

field download_json: Optional[str] = PydanticUndefined

The URL to download the resource as an ontology encoded in the OBO Graph JSON format. More information about this format can be found at https://github.com/geneontology/obographs.

field download_obo: Optional[str] = PydanticUndefined

The URL to download the resource as an ontology encoded in the OBO format. More information about this format can be found at https://owlcollab.github.io/oboformat/doc/obo-syntax.html.

field download_owl: Optional[str] = PydanticUndefined

The URL to download the resource as an ontology encoded in the OWL format. More information about this format can be found at https://www.w3.org/TR/owl2-syntax/.

field example: Optional[str] = PydanticUndefined

An example local identifier for the resource, explicitly excluding any redundant usage of the prefix in the identifier. For example, a GO identifier should only look like 1234567 and not like GO:1234567

field example_decoys: Optional[List[str]] = PydanticUndefined

Extra example identifiers that explicitly fail regex tests

field example_extras: Optional[List[str]] = PydanticUndefined

Extra example identifiers

field fairsharing: Optional[Mapping[str, Any]] = PydanticUndefined

External data from FAIRsharing

field go: Optional[Mapping[str, Any]] = PydanticUndefined

External data from the Gene Ontology’s custom registry

field has_canonical: Optional[str] = PydanticUndefined

An annotation between this prefix and another prefix if they share the same provider IRI to denote that the other prefix should be considered as the canonical prefix to which IRIs should be contracted as CURIEs.

See also

This field was added and described in detail in https://github.com/biopragmatics/bioregistry/pull/164

If this shares an IRI with another entry, maps to which should be be considered as canonical

field homepage: Optional[str] = PydanticUndefined

The URL for the homepage of the resource, preferably using HTTPS

field license: Optional[str] = PydanticUndefined

The license for the resource

field mappings: Optional[Dict[str, str]] = PydanticUndefined

A dictionary of metaprefixes (i.e., prefixes for registries) to prefixes in external registries. These also correspond to the registry-specific JSON fields in this model like miriam field.

field miriam: Optional[Mapping[str, Any]] = PydanticUndefined

External data from Identifiers.org’s MIRIAM Database

field n2t: Optional[Mapping[str, Any]] = PydanticUndefined

External data from the Name-to-Thing service

field name: Optional[str] = PydanticUndefined

The name of the resource

field namespace_in_lui: Optional[bool] = PydanticUndefined

A flag denoting if the namespace is embedded in the LUI (if this is true and it is not accompanied by a banana, assume that the banana is the prefix in all caps plus a colon, as is standard in OBO). Currently this flag is only used to override identifiers.org in the case of gramene.growthstage, oma.hog, and vario.

field ncbi: Optional[Mapping[str, Any]] = PydanticUndefined

External data from the NCBI Genbank’s custom registry

field no_own_terms: Optional[bool] = PydanticUndefined

A flag denoting if the resource mints its own identifiers. Omission or explicit marking as false means that the resource does have its own terms. This is most applicable to ontologies, specifically application ontologies, which only reuse terms from others. One example is ChIRO.

field obofoundry: Optional[Mapping[str, Any]] = PydanticUndefined

External data from the Open Biomedical Ontologies (OBO) Foundry catalog

field ols: Optional[Mapping[str, Any]] = PydanticUndefined

External data from the Ontology Lookup Service

field ontobee: Optional[Mapping[str, Any]] = PydanticUndefined

External data from the OntoBee

field part_of: Optional[str] = PydanticUndefined

An annotation between this prefix and a super-prefix. For example, chembl.compound is a part of chembl.

field pattern: Optional[str] = PydanticUndefined

The regular expression pattern for local unique identifiers in the resource

field preferred_prefix: Optional[str] = PydanticUndefined

An annotation of stylization of the prefix. This appears in OBO ontologies like FBbt as well as databases like NCBIGene. If it’s not given, then assume that the normalized prefix used in the Bioregistry is canonical.

field prefix: str [Required]

The prefix for this resource

field prefixcommons: Optional[Mapping[str, Any]] = PydanticUndefined

External data from Prefix Commons

field proprietary: Optional[bool] = PydanticUndefined

A flag to denote if this database is proprietary and therefore can not be included in normal quality control checks nor can it be resolved. Omission or explicit marking as false means that the resource is not proprietary.

field providers: Optional[List[bioregistry.schema.struct.Provider]] = PydanticUndefined

Additional, non-default providers for the resource

field provides: Optional[str] = PydanticUndefined

An annotation between this prefix and a prefix for which it is redundant. For example, ctd.gene has been given a prefix by Identifiers.org, but it actually just reuses identifies from ncbigene, so ctd.gene provides ncbigene.

field references: Optional[List[str]] = PydanticUndefined

A list of URLs to also see, such as publications describing the resource

field repository: Optional[str] = PydanticUndefined

The URL for the repository of the resource

field reviewer: Optional[bioregistry.schema.struct.Author] = PydanticUndefined

The reviewer of the prefix to the Bioregistry, including at a minimum their name and ORCiD and optionall their email address and GitHub handle. All entries curated through the Bioregistry GitHub Workflow should contain this field pointing to the person who reviewed it on GitHub.

field synonyms: Optional[List[str]] = PydanticUndefined

A list of synonyms for the prefix of this resource. These are used in normalization of prefixes and are a useful reference tool for prefixes that are written many ways. For example, snomedct has many synonyms including typos like SNOWMEDCT, lexical variants like SNOMED_CT, version-variants like SNOMEDCT_2010_1_31, and tons of other nonsense like SNOMEDCTCT.

field twitter: Optional[str] = PydanticUndefined

The twitter handle for the project

field uniprot: Optional[Mapping[str, Any]] = PydanticUndefined

External data from UniProt’s custom registry

field uri_format: Optional[str] = PydanticUndefined

The URI format string, which must have at least one $1 in it

field version: Optional[str] = PydanticUndefined

The version for the resource

field wikidata: Optional[Mapping[str, Any]] = PydanticUndefined

External data from Wikidata Properties

get_banana()[source]

Get the optional redundant prefix to go before an identifier.

A “banana” is an embedded prefix that isn’t actually part of the identifier. Usually this corresponds to the prefix itself, with some specific stylization such as in the case of FBbt. The banana does NOT include a colon “:” at the end

Return type

Optional[str]

Returns

The banana, if the prefix is valid and has an associated banana.

Explicitly annotated banana

>>> from bioregistry import get_resource
>>> get_resource("go.ref").get_banana()
'GO_REF'

Banana imported through OBO Foundry

>>> get_resource("fbbt").get_banana()
'FBbt'

Banana inferred for OBO Foundry ontology

>>> get_resource("chebi").get_banana()
'CHEBI'

No banana, no namespace in LUI

>>> get_resource("pdb").get_banana()
None

Banana is not inferred for OBO Foundry ontologies that were imported: >>> get_resource(“ncit”).get_banana() None >>> get_resource(“ncbitaxon”).get_banana() None

get_contact()[source]

Get the contact, if available.

Return type

Optional[Attributable]

get_contact_email()[source]

Return the contact email, if available.

Return type

Optional[str]

Returns

The resource’s contact email address, if it is available.

>>> from bioregistry import get_resource
>>> get_resource("bioregistry").get_contact_email()  # from bioregistry curation
'cthoyt@gmail.com'
>>> get_resource("chebi").get_contact_email()
'amalik@ebi.ac.uk'
get_contact_github()[source]

Return the contact GitHub handle, if available.

Return type

Optional[str]

Returns

The resource’s contact GitHub handle, if it is available.

>>> from bioregistry import get_resource
>>> get_resource("bioregistry").get_contact_github()  # from bioregistry curation
'cthoyt'
>>> get_resource("agro").get_contact_github()  # from OBO Foundry
'marieALaporte'
get_contact_name()[source]

Return the contact name, if available.

Return type

Optional[str]

Returns

The resource’s contact name, if it is available.

>>> from bioregistry import get_resource
>>> get_resource("bioregistry").get_contact_name()  # from bioregistry curation
'Charles Tapley Hoyt'
>>> get_resource("chebi").get_contact_name()
'Adnan Malik'
get_contact_orcid()[source]

Return the contact ORCiD, if available.

Return type

Optional[str]

Returns

The resource’s contact ORCiD, if it is available.

>>> from bioregistry import get_resource
>>> get_resource("bioregistry").get_contact_orcid()  # from bioregistry curation
'0000-0003-4423-4370'
>>> get_resource("aero").get_contact_orcid()
'0000-0002-9551-6370'
get_default_format()[source]

Get the default, first-party URI prefix.

Return type

Optional[str]

Returns

The first-party URI prefix string, if available.

>>> from bioregistry import get_resource
>>> get_resource("ncbitaxon").get_default_format()
'https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Info&id=$1'
>>> get_resource("go").get_default_format()
'http://amigo.geneontology.org/amigo/term/GO:$1'
get_default_uri(identifier)[source]

Return the default URI for the identifier.

Parameters

identifier (str) – The local identifier in the nomenclature represented by this resource

Return type

Optional[str]

Returns

The first-party provider URI for the local identifier, if one can be constructed

>>> from bioregistry import get_resource
>>> get_resource("chebi").get_default_uri("24867")
'https://www.ebi.ac.uk/chebi/searchId.do?chebiId=CHEBI:24867'
get_description(use_markdown=False)[source]

Get the description for the given prefix, if available.

Return type

Optional[str]

get_download_obo()[source]

Get the download link for the latest OBO file.

Return type

Optional[str]

get_download_obograph()[source]

Get the download link for the latest OBOGraph JSON file.

Return type

Optional[str]

get_download_owl()[source]

Get the download link for the latest OWL file.

Return type

Optional[str]

get_example()[source]

Get an example identifier, if it’s available.

Return type

Optional[str]

get_external(metaprefix)[source]

Get an external registry.

Return type

Mapping[str, Any]

get_extra_providers()[source]

Get a list of all extra providers.

Return type

List[Provider]

get_homepage()[source]

Return the homepage, if available.

Return type

Optional[str]

get_identifiers_org_prefix()[source]

Get the identifiers.org prefix if available.

Return type

Optional[str]

Returns

The Identifiers.org/MIRIAM prefix corresponding to the prefix, if mappable.

>>> from bioregistry import get_resource
>>> get_resource('chebi').get_identifiers_org_prefix()
'chebi'
>>> get_resource('ncbitaxon').get_identifiers_org_prefix()
'taxonomy'
>>> assert get_resource('MONDO').get_identifiers_org_prefix() is None
get_license()[source]

Get the license for the resource.

Return type

Optional[str]

get_mapped_prefix(metaprefix)[source]

Get the prefix for the given external.

Parameters

metaprefix (str) – The metaprefix for the external resource

Return type

Optional[str]

Returns

The prefix in the external registry, if it could be mapped

>>> from bioregistry import get_resource
>>> get_resource("chebi").get_mapped_prefix("wikidata")
'P683'
get_mappings()[source]

Get the mappings to external registries, if available.

Return type

Optional[Mapping[str, str]]

get_miriam_uri_format()[source]

Get the Identifiers.org URI format string for this entry, if possible.

Return type

Optional[str]

Returns

The Identifiers.org/MIRIAM URL format string, if available.

>>> from bioregistry import get_resource
>>> get_resource('ncbitaxon').get_miriam_uri_format()
'https://identifiers.org/taxonomy:$1'
>>> get_resource('go').get_miriam_uri_format()
'https://identifiers.org/GO:$1'
>>> assert get_resource('sty').get_miriam_uri_format() is None
get_miriam_uri_prefix()[source]

Get the Identifiers.org URI prefix for this entry, if possible.

Return type

Optional[str]

Returns

The Identifiers.org/MIRIAM URI prefix, if available.

>>> from bioregistry import get_resource
>>> get_resource('ncbitaxon').get_miriam_uri_prefix()
'https://identifiers.org/taxonomy:'
>>> get_resource('go').get_miriam_uri_prefix()
'https://identifiers.org/GO:'
>>> assert get_resource('sty').get_miriam_uri_prefix() is None
get_n2t_uri_format()[source]

Get the Name-to-Thing URI format string, if available.

get_name()[source]

Get the name for the given prefix, it it’s available.

Return type

Optional[str]

get_namespace_in_lui()[source]

Check if the namespace should appear in the LUI.

Return type

Optional[bool]

get_nt2_uri_prefix()[source]

Get the Name-to-Thing URI prefix for this entry, if possible.

Return type

Optional[str]

get_obo_preferred_prefix()[source]

Get the OBO preferred prefix, if this resource is mapped to the OBO Foundry.

Return type

Optional[str]

get_obofoundry_prefix()[source]

Get the OBO Foundry prefix if available.

Return type

Optional[str]

Returns

The OBO prefix, if available.

>>> from bioregistry import get_resource
>>> get_resource("go").get_obofoundry_prefix()  # standard
'GO'
>>> get_resource("ncbitaxon").get_obofoundry_prefix()  # mixed case
'NCBITaxon'
>>> assert get_resource("sty").get_obofoundry_prefix() is None
get_obofoundry_uri_format()[source]

Get the OBO Foundry URI format string for this entry, if possible.

Return type

Optional[str]

Returns

The OBO PURL format string, if available.

>>> from bioregistry import get_resource
>>> get_resource("go").get_obofoundry_uri_format()  # standard
'http://purl.obolibrary.org/obo/GO_$1'
>>> get_resource("ncbitaxon").get_obofoundry_uri_format()  # mixed case
'http://purl.obolibrary.org/obo/NCBITaxon_$1'
>>> assert get_resource("sty").get_obofoundry_uri_format() is None
get_obofoundry_uri_prefix()[source]

Get the OBO Foundry URI prefix for this entry, if possible.

Return type

Optional[str]

Returns

The OBO PURL URI prefix corresponding to the prefix, if mappable.

>>> from bioregistry import get_resource
>>> get_resource("go").get_obofoundry_uri_prefix()  # standard
'http://purl.obolibrary.org/obo/GO_'
>>> get_resource("ncbitaxon").get_obofoundry_uri_prefix()  # mixed case
'http://purl.obolibrary.org/obo/NCBITaxon_'
>>> assert get_resource("sty").get_obofoundry_uri_prefix() is None
get_ols_prefix()[source]

Get the OLS prefix if available.

Return type

Optional[str]

get_ols_uri_format()[source]

Get the OLS URI format string for this entry, if possible.

Return type

Optional[str]

Returns

The OLS format string, if available.

Warning

This doesn’t have a normal form, so it only works for OBO Foundry at the moment.

>>> from bioregistry import get_resource
>>> get_resource("go").get_ols_uri_format()  # standard
'https://www.ebi.ac.uk/ols/ontologies/go/terms?iri=http://purl.obolibrary.org/obo/GO_$1'
>>> get_resource("ncbitaxon").get_ols_uri_format()  # mixed case
'https://www.ebi.ac.uk/ols/ontologies/ncbitaxon/terms?iri=http://purl.obolibrary.org/obo/NCBITaxon_$1'
>>> assert get_resource("sty").get_ols_uri_format() is None
get_ols_uri_prefix()[source]

Get the OLS URI prefix for this entry, if possible.

Return type

Optional[str]

Returns

The OLS URI prefix, if available.

Warning

This doesn’t have a normal form, so it only works for OBO Foundry at the moment.

>>> from bioregistry import get_resource
>>> get_resource("go").get_ols_uri_prefix()  # standard
'https://www.ebi.ac.uk/ols/ontologies/go/terms?iri=http://purl.obolibrary.org/obo/GO_'
>>> get_resource("ncbitaxon").get_ols_uri_prefix()  # mixed case
'https://www.ebi.ac.uk/ols/ontologies/ncbitaxon/terms?iri=http://purl.obolibrary.org/obo/NCBITaxon_'
>>> assert get_resource("sty").get_ols_uri_prefix() is None
get_pattern()[source]

Get the pattern for the given prefix, if it’s available.

Return type

Optional[str]

Returns

The pattern for the prefix, if it is available, using the following order of preference: 1. Custom 2. MIRIAM 3. Wikidata

get_pattern_re()[source]

Get the compiled pattern for the given prefix, if it’s available.

get_preferred_prefix()[source]

Get the preferred prefix (e.g., with stylization) if it exists.

Return type

Optional[str]

Returns

The preferred prefix, if annotated in the Bioregistry or OBO Foundry.

No preferred prefix annotation, defaults to normalized prefix >>> from bioregistry import get_resource >>> get_resource(“rhea”).get_preferred_prefix() None

Preferred prefix defined in the Bioregistry >>> get_resource(“wb”).get_preferred_prefix() ‘WormBase’

Preferred prefix defined in the OBO Foundry >>> get_resource(“fbbt”).get_preferred_prefix() ‘FBbt’

Preferred prefix from the OBO Foundry overridden by the Bioregistry (see also https://github.com/OBOFoundry/OBOFoundry.github.io/issues/1559) >>> get_resource(“dpo”).get_preferred_prefix() ‘DPO’

get_prefix_key(key, metaprefixes)[source]

Get a key enriched by the given external resources’ data.

get_prefixcommons_uri_format()[source]

Get the Prefix Commons URI format string for this entry, if available.

Return type

Optional[str]

Returns

The Prefix Commons URI format string, if available.

>>> from bioregistry import get_resource
>>> get_resource("hgmd").get_prefixcommons_uri_format()
'http://www.hgmd.cf.ac.uk/ac/gene.php?gene=$1'
get_publications()[source]

Get a list of publications.

get_repository()[source]

Return the repository, if available.

Return type

Optional[str]

get_scholia_prefix()[source]

Get the Scholia prefix, if available.

get_short_description(use_markdown=False)[source]

Get a short description.

Return type

Optional[str]

get_synonyms()[source]

Get synonyms.

Return type

Set[str]

get_twitter()[source]

Get the Twitter handle for ther resource.

Return type

Optional[str]

get_uri_format(priority=None)[source]

Get the URI format string for the given prefix, if it’s available.

Parameters

priority (Optional[Sequence[str]]) –

The priority order of metaresources to use for format URI lookup. The default is:

  1. Default first party (from bioregistry, prefix commons, or miriam)

  2. OBO Foundry

  3. Prefix Commons

  4. Identifiers.org

  5. N2T

  6. OLS

  7. BioPortal

Return type

Optional[str]

Returns

The best URI format string, where the $1 should be replaced by a local unique identifier. $1 could potentially appear multiple times.

>>> from bioregistry import get_resource
>>> get_resource("chebi").get_uri_format()
'https://www.ebi.ac.uk/chebi/searchId.do?chebiId=CHEBI:$1'

If you want to specify a different priority order, you can do so with the priority keyword. This is of particular interest to ontologists and semantic web people who might want to use purl.obolibrary.org URL prefixes over the URL prefixes corresponding to the first-party providers for each resource (e.g., the ChEBI example above). Do so like:

>>> from bioregistry import get_resource
>>> priority = ['obofoundry', 'bioregistry', 'prefixcommons', 'miriam', 'ols']
>>> get_resource("chebi").get_uri_format(priority=priority)
'http://purl.obolibrary.org/obo/CHEBI_$1'
get_uri_prefix(priority=None)[source]

Get a well-formed URI prefix, if available.

Parameters

priority (Optional[Sequence[str]]) – The prioirty order for get_format().

Return type

Optional[str]

Returns

The URI prefix. Similar to what’s returned by get_uri_format(), but it MUST have only one $1 and end with $1 to use thie function.

>>> import bioregistry
>>> bioregistry.get_uri_prefix('chebi')
'https://www.ebi.ac.uk/chebi/searchId.do?chebiId=CHEBI:'
get_version()[source]

Get the version for the resource.

Return type

Optional[str]

is_canonical_identifier(identifier)[source]

Check that a local unique identifier is canonical, meaning no bananas.

Return type

Optional[bool]

is_deprecated()[source]

Return if the given prefix corresponds to a deprecated resource.

Return type

bool

Returns

If the prefix has been explicitly marked as deprecated either by the Bioregistry, OBO Foundry, OLS, or MIRIAM. If no marks are present, assumed not to be deprecated.

>>> from bioregistry import get_resource
>>> assert get_resource("imr").is_deprecated()  # marked by OBO
>>> assert get_resource("iro").is_deprecated() # marked by Bioregistry
>>> assert get_resource("miriam.collection").is_deprecated() # marked by MIRIAM
is_known_identifier(identifier)[source]

Check that a local unique identifier can be normalized and also matches a prefix’s pattern.

Return type

Optional[bool]

miriam_standardize_identifier(identifier)[source]

Normalize the identifier for legacy usage with MIRIAM using the appropriate banana.

Parameters

identifier (str) – The identifier in the CURIE

Return type

str

Returns

A normalize identifier, possibly with banana/redundant prefix added

Because identifiers.org used to have URIs in the form of https://identifiers.org/<prefix>/<prefix>:<identifier> for entries annotated with namespaceEmbeddedInLui as true

Examples with explicitly annotated bananas: >>> from bioregistry import get_resource >>> get_resource(“vario”).miriam_standardize_identifier(‘0376’) ‘VariO:0376’ >>> get_resource(“vario”).miriam_standardize_identifier(‘VariO:0376’) ‘VariO:0376’

Examples with bananas from OBO: >>> get_resource(“fbbt”).miriam_standardize_identifier(‘00007294’) ‘FBbt:00007294’ >>> get_resource(“fbbt”).miriam_standardize_identifier(‘FBbt:00007294’) ‘FBbt:00007294’

Examples from OBO Foundry: >>> get_resource(“chebi”).miriam_standardize_identifier(‘1234’) ‘CHEBI:1234’ >>> get_resource(“chebi”).miriam_standardize_identifier(‘CHEBI:1234’) ‘CHEBI:1234’

Examples from OBO Foundry that should not have a redundant prefix added: >>> get_resource(“ncit”).miriam_standardize_identifier(“C73192”) ‘C73192’ >>> get_resource(“ncbitaxon”).miriam_standardize_identifier(“9606”) ‘9606’

Standard: >>> get_resource(“pdb”).miriam_standardize_identifier(‘00000020’) ‘00000020’

standardize_identifier(identifier, prefix=None)[source]

Normalize the identifier to not have a redundant prefix or banana.

Parameters
  • identifier (str) – The identifier in the CURIE

  • prefix (Optional[str]) – If an optional prefix is passed, checks that this isn’t also used as a caseolded banana like in go:go:1234567, which shouldn’t techinncally be right becauase the banana for gene ontology is GO.

Return type

str

Returns

A normalized identifier, possibly with banana/redundant prefix removed

Examples with explicitly annotated bananas: >>> from bioregistry import get_resource >>> get_resource(“vario”).standardize_identifier(‘0376’) ‘0376’ >>> get_resource(“vario”).standardize_identifier(‘VariO:0376’) ‘0376’ >>> get_resource(“swisslipid”).standardize_identifier(‘000000001’) ‘000000001’ >>> get_resource(“swisslipid”).standardize_identifier(‘SLM:000000001’) ‘000000001’

Examples with bananas from OBO: >>> get_resource(“fbbt”).standardize_identifier(‘00007294’) ‘00007294’ >>> get_resource(“fbbt”).standardize_identifier(‘FBbt:00007294’) ‘00007294’ >>> get_resource(“chebi”).standardize_identifier(‘1234’) ‘1234’ >>> get_resource(“chebi”).standardize_identifier(‘CHEBI:1234’) ‘1234’

Examples from OBO Foundry that should not have a redundant prefix added: >>> get_resource(“ncit”).standardize_identifier(“C73192”) ‘C73192’ >>> get_resource(“ncbitaxon”).standardize_identifier(“9606”) ‘9606’

Standard: >>> get_resource(“pdb”).standardize_identifier(‘00000020’) ‘00000020’

DEFAULT_URI_FORMATTER_PRIORITY: ClassVar[Sequence[str]] = ('default', 'obofoundry', 'prefixcommons', 'miriam', 'n2t', 'ols')
URI_FORMATTERS: ClassVar[Mapping[str, Callable[[bioregistry.schema.struct.Resource], Optional[str]]]] = {'default': <function Resource.get_default_format>, 'miriam': <function Resource.get_miriam_uri_format>, 'n2t': <function Resource.get_n2t_uri_format>, 'obofoundry': <function Resource.get_obofoundry_uri_format>, 'ols': <function Resource.get_ols_uri_format>, 'prefixcommons': <function Resource.get_prefixcommons_uri_format>}
pydantic model Collection[source]

A collection of resources.

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

Raises ValidationError if the input data cannot be parsed to form a valid model.

Show JSON schema
{
   "title": "Collection",
   "description": "A collection of resources.",
   "type": "object",
   "properties": {
      "identifier": {
         "title": "Identifier",
         "description": "The collection's identifier",
         "pattern": "^\\d{7}$",
         "type": "string"
      },
      "name": {
         "title": "Name",
         "description": "The name of the collection",
         "type": "string"
      },
      "description": {
         "title": "Description",
         "description": "A description of the collection",
         "type": "string"
      },
      "resources": {
         "title": "Resources",
         "description": "A list of prefixes of resources appearing in the collection",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "authors": {
         "title": "Authors",
         "description": "A list of authors/contributors to the collection",
         "type": "array",
         "items": {
            "$ref": "#/definitions/Author"
         }
      },
      "context": {
         "title": "Context",
         "type": "string"
      }
   },
   "required": [
      "identifier",
      "name",
      "description",
      "resources",
      "authors"
   ],
   "definitions": {
      "Author": {
         "title": "Author",
         "description": "Metadata for an author.",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "description": "The full name of the researcher",
               "type": "string"
            },
            "orcid": {
               "title": "Open Researcher and Contributor Identifier",
               "description": "The Open Researcher and Contributor Identifier (ORCiD) provides researchers with an open, unambiguous identifier for connecting various digital assets (e.g., publications, reviews) across the semantic web. An account can be made in seconds at https://orcid.org.",
               "type": "string"
            },
            "email": {
               "title": "Email address",
               "description": "The email address specific to the researcher.",
               "type": "string"
            },
            "github": {
               "title": "GitHub handle",
               "description": "The GitHub handle enables contacting the researcher on GitHub: the *de facto* version control in the computer sciences and life sciences.",
               "type": "string"
            }
         },
         "required": [
            "name",
            "orcid"
         ]
      }
   }
}

Fields
field authors: List[bioregistry.schema.struct.Author] [Required]

A list of authors/contributors to the collection

field context: Optional[str] = PydanticUndefined

JSON-LD context name

field description: str [Required]

A description of the collection

field identifier: str [Required]

The collection’s identifier

Constraints
  • pattern = ^d{7}$

field name: str [Required]

The name of the collection

field resources: List[str] [Required]

A list of prefixes of resources appearing in the collection

add_triples(graph)[source]

Add triples to an RDF graph for this collection.

Parameters

graph (rdflib.Graph) – An RDF graph

Return type

rdflib.term.Node

Returns

The RDF node representing this collection using a Bioregistry IRI.

as_context_jsonld()[source]

Get the JSON-LD context from a given collection.

Return type

Mapping[str, Mapping[str, str]]

as_prefix_map()[source]

Get the prefix map for a given collection.

Return type

Mapping[str, str]

pydantic model Registry[source]

Metadata about a registry.

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

Raises ValidationError if the input data cannot be parsed to form a valid model.

Show JSON schema
{
   "title": "Registry",
   "description": "Metadata about a registry.",
   "type": "object",
   "properties": {
      "prefix": {
         "title": "Prefix",
         "description": "The metaprefix for the registry itself. For example, the metaprefix for Identifiers.org is `miriam`.",
         "type": "string"
      },
      "name": {
         "title": "Name",
         "description": "The human-readable label for the registry",
         "type": "string"
      },
      "description": {
         "title": "Description",
         "description": "A full description of the registry.",
         "type": "string"
      },
      "homepage": {
         "title": "Homepage",
         "description": "The URL for the homepage of the registry.",
         "type": "string"
      },
      "example": {
         "title": "Example",
         "description": "An example prefix inside the registry.",
         "type": "string"
      },
      "availability": {
         "title": "Availability",
         "description": "A structured description of the metadata that the registry collects",
         "allOf": [
            {
               "$ref": "#/definitions/RegistrySchema"
            }
         ]
      },
      "download": {
         "title": "Download",
         "description": "A download link for the data contained in the registry",
         "type": "string"
      },
      "provider_uri_format": {
         "title": "Provider Uri Format",
         "description": "A URL with a $1 for a prefix to resolve in the registry",
         "type": "string"
      },
      "resolver_uri_format": {
         "title": "Resolver Uri Format",
         "description": "A URL with a $1 for a prefix and $2 for an identifier to resolve in the registry",
         "type": "string"
      },
      "resolver_type": {
         "title": "Resolver Type",
         "description": "An optional type annotation for what kind of resolver it is (i.e., redirect or lookup)",
         "type": "string"
      },
      "contact": {
         "title": "Contact",
         "description": "The contact for the registry.",
         "allOf": [
            {
               "$ref": "#/definitions/Attributable"
            }
         ]
      },
      "bioregistry_prefix": {
         "title": "Bioregistry Prefix",
         "description": "The prefix for this registry in the Bioregistry",
         "type": "string"
      },
      "logo_url": {
         "title": "Logo Url",
         "description": "The URL for the logo of the resource",
         "type": "string"
      },
      "license": {
         "title": "License",
         "description": "The license under which the resource is redistributed",
         "type": "string"
      },
      "short_name": {
         "title": "Short Name",
         "description": "A short name for the resource, e.g., for use in charts",
         "type": "string"
      }
   },
   "required": [
      "prefix",
      "name",
      "description",
      "homepage",
      "example",
      "availability",
      "contact"
   ],
   "definitions": {
      "RegistrySchema": {
         "title": "RegistrySchema",
         "description": "Metadata about a registry's schema.",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing",
                  "irrelevant",
                  "irrelevant*"
               ],
               "type": "string"
            },
            "homepage": {
               "title": "Homepage",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing",
                  "irrelevant",
                  "irrelevant*"
               ],
               "type": "string"
            },
            "description": {
               "title": "Description",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing",
                  "irrelevant",
                  "irrelevant*"
               ],
               "type": "string"
            },
            "example": {
               "title": "Example",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing",
                  "irrelevant",
                  "irrelevant*"
               ],
               "type": "string"
            },
            "pattern": {
               "title": "Pattern",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing",
                  "irrelevant",
                  "irrelevant*"
               ],
               "type": "string"
            },
            "provider": {
               "title": "Provider",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing",
                  "irrelevant",
                  "irrelevant*"
               ],
               "type": "string"
            },
            "alternate_providers": {
               "title": "Alternate Providers",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing",
                  "irrelevant",
                  "irrelevant*"
               ],
               "type": "string"
            },
            "synonyms": {
               "title": "Synonyms",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing",
                  "irrelevant",
                  "irrelevant*"
               ],
               "type": "string"
            },
            "license": {
               "title": "License",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing",
                  "irrelevant",
                  "irrelevant*"
               ],
               "type": "string"
            },
            "version": {
               "title": "Version",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing",
                  "irrelevant",
                  "irrelevant*"
               ],
               "type": "string"
            },
            "contact": {
               "title": "Contact",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing",
                  "irrelevant",
                  "irrelevant*"
               ],
               "type": "string"
            },
            "search": {
               "title": "Search",
               "description": "Does this resource have a search functionality for prefixes",
               "type": "boolean"
            },
            "fair": {
               "title": "Fair",
               "description": "Does this resource provide a structured dump of the data is easily findable, accessible, and in a structured format in bulk",
               "type": "boolean"
            },
            "fair_note": {
               "title": "Fair Note",
               "description": "Explanation for why data isn't FAIR",
               "type": "string"
            }
         },
         "required": [
            "name",
            "homepage",
            "description",
            "example",
            "pattern",
            "provider",
            "alternate_providers",
            "synonyms",
            "license",
            "version",
            "contact",
            "search",
            "fair"
         ]
      },
      "Attributable": {
         "title": "Attributable",
         "description": "An upper-level metadata for a researcher.",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "description": "The full name of the researcher",
               "type": "string"
            },
            "orcid": {
               "title": "Open Researcher and Contributor Identifier",
               "description": "The Open Researcher and Contributor Identifier (ORCiD) provides researchers with an open, unambiguous identifier for connecting various digital assets (e.g., publications, reviews) across the semantic web. An account can be made in seconds at https://orcid.org.",
               "type": "string"
            },
            "email": {
               "title": "Email address",
               "description": "The email address specific to the researcher.",
               "type": "string"
            },
            "github": {
               "title": "GitHub handle",
               "description": "The GitHub handle enables contacting the researcher on GitHub: the *de facto* version control in the computer sciences and life sciences.",
               "type": "string"
            }
         },
         "required": [
            "name"
         ]
      }
   }
}

Fields
field availability: bioregistry.schema.struct.RegistrySchema [Required]

A structured description of the metadata that the registry collects

field bioregistry_prefix: Optional[str] = PydanticUndefined

The prefix for this registry in the Bioregistry

field contact: bioregistry.schema.struct.Attributable [Required]

The contact for the registry.

field description: str [Required]

A full description of the registry.

field download: Optional[str] = PydanticUndefined

A download link for the data contained in the registry

field example: str [Required]

An example prefix inside the registry.

field homepage: str [Required]

The URL for the homepage of the registry.

field license: Optional[str] = PydanticUndefined

The license under which the resource is redistributed

field logo_url: Optional[str] = PydanticUndefined

The URL for the logo of the resource

field name: str [Required]

The human-readable label for the registry

field prefix: str [Required]

The metaprefix for the registry itself. For example, the metaprefix for Identifiers.org is miriam.

field provider_uri_format: Optional[str] = PydanticUndefined

A URL with a $1 for a prefix to resolve in the registry

field resolver_type: Optional[str] = PydanticUndefined

An optional type annotation for what kind of resolver it is (i.e., redirect or lookup)

field resolver_uri_format: Optional[str] = PydanticUndefined

A URL with a $1 for a prefix and $2 for an identifier to resolve in the registry

field short_name: Optional[str] = PydanticUndefined

A short name for the resource, e.g., for use in charts

add_triples(graph)[source]

Add triples to an RDF graph for this registry.

Parameters

graph (rdflib.Graph) – An RDF graph

Return type

rdflib.term.Node

Returns

The RDF node representing this registry using a Bioregistry IRI.

Get a link to the code on github that downloads this resource.

Return type

Optional[str]

get_provider_uri_format(prefix)[source]

Get the provider string.

Parameters

prefix (str) – The prefix used in the metaregistry

Return type

Optional[str]

Returns

The URL in the registry for the prefix, if it’s able to provide one

>>> from bioregistry import get_registry
>>> get_registry("fairsharing").get_provider_uri_format("FAIRsharing.62qk8w")
'https://fairsharing.org/FAIRsharing.62qk8w'
>>> get_registry("miriam").get_provider_uri_format("go")
'https://registry.identifiers.org/registry/go'
>>> get_registry("n2t").get_provider_uri_format("go")
'https://bioregistry.io/metaregistry/n2t/go'
get_provider_uri_prefix()[source]

Get provider URI prefix.

Return type

str

Returns

The URI prefix for the provider for prefixes in this registry.

>>> from bioregistry import get_registry
>>> get_registry("fairsharing").get_provider_uri_prefix()
'https://fairsharing.org/'
>>> get_registry("miriam").get_provider_uri_prefix()
'https://registry.identifiers.org/registry/'
>>> get_registry("n2t").get_provider_uri_prefix()
'https://bioregistry.io/metaregistry/n2t/'
get_resolver_uri_format(prefix)[source]

Generate a provider URI string based on mapping through this registry’s vocabulary.

Parameters

prefix (str) – The prefix used in the metaregistry

Return type

str

Returns

The URI format string to be used for identifiers in the semantic space based on this resolver or the Bioregistry’s meta-resolver.

>>> from bioregistry import get_registry
>>> get_registry("miriam").get_resolver_uri_format("go")
'https://identifiers.org/go:$1'
>>> get_registry("cellosaurus").get_resolver_uri_format("go")
'https://bioregistry.io/metaregistry/cellosaurus/go:$1'
>>> get_registry("n2t").get_resolver_uri_format("go")
'https://n2t.net/go:$1'
get_short_name()[source]

Get the short name or full name if none annotated.

Return type

str

resolve(prefix, identifier)[source]

Resolve the registry-specific prefix and identifier.

Parameters
  • prefix (str) – The prefix used in the metaregistry

  • identifier (str) – The identifier in the semantic space

Return type

Optional[str]

Returns

The URI format string for the given CURIE.

>>> from bioregistry import get_registry
>>> get_registry("miriam").resolve("go", "0032571")
'https://identifiers.org/go:0032571'
>>> get_registry("cellosaurus").resolve("go", "0032571")
'https://bioregistry.io/metaregistry/cellosaurus/go:0032571'
score()[source]

Calculate a metadata score/goodness for this registry.

Return type

int

pydantic model Context[source]

A prescriptive context contains configuration for generating fit-for-purpose prefix maps to serve various communities based on the standard Bioregistry prefix map, custom prefix remapping rules, custom URI prefix remapping rules, custom prefix maps, and other community-specific logic.

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

Raises ValidationError if the input data cannot be parsed to form a valid model.

Show JSON schema
{
   "title": "Context",
   "description": "A prescriptive context contains configuration for generating fit-for-purpose\nprefix maps to serve various communities based on the standard Bioregistry\nprefix map, custom prefix remapping rules, custom URI prefix remapping rules,\ncustom prefix maps, and other community-specific logic.",
   "type": "object",
   "properties": {
      "name": {
         "title": "Name",
         "description": "The name of the context",
         "type": "string"
      },
      "description": {
         "title": "Description",
         "description": "A description of the context, can include Markdown",
         "type": "string"
      },
      "maintainers": {
         "title": "Maintainers",
         "description": "A list of maintainers for the context",
         "type": "array",
         "items": {
            "$ref": "#/definitions/Author"
         }
      },
      "prefix_priority": {
         "title": "Prefix Priority",
         "description": "This ordering of metaprefixes (i.e., prefixes for registries) is used to determine the priority of which registry's prefixes are used. By default, the canonical Bioregistry prefixes are highest priority.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "include_synonyms": {
         "title": "Include Synonyms",
         "description": "Should synonyms be included in the prefix map?",
         "default": false,
         "type": "boolean"
      },
      "use_preferred": {
         "title": "Use Preferred",
         "description": "Should preferred prefixes (i.e., stylized prefixes) be preferred over canonicalized ones?",
         "default": false,
         "type": "boolean"
      },
      "uri_prefix_priority": {
         "title": "Uri Prefix Priority",
         "description": "This ordering of metaprefixes (i.e., prefixes for registries) is used to determine the priority of which registry's URI prefixes are used. By default, the canonical Bioregistry URI prefixes are highest priority.",
         "type": "array",
         "items": {
            "type": "string"
         }
      },
      "prefix_remapping": {
         "title": "Prefix Remapping",
         "description": "This is a mapping from canonical Bioregistry prefixes to custom prefixes used in this context.",
         "type": "object",
         "additionalProperties": {
            "type": "string"
         }
      },
      "custom_prefix_map": {
         "title": "Custom Prefix Map",
         "description": "This is a custom prefix map (which contains custom URL/URI expansions) that is added after all other logic is applied. Keys must either be canonical Bioregistry prefixes, prefixes used based on the given prefix priority, or values in the given prefix remapping.",
         "type": "object",
         "additionalProperties": {
            "type": "string"
         }
      }
   },
   "required": [
      "name",
      "description",
      "maintainers",
      "prefix_priority",
      "uri_prefix_priority",
      "prefix_remapping",
      "custom_prefix_map"
   ],
   "definitions": {
      "Author": {
         "title": "Author",
         "description": "Metadata for an author.",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "description": "The full name of the researcher",
               "type": "string"
            },
            "orcid": {
               "title": "Open Researcher and Contributor Identifier",
               "description": "The Open Researcher and Contributor Identifier (ORCiD) provides researchers with an open, unambiguous identifier for connecting various digital assets (e.g., publications, reviews) across the semantic web. An account can be made in seconds at https://orcid.org.",
               "type": "string"
            },
            "email": {
               "title": "Email address",
               "description": "The email address specific to the researcher.",
               "type": "string"
            },
            "github": {
               "title": "GitHub handle",
               "description": "The GitHub handle enables contacting the researcher on GitHub: the *de facto* version control in the computer sciences and life sciences.",
               "type": "string"
            }
         },
         "required": [
            "name",
            "orcid"
         ]
      }
   }
}

Fields
field custom_prefix_map: Optional[Dict[str, str]] [Required]

This is a custom prefix map (which contains custom URL/URI expansions) that is added after all other logic is applied. Keys must either be canonical Bioregistry prefixes, prefixes used based on the given prefix priority, or values in the given prefix remapping.

field description: str [Required]

A description of the context, can include Markdown

field include_synonyms: bool = False

Should synonyms be included in the prefix map?

field maintainers: List[bioregistry.schema.struct.Author] [Required]

A list of maintainers for the context

field name: str [Required]

The name of the context

field prefix_priority: Optional[List[str]] [Required]

This ordering of metaprefixes (i.e., prefixes for registries) is used to determine the priority of which registry’s prefixes are used. By default, the canonical Bioregistry prefixes are highest priority.

field prefix_remapping: Optional[Dict[str, str]] [Required]

This is a mapping from canonical Bioregistry prefixes to custom prefixes used in this context.

field uri_prefix_priority: Optional[List[str]] [Required]

This ordering of metaprefixes (i.e., prefixes for registries) is used to determine the priority of which registry’s URI prefixes are used. By default, the canonical Bioregistry URI prefixes are highest priority.

field use_preferred: bool = False

Should preferred prefixes (i.e., stylized prefixes) be preferred over canonicalized ones?

get_json_schema()[source]

Get the JSON schema for the bioregistry.