Resource
- 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][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": "Resource", "description": "Metadata about an ontology, database, or other resource.", "type": "object", "properties": { "prefix": { "description": "The prefix for this resource", "title": "Prefix", "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The name of the resource", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A description of the resource", "title": "Description" }, "pattern": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The regular expression pattern for local unique identifiers in the resource", "title": "Pattern" }, "uri_format": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The URI format string, which must have at least one ``$1`` in it. Note that this field is generic enough to accept IRIs. See the URI specification (https://www.rfc-editor.org/rfc/rfc3986) and IRI specification (https://www.ietf.org/rfc/rfc3987.txt) for more information.", "title": "URI format string" }, "uri_format_resolvable": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "If false, denotes if the URI format string is known to be not resolvable", "title": "URI format string resolvable" }, "rdf_uri_format": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The RDF URI format string, which must have at least one ``$1`` in it. Note that this field is generic enough to accept IRIs. See the URI specification (https://www.rfc-editor.org/rfc/rfc3986) and IRI specification (https://www.ietf.org/rfc/rfc3987.txt) for more information.", "title": "RDF URI format string" }, "providers": { "anyOf": [ { "items": { "$ref": "#/$defs/Provider" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Additional, non-default providers for the resource", "title": "Providers" }, "homepage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The URL for the homepage of the resource, preferably using HTTPS", "title": "Homepage" }, "repository": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The URL for the repository of the resource", "title": "Repository" }, "contact": { "anyOf": [ { "$ref": "#/$defs/Attributable" }, { "type": "null" } ], "default": null, "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." }, "owners": { "anyOf": [ { "items": { "$ref": "#/$defs/Organization" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "The owner of the corresponding identifier space. See also https://github.com/biopragmatics/bioregistry/issues/755.", "title": "Owners" }, "example": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "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``", "title": "Example" }, "example_extras": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Extra example identifiers", "title": "Example Extras" }, "example_decoys": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Extra example identifiers that explicitly fail regex tests", "title": "Example Decoys" }, "license": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The license for the resource", "title": "License" }, "version": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The version for the resource", "title": "Version" }, "part_of": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "An annotation between this prefix and a super-prefix. For example, ``chembl.compound`` is a part of ``chembl``.", "title": "Part Of" }, "provides": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "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``.", "title": "Provides" }, "download_owl": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "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/.", "title": "OWL Download URL" }, "download_obo": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "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.", "title": "OBO Download URL" }, "download_json": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "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.", "title": "OBO Graph JSON Download URL" }, "download_rdf": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The URL to download the resource as an RDF file, in one of many formats.", "title": "RDF Download URL" }, "banana": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "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.", "title": "Banana" }, "banana_peel": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Delimiter used in banana", "title": "Banana Peel" }, "deprecated": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "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 others on the deprecation status, since they often disagree and are very conservative in calling dead resources.", "title": "Deprecated" }, "mappings": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "default": null, "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.", "title": "Mappings" }, "synonyms": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "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``.", "title": "Synonyms" }, "keywords": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of keywords for the resource", "title": "Keywords" }, "references": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of URLs to also see, such as publications describing the resource", "title": "References" }, "publications": { "anyOf": [ { "items": { "$ref": "#/$defs/Publication" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of URLs to also see, such as publications describing the resource", "title": "Publications" }, "appears_in": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of prefixes that use this resource for xrefs, provenance, etc.", "title": "Appears In" }, "depends_on": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of prefixes that use this resource depends on, e.g., ontologies that import each other.", "title": "Depends On" }, "namespace_in_lui": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "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``.", "title": "Namespace Embedded in Local Unique Identifier" }, "no_own_terms": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "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.", "title": "No Own Terms" }, "comment": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A field for a free text comment", "title": "Comment" }, "contributor": { "anyOf": [ { "$ref": "#/$defs/Author" }, { "type": "null" } ], "default": null, "description": "The contributor of the prefix to the Bioregistry, including at a minimum their name and ORCiD and optional their email address and GitHub handle. All entries curated through the Bioregistry GitHub Workflow must contain this field." }, "contributor_extras": { "anyOf": [ { "items": { "$ref": "#/$defs/Author" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Additional contributors besides the original submitter.", "title": "Contributor Extras" }, "reviewer": { "anyOf": [ { "$ref": "#/$defs/Author" }, { "type": "null" } ], "default": null, "description": "The reviewer of the prefix to the Bioregistry, including at a minimum their name and ORCiD and optional 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." }, "proprietary": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "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.", "title": "Proprietary" }, "has_canonical": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "If this shares an IRI with another entry, maps to which should be be considered as canonical", "title": "Has Canonical" }, "preferred_prefix": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "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.", "title": "Preferred Prefix" }, "twitter": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The twitter handle for the project", "title": "Twitter" }, "mastodon": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The mastodon handle for the project", "title": "Mastodon" }, "github_request_issue": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The GitHub issue for the new prefix request", "title": "Github Request Issue" }, "logo": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The URL of the logo for the project/resource", "title": "Logo" }, "miriam": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Miriam" }, "n2t": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "N2T" }, "prefixcommons": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Prefixcommons" }, "wikidata": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Wikidata" }, "go": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Go" }, "obofoundry": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Obofoundry" }, "bioportal": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Bioportal" }, "ecoportal": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Ecoportal" }, "agroportal": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Agroportal" }, "cropoct": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Cropoct" }, "ols": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Ols" }, "aberowl": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Aberowl" }, "ncbi": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Ncbi" }, "uniprot": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Uniprot" }, "biolink": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Biolink" }, "cellosaurus": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Cellosaurus" }, "ontobee": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Ontobee" }, "cheminf": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Cheminf" }, "fairsharing": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Fairsharing" }, "biocontext": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Biocontext" }, "edam": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Edam" }, "re3data": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Re3Data" }, "hl7": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Hl7" }, "bartoc": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "BARTOC" }, "rrid": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "RRID" }, "lov": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "LOV" }, "zazuko": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Zazuko" }, "togoid": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Togoid" }, "integbio": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Integbio" }, "pathguide": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "title": "Pathguide" } }, "$defs": { "Attributable": { "description": "An upper-level metadata for a researcher.", "properties": { "name": { "description": "The full name of the researcher", "title": "Name", "type": "string" }, "orcid": { "anyOf": [ { "pattern": "^\\d{4}-\\d{4}-\\d{4}-\\d{3}(\\d|X)$", "type": "string" }, { "type": "null" } ], "default": null, "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.", "title": "Open Researcher and Contributor Identifier" }, "email": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The email address specific to the researcher.", "title": "Email address" }, "github": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The GitHub handle enables contacting the researcher on GitHub: the *de facto* version control in the computer sciences and life sciences.", "title": "GitHub handle" } }, "required": [ "name" ], "title": "Attributable", "type": "object" }, "Author": { "description": "Metadata for an author.", "properties": { "name": { "description": "The full name of the researcher", "title": "Name", "type": "string" }, "orcid": { "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.", "pattern": "^\\d{4}-\\d{4}-\\d{4}-\\d{3}(\\d|X)$", "title": "Open Researcher and Contributor Identifier", "type": "string" }, "email": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The email address specific to the researcher.", "title": "Email address" }, "github": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The GitHub handle enables contacting the researcher on GitHub: the *de facto* version control in the computer sciences and life sciences.", "title": "GitHub handle" } }, "required": [ "name", "orcid" ], "title": "Author", "type": "object" }, "Organization": { "description": "Model for organizataions.", "properties": { "ror": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "ROR identifier for a record about the organization", "title": "Research Organization Registry identifier" }, "wikidata": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Wikidata identifier for a record about the organization", "title": "Wikidata identifier" }, "name": { "description": "Name of the organization", "title": "Name", "type": "string" }, "partnered": { "default": false, "description": "Has this organization made a specific connection with Bioregistry?", "title": "Partnered", "type": "boolean" } }, "required": [ "name" ], "title": "Organization", "type": "object" }, "Provider": { "description": "A provider.", "properties": { "code": { "description": "A locally unique code within the prefix for the provider", "title": "Code", "type": "string" }, "name": { "description": "Name of the provider", "title": "Name", "type": "string" }, "description": { "description": "Description of the provider", "title": "Description", "type": "string" }, "homepage": { "description": "Homepage of the provider", "title": "Homepage", "type": "string" }, "uri_format": { "description": "The URI format string, which must have at least one ``$1`` in it. Note that this field is generic enough to accept IRIs. See the URI specification (https://www.rfc-editor.org/rfc/rfc3986) and IRI specification (https://www.ietf.org/rfc/rfc3987.txt) for more information.", "title": "URI Format", "type": "string" }, "first_party": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "Annotates whether a provider is from the first-party organization", "title": "First Party" }, "publications": { "anyOf": [ { "items": { "$ref": "#/$defs/Publication" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "A list of publications about the provider. See the `indra` provider for `hgnc` for an example.", "title": "Publications" } }, "required": [ "code", "name", "description", "homepage", "uri_format" ], "title": "Provider", "type": "object" }, "Publication": { "description": "Metadata about a publication.", "properties": { "pubmed": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The PubMed identifier for the article", "title": "PubMed" }, "doi": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The DOI for the article. DOIs are case insensitive, so these are required by the Bioregistry to be standardized to their lowercase form.", "title": "DOI" }, "pmc": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The PubMed Central identifier for the article", "title": "PMC" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "The title of the article", "title": "Title" }, "year": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "The year the article was published", "title": "Year" } }, "title": "Publication", "type": "object" } }, "required": [ "prefix" ] }
- Fields:
- field agroportal: Mapping[str, Any] | None = None
External data from the AgroPortal ontology repository
- field appears_in: List[str] | None = None
A list of prefixes that use this resource for xrefs, provenance, etc.
- field banana: str | None = None
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., foroma.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 prefixswisslipid
but have the redundant informationSLM:
in the beginning of identifiers. Therefore,SLM:
is the banana.
- field biolink: Mapping[str, Any] | None = None
External data from the BioLink Model’s custom registry
- field bioportal: Mapping[str, Any] | None = None
External data from the BioPortal ontology repository
- field cellosaurus: Mapping[str, Any] | None = None
External data from the Cellosaurus custom registry
- field contact: Attributable | None = None
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: Author | None = None
The contributor of the prefix to the Bioregistry, including at a minimum their name and ORCiD and optional their email address and GitHub handle. All entries curated through the Bioregistry GitHub Workflow must contain this field.
- field contributor_extras: List[Author] | None = None
Additional contributors besides the original submitter.
- field cropoct: Mapping[str, Any] | None = None
External data from the CropOCT ontology curation tool
- field depends_on: List[str] | None = None
A list of prefixes that use this resource depends on, e.g., ontologies that import each other.
- field deprecated: bool | None = None
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 others on the deprecation status, since they often disagree and are very conservative in calling dead resources.
- field download_json: str | None = None
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: str | None = None
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: str | None = None
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 download_rdf: str | None = None
The URL to download the resource as an RDF file, in one of many formats.
- field ecoportal: Mapping[str, Any] | None = None
External data from the EcoPortal ontology repository
- field example: str | None = None
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 likeGO:1234567
- field example_decoys: List[str] | None = None
Extra example identifiers that explicitly fail regex tests
- field has_canonical: str | None = None
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 mappings: Dict[str, str] | None = None
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 namespace_in_lui: bool | None = None
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
, andvario
.
- field no_own_terms: bool | None = None
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: Mapping[str, Any] | None = None
External data from the Open Biomedical Ontologies (OBO) Foundry catalog
- field owners: List[Organization] | None = None
The owner of the corresponding identifier space. See also https://github.com/biopragmatics/bioregistry/issues/755.
- field part_of: str | None = None
An annotation between this prefix and a super-prefix. For example,
chembl.compound
is a part ofchembl
.
- field pattern: str | None = None
The regular expression pattern for local unique identifiers in the resource
- field preferred_prefix: str | None = None
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 proprietary: bool | None = None
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 provides: str | None = None
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 fromncbigene
, soctd.gene
providesncbigene
.
- field publications: List[Publication] | None = None
A list of URLs to also see, such as publications describing the resource
- field rdf_uri_format: str | None = None
The RDF URI format string, which must have at least one
$1
in it. Note that this field is generic enough to accept IRIs. See the URI specification (https://www.rfc-editor.org/rfc/rfc3986) and IRI specification (https://www.ietf.org/rfc/rfc3987.txt) for more information.
- field references: List[str] | None = None
A list of URLs to also see, such as publications describing the resource
- field reviewer: Author | None = None
The reviewer of the prefix to the Bioregistry, including at a minimum their name and ORCiD and optional 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: List[str] | None = None
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 likeSNOWMEDCT
, lexical variants likeSNOMED_CT
, version-variants likeSNOMEDCT_2010_1_31
, and tons of other nonsense likeSNOMEDCTCT
.
- field uri_format: str | None = None
The URI format string, which must have at least one
$1
in it. Note that this field is generic enough to accept IRIs. See the URI specification (https://www.rfc-editor.org/rfc/rfc3986) and IRI specification (https://www.ietf.org/rfc/rfc3987.txt) for more information.
- field uri_format_resolvable: bool | None = None
If false, denotes if the URI format string is known to be not resolvable
- get_banana() str | None [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
- 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("go").get_banana() 'GO' >>> get_resource("vario").get_banana() 'VariO'
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_banana_peel() str [source]
Get the delimiter between the banana and the local unique identifier.
- get_bartoc_uri_format() str | None [source]
Get the BARTOC URI format string for this entry, if available.
- Returns:
The BARTOC URI format string, if available.
>>> from bioregistry import get_resource >>> get_resource("ddc").get_bartoc_uri_format() 'http://dewey.info/class/$1/e23/'
- get_biocontext_uri_format() str | None [source]
Get the BioContext URI format string for this entry, if available.
- Returns:
The BioContext URI format string, if available.
>>> from bioregistry import get_resource >>> get_resource("hgmd").get_biocontext_uri_format() 'http://www.hgmd.cf.ac.uk/ac/gene.php?gene=$1'
- get_bioregistry_uri_format() str | None [source]
Get the Bioregisry URI format string for this entry.
- Returns:
A Bioregistry URI, if this can be resolved.
>>> from bioregistry import get_resource >>> get_resource("go").get_bioregistry_uri_format() 'https://bioregistry.io/go:$1'
- get_contact() Attributable | None [source]
Get the contact, if available.
- Returns:
A contact
>>> from bioregistry import get_resource >>> get_resource("frapo").get_contact().email 'silvio.peroni@unibo.it'
- get_contact_email() str | None [source]
Return the contact email, if available.
- 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_resource("frapo").get_contact_email() 'silvio.peroni@unibo.it'
- get_contact_github() str | None [source]
Return the contact GitHub handle, if available.
- 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() str | None [source]
Return the contact name, if available.
- 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_resource("frapo").get_contact_name() 'Silvio Peroni'
- get_contact_orcid() str | None [source]
Return the contact ORCiD, if available.
- 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_resource("frapo").get_contact_orcid() '0000-0003-0530-4305'
- get_curie(identifier: str, use_preferred: bool = False) str [source]
Get a CURIE for a local unique identifier in this resource’s semantic space.
- Parameters:
identifier – A local unique identifier in this resource’s semantic space
use_preferred – Should preferred prefixes be used? Set this to true if you’re in the OBO context.
- Returns:
A CURIE for the given identifier
>>> import bioregistry >>> resource = bioregistry.get_resource("go") >>> resource.get_curie("0000001") 'go:0000001' >>> resource.get_curie("0000001", use_preferred=True) 'GO:0000001'
- get_default_format() str | None [source]
Get the default, first-party URI prefix.
- Returns:
The first-party URI prefix string, if available.
>>> from bioregistry import get_resource >>> get_resource("ncbitaxon").get_default_format() 'http://purl.obolibrary.org/obo/NCBITaxon_$1' >>> get_resource("go").get_default_format() 'http://purl.obolibrary.org/obo/GO_$1'
- get_default_uri(identifier: str) str | None [source]
Return the default URI for the identifier.
- Parameters:
identifier – The local identifier in the nomenclature represented by this resource
- 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") 'http://purl.obolibrary.org/obo/CHEBI_24867'
- get_description(use_markdown: bool = False) str | None [source]
Get the description for the given prefix, if available.
- get_download_obo() str | None [source]
Get the download link for the latest OBO file.
- Returns:
A URL for an OBO text file download, if exists.
Get an ontology download link annotated directly in the Bioregistry:
>>> from bioregistry import get_resource >>> get_resource("caloha").get_download_obo() 'https://raw.githubusercontent.com/calipho-sib/controlled-vocabulary/master/caloha.obo'
Get an ontology download link from the OBO Foundry:
>>> get_resource("bfo").get_download_obo() 'http://purl.obolibrary.org/obo/bfo.obo'
Get ontology download link from OLS where OWL isn’t available >>> get_resource(“hpath”).get_download_obo() ‘https://raw.githubusercontent.com/Novartis/hpath/master/src/hpath.obo’
Get ontology download link in AberOWL but not OBO Foundry (note this might change over time so the exact value isn’t used in the doctest):
>>> url = get_resource("dermo").get_download_obo() >>> assert url is not None and url.startswith("http://aber-owl.net/media/ontologies/DERMO")
- get_download_obograph() str | None [source]
Get the download link for the latest OBOGraph JSON file.
- get_download_owl() str | None [source]
Get the download link for the latest OWL file.
- Returns:
A URL for an OWL file download, if exists.
Get an ontology download link annotated directly in the Bioregistry:
>>> from bioregistry import get_resource >>> get_resource("orphanet.ordo").get_download_owl() 'http://www.orphadata.org/data/ORDO/ordo_orphanet.owl'
Get an ontology download link from the OBO Foundry:
>>> get_resource("mod").get_download_owl() 'http://purl.obolibrary.org/obo/mod.owl'
Get ontology download link in AberOWL but not OBO Foundry (note this might change over time so the exact value isn’t used in the doctest):
>>> url = get_resource("birnlex").get_download_owl() >>> assert url is not None and url.startswith("http://aber-owl.net/media/ontologies/BIRNLEX/")
- get_example_curie(use_preferred: bool = False) str | None [source]
Get an example CURIE, if an example identifier is available.
- Parameters:
use_preferred – Should the preferred prefix be used instead of the Bioregistry prefix (if it exists)?
- Returns:
An example CURIE for this resource
- get_identifiers_org_prefix() str | None [source]
Get the MIRIAM/Identifiers.org prefix, if available.
- 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_legacy_alt_miriam_uri_format() str | None [source]
Get the legacy Identifiers.org URI format string for this entry, if possible.
- get_legacy_miriam_uri_format() str | None [source]
Get the legacy Identifiers.org URI format string for this entry, if possible.
- get_mapped_prefix(metaprefix: str) str | None [source]
Get the prefix for the given external.
- Parameters:
metaprefix – The metaprefix for the external resource
- 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_resource("chebi").get_mapped_prefix("obofoundry") 'CHEBI'
- get_mastodon() str | None [source]
Get the Mastodon handle for the resource.
- Returns:
The Mastodon handle. Note that this does not include a leading
@
>>> from bioregistry import get_resource >>> get_resource("go").get_mastodon() 'go@genomic.social'
- get_mastodon_url() str | None [source]
Get the Mastodon URL for the resource.
- Returns:
The URL link for the mastodon account, if available
>>> from bioregistry import get_resource >>> get_resource("go").get_mastodon_url() 'https://genomic.social/@go'
- get_miriam_uri_format(legacy_delimiter: bool = False, legacy_protocol: bool = False, legacy_banana: bool = False) str | None [source]
Get the Identifiers.org URI format string for this entry, if possible.
- Parameters:
legacy_protocol – If true, uses HTTP
legacy_delimiter – If true, uses a slash delimiter for CURIEs instead of colon
legacy_banana – If true, uses a slash delimiter for CURIEs and a redundant namespace in prefix
- 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(legacy_delimiter: bool = False, legacy_protocol: bool = False, legacy_banana: bool = False) str | None [source]
Get the Identifiers.org URI prefix for this entry, if possible.
- Parameters:
legacy_protocol – If true, uses HTTP
legacy_delimiter – If true, uses a slash delimiter for CURIEs instead of colon
legacy_banana – If true, uses a slash delimiter for CURIEs and a redundant namespace in prefix
- 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:' >>> get_resource('doid').get_miriam_uri_prefix(legacy_banana=True) 'https://identifiers.org/doid/DOID:' >>> get_resource('vario').get_miriam_uri_prefix(legacy_banana=True) 'https://identifiers.org/vario/VariO:' >>> get_resource('cellosaurus').get_miriam_uri_prefix(legacy_banana=True) 'https://identifiers.org/cellosaurus/CVCL_' >>> get_resource('doid').get_miriam_uri_prefix(legacy_delimiter=True) 'https://identifiers.org/DOID/' >>> assert get_resource('sty').get_miriam_uri_prefix() is None
- get_n2t_uri_format(legacy_protocol: bool = False)[source]
Get the Name-to-Thing URI format string, if available.
- get_nt2_uri_prefix(legacy_protocol: bool = False) str | None [source]
Get the Name-to-Thing URI prefix for this entry, if possible.
- get_obo_preferred_prefix() str | None [source]
Get the OBO preferred prefix, if this resource is mapped to the OBO Foundry.
- get_obofoundry_prefix() str | None [source]
Get the OBO Foundry prefix if available.
- Returns:
The OBO prefix, if available.
>>> from bioregistry import get_resource >>> get_resource("go").get_obofoundry_prefix() # standard 'GO' >>> get_resource("aao").get_obofoundry_prefix() # standard but deprecated 'AAO' >>> get_resource("ncbitaxon").get_obofoundry_prefix() # mixed case 'NCBITaxon' >>> assert get_resource("sty").get_obofoundry_prefix() is None
- get_obofoundry_uri_format() str | None [source]
Get the OBO Foundry URI format string for this entry, if possible.
- 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() str | None [source]
Get the OBO Foundry URI prefix for this entry, if possible.
- 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_uri_format() str | None [source]
Get the OLS URI format string for this entry, if possible.
- 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() str | None [source]
Get the OLS URI prefix for this entry, if possible.
- 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() str | None [source]
Get the pattern for the given prefix, if it’s available.
- Returns:
The pattern for the prefix, if it is available, using the following order of preference: 1. Custom 2. MIRIAM 3. Wikidata 4. BARTOC
- get_pattern_re_with_banana(strict: bool = True)[source]
Get the compiled pattern for the prefix including a banana if available.
Warning
This function is meant to mediate backwards compatibility with legacy MIRIAM/Identifiers.org standards. New projects should not use redundant prefixes in their local unique identifiers.
- Parameters:
strict – If True (default), and a banana exists for the prefix, the banana is required in the pattern. If False, the pattern will match the banana if present but will also match the identifier without the banana.
- Returns:
A compiled pattern for the prefix if available
>>> import bioregistry as br >>> resource = br.get_resource("chebi")
Strict match requires banana >>> resource.get_pattern_re_with_banana().match(“1234”)
>>> resource.get_pattern_re_with_banana().match("CHEBI:1234") <re.Match object; span=(0, 10), match='CHEBI:1234'>
Loose match does not require banana >>> resource.get_pattern_re_with_banana(strict=False).match(‘1234’) <re.Match object; span=(0, 4), match=’1234’> >>> resource.get_pattern_re_with_banana(strict=False).match(‘CHEBI:1234’) <re.Match object; span=(0, 10), match=’CHEBI:1234’>
- get_pattern_with_banana(strict: bool = True) str | None [source]
Get the pattern for the prefix including a banana if available.
Warning
This function is meant to mediate backwards compatibility with legacy MIRIAM/Identifiers.org standards. New projects should not use redundant prefixes in their local unique identifiers.
- Parameters:
strict – If True (default), and a banana exists for the prefix, the banana is required in the pattern. If False, the pattern will match the banana if present but will also match the identifier without the banana.
- Returns:
A pattern for the prefix if available
>>> import bioregistry as br >>> resource = br.get_resource("chebi")
Strict match requires the banana to be present >>> resource.get_pattern_with_banana() ‘^CHEBI:\d+$’
Non-strict match allows the banana to be optionally present >>> resource.get_pattern_with_banana(strict=False) ‘^(CHEBI:)?\d+$’
- get_preferred_prefix() str | None [source]
Get the preferred prefix (e.g., with stylization) if it exists.
- 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: str, metaprefixes: str | Sequence[str])[source]
Get a key enriched by the given external resources’ data.
- get_prefixcommons_uri_format() str | None [source]
Get the Prefix Commons URI format string for this entry, if available.
- Returns:
The Prefix Commons URI format string, if available.
>>> from bioregistry import get_resource >>> get_resource("antweb").get_prefixcommons_uri_format() 'http://www.antweb.org/specimen.do?name=$1'
- get_priority_prefix(priority: None | str | Sequence[str] = None) str [source]
Get a prioritized prefix.
- Parameters:
priority –
A metaprefix or list of metaprefixes used to choose a prioritized prefix. Some special values that are not themselves metaprefixes are allowed from the following list:
”default”: corresponds to the bioregistry prefix
”bioregistry.upper”: an uppercase transform of the canonical bioregistry prefix
”preferred”: a preferred prefix, typically includes stylization in capitalization
”obofoundry.preferred”: the preferred prefix annotated in OBO Foundry
- Returns:
The prioritized prefix for this record
- get_rdf_uri(identifier: str) str | None [source]
Return the RDF URI for the identifier.
- Parameters:
identifier – The local identifier in the nomenclature represented by this resource
- Returns:
The canonical RDF URI for the local identifier, if one can be constructed
>>> from bioregistry import get_resource >>> get_resource("edam").get_rdf_uri("data_1153") 'http://edamontology.org/data_1153'
- get_rdf_uri_format() str | None [source]
Get the URI format string for the given prefix for RDF usages.
- get_rrid_uri_format() str | None [source]
Get the RRID URI format.
- Returns:
The RRID format string, if available.
>>> from bioregistry import get_resource >>> get_resource("antibodyregistry").get_rrid_uri_format() # standard 'https://scicrunch.org/resolver/RRID:AB_$1' >>> assert get_resource("go").get_rrid_uri_format() is None
- get_uri_format(priority: Sequence[str] | None = None) str | None [source]
Get the URI format string for the given prefix, if it’s available.
- Parameters:
priority –
The priority order of metaresources to use for format URI lookup. The default is:
Manually curated URI Format in the Bioregistry
Default first party (e.g., MIRIAM, BioContext, Prefix Commons, Wikidata)
OBO Foundry
MIRIAM/Identifiers.org (i.e., make a URI like https://identifiers.org/<prefix>:<identifier>)
N2T (i.e., make a URI like https://n2t.org/<prefix>:<identifier>)
OLS
- 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() 'http://purl.obolibrary.org/obo/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 usepurl.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', 'biocontext', 'miriam', 'ols'] >>> get_resource("chebi").get_uri_format(priority=priority) 'http://purl.obolibrary.org/obo/CHEBI_$1'
- get_uri_prefix(priority: Sequence[str] | None = None) str | None [source]
Get a well-formed URI prefix, if available.
- Parameters:
priority – The prioirty order for
get_format()
.- 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 the function.
>>> import bioregistry >>> bioregistry.get_uri_prefix('chebi') 'http://purl.obolibrary.org/obo/CHEBI_'
- is_deprecated() bool [source]
Return if the given prefix corresponds to a deprecated resource.
- 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_standardizable_identifier(identifier: str) bool [source]
Check that a local unique identifier can be normalized and also matches a prefix’s pattern.
- is_valid_identifier(identifier: str) bool [source]
Check that a local unique identifier is canonical, meaning no bananas.
- miriam_standardize_identifier(identifier: str) str | None [source]
Normalize the identifier for legacy usage with MIRIAM using the appropriate banana.
- Parameters:
identifier – The identifier in the CURIE
- 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
astrue
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(“go”).miriam_standardize_identifier(‘0000001’) ‘GO:0000001’ >>> get_resource(“go”).miriam_standardize_identifier(’GO:0000001’) ‘GO:0000001’
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’
- model_post_init(context: Any, /) None
This function is meant to behave like a BaseModel method to initialise private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Args:
self: The BaseModel instance. context: The context.
- standardize_identifier(identifier: str) str [source]
Normalize the identifier to not have a redundant prefix or banana.
- Parameters:
identifier – The identifier in the CURIE
- 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(“chebi”).standardize_identifier(‘1234’) ‘1234’ >>> get_resource(“chebi”).standardize_identifier(‘CHEBI: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', 'bioregistry')
The point of this priority order is to figure out what URI format string to give back. The “default” means it’s goign to go into the metaregistry and try and find a real URI, not a re-directed one. If it can’t manage that, try and get an OBO foundry redirect (though note this is only applicable to a small number of prefixes corresponding to ontologies). Finally, if this doesn’t work, give a Bioregistry URI
- URI_FORMATTERS: ClassVar[Mapping[str, Callable[[Resource], str | None]]] = {'biocontext': <function Resource.get_biocontext_uri_format>, 'bioregistry': <function Resource.get_bioregistry_uri_format>, 'default': <function Resource.get_default_format>, 'miriam': <function Resource.get_miriam_uri_format>, 'miriam.legacy': <function Resource.get_legacy_miriam_uri_format>, 'miriam.legacy_banana': <function Resource.get_legacy_alt_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>, 'rdf': <function Resource.get_rdf_uri_format>, 'rrid': <function Resource.get_rrid_uri_format>}