Registry

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"
      },
      "bibtex": {
         "title": "Bibtex",
         "description": "Citation key used in BibTex for this registry.",
         "type": "string"
      },
      "availability": {
         "title": "Availability",
         "description": "A structured description of the metadata that the registry collects",
         "allOf": [
            {
               "$ref": "#/definitions/RegistrySchema"
            }
         ]
      },
      "qualities": {
         "title": "Qualities",
         "description": "A structured description of the registry's qualities",
         "allOf": [
            {
               "$ref": "#/definitions/RegistryQualities"
            }
         ]
      },
      "governance": {
         "title": "Governance",
         "description": "A structured description of the governance for the registry",
         "allOf": [
            {
               "$ref": "#/definitions/RegistryGovernance"
            }
         ]
      },
      "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"
      },
      "search_uri_format": {
         "title": "Search Uri Format",
         "description": "A URL with a $1 for a prefix or string for searching for prefixes",
         "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",
      "qualities",
      "governance",
      "contact"
   ],
   "definitions": {
      "RegistrySchema": {
         "title": "RegistrySchema",
         "description": "Metadata about a registry's schema.",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "description": "This field denotes if a name is required, optional, or never captured for each record in the registry.",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing"
               ],
               "type": "string"
            },
            "homepage": {
               "title": "Homepage",
               "description": "This field denotes if a homepage is required, optional, or never captured for each record in the registry.",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing"
               ],
               "type": "string"
            },
            "description": {
               "title": "Description",
               "description": "This field denotes if a description is required, optional, or never captured for each record in the registry.",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing"
               ],
               "type": "string"
            },
            "example": {
               "title": "Example",
               "description": "This field denotes if an example local unique identifier is required, optional, or never captured for each record in the registry.",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing"
               ],
               "type": "string"
            },
            "pattern": {
               "title": "Pattern",
               "description": "This field denotes if a regular expression pattern for matching local unique identifiers is required, optional, or never captured for each record in the registry.",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing"
               ],
               "type": "string"
            },
            "provider": {
               "title": "Provider",
               "description": "This field denotes if a URI format string for converting local unique identifiers into URIs is required, optional, or never captured for each record in the registry.",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing"
               ],
               "type": "string"
            },
            "alternate_providers": {
               "title": "Alternate Providers",
               "description": "This field denotes if additional/secondary URI format strings for converting local unique identifiers into URIs is required, optional, or never captured for each record in the registry.",
               "enum": [
                  "present",
                  "missing"
               ],
               "type": "string"
            },
            "synonyms": {
               "title": "Synonyms",
               "description": "This field denotes if alternative prefixes (e.g., taxonomy for NCBITaxon) is required, optional, or never captured for each record in the registry.",
               "enum": [
                  "present",
                  "missing"
               ],
               "type": "string"
            },
            "license": {
               "title": "License",
               "description": "This field denotes if capturing the data license is required, optional, or never captured for each record in the registry.",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing"
               ],
               "type": "string"
            },
            "version": {
               "title": "Version",
               "description": "This field denotes if capturing the current data version is required, optional, or never captured for each record in the registry.",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing"
               ],
               "type": "string"
            },
            "contact": {
               "title": "Contact",
               "description": "This field denotes if capturing the primary responsible person's contact information (e.g., name, ORCID, email) is required, optional, or never captured for each record in the registry.",
               "enum": [
                  "required",
                  "required*",
                  "present",
                  "present*",
                  "missing"
               ],
               "type": "string"
            },
            "search": {
               "title": "Prefix Search",
               "description": "This field denotes if the registry provides either a dedicated page for searching for prefixes (e.g. AberOWL has a dedicated search page) OR a contextual search (e.g., AgroPortal has a prefix search built in its homepage).",
               "type": "boolean"
            }
         },
         "required": [
            "name",
            "homepage",
            "description",
            "example",
            "pattern",
            "provider",
            "alternate_providers",
            "synonyms",
            "license",
            "version",
            "contact",
            "search"
         ]
      },
      "RegistryQualities": {
         "title": "RegistryQualities",
         "description": "Qualities about a registry.",
         "type": "object",
         "properties": {
            "structured_data": {
               "title": "Structured Data",
               "description": "This field denotes if the registry provides structured access to its data? For example, this can be through an API (e.g., FAIRsharing, OLS) or a bulk download (e.g., OBO Foundry) in a structured file format. A counter-example is a site that must be scraped to acquire its content (e.g, the NCBI GenBank).",
               "type": "boolean"
            },
            "bulk_data": {
               "title": "Bulk Data",
               "description": "This field denotes if the registry provides a bulk dump of its data? For example, the OBO Foundry provides its bulk data in a file and Identifiers.org provides its bulk data in an API endpoint. A counterexample is FAIRsharing, which requires slow, expensive pagination through its data. Another counterexample is HL7 which requires manually navigating a form to download its content. While GenBank is not structured, it is still bulk downloadable.",
               "type": "boolean"
            },
            "no_authentication": {
               "title": "No Authentication",
               "description": "This field denotes if the registry provides access to its data without an API key? For example, Identifiers.org. As a counter-example, BioPortal requires an API key for access to its structured data.",
               "type": "boolean"
            },
            "automatable_download": {
               "title": "Automatable Download",
               "description": "This field denotes if the registry makes its data available downloadable in an automated way?This includes websites that have bulk downloads, paginated API downloads, or even require scraping.A counter example is HL7, whose download can not be automated due to the need to interact with a web form.",
               "default": true,
               "type": "boolean"
            }
         },
         "required": [
            "structured_data",
            "bulk_data",
            "no_authentication"
         ]
      },
      "RegistryGovernance": {
         "title": "RegistryGovernance",
         "description": "Metadata about a registry's governance.",
         "type": "object",
         "properties": {
            "curation": {
               "title": "Curation",
               "enum": [
                  "private",
                  "import",
                  "community",
                  "opaque-review",
                  "open-review"
               ],
               "type": "string"
            },
            "curates": {
               "title": "Curates",
               "description": "This field denotes if the registry's maintainers and potentially contributors curate novel prefixes.",
               "type": "boolean"
            },
            "imports": {
               "title": "Imports",
               "description": "This field denotes if the registry imports and aligns prefixes from other registries.",
               "type": "boolean"
            },
            "scope": {
               "title": "Scope",
               "description": "This field denotes the scope of prefixes which the registry covers. For example, some registries are limited to ontologies, some have a full scope over the life sciences, and some are general purpose.",
               "type": "string"
            },
            "comments": {
               "title": "Comments",
               "type": "string"
            },
            "accepts_external_contributions": {
               "title": "Accepts External Contributions",
               "description": "This field denotes if the registry (in theory) accepts external contributions, either via suggestion or proactive improvement. This field does not pass judgement on the difficult of this process from the perspective of the submitter nor the responsiveness of the registry. This field does not consider the ability for insiders (i.e., people with private relationships to the maintainers) to affect change.",
               "type": "boolean"
            },
            "public_version_controlled_data": {
               "title": "Public Version-Controlled Data",
               "description": "This field denotes if the registry stores its data in publicly available version control system, such as GitHub or GitLab",
               "type": "boolean"
            },
            "data_repository": {
               "title": "Data Repository",
               "description": "This field denotes the address of the registry's data version control repository.",
               "type": "string"
            },
            "code_repository": {
               "title": "Code Repository",
               "description": "This field denotes the address of the registry's code version control repository.",
               "type": "string"
            },
            "review_team": {
               "title": "Review Team",
               "description": "This field denotes if the registry's reviewers/moderators for external contributions known? If there's a well-defined, maintained listing, then it can be marked as public. If it can be inferred, e.g. from reading the commit history on a version control system, then it can be marked as inferrable. A closed review team, e.g., like for Identifiers.org can be marked as private. Resources that do not accept external contributions can be marked with N/A. An unmoderated regitry like Prefix.cc is marked with  'democratic'.",
               "enum": [
                  "public",
                  "inferrable",
                  "private",
                  "democratic",
                  "n/a"
               ],
               "type": "string"
            },
            "status": {
               "title": "Status",
               "description": "This field denotes the maitenance status of the repository. An active repository is still being maintained and also is responsive to external requests for improvement. An unresponsive repository is still being maintained in some capacity but is not responsive to external requests for improvement. An inactive repository is no longer being proactively maintained (though may receive occasional patches).",
               "enum": [
                  "active",
                  "unresponsive",
                  "inactive"
               ],
               "type": "string"
            },
            "issue_tracker": {
               "title": "Issue Tracker",
               "description": "This field denotes the public issue tracker for issues related to the code and data of the repository.",
               "type": "string"
            }
         },
         "required": [
            "curation",
            "curates",
            "imports",
            "scope",
            "accepts_external_contributions",
            "public_version_controlled_data",
            "review_team",
            "status"
         ]
      },
      "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: RegistrySchema [Required]

A structured description of the metadata that the registry collects

field bibtex: Optional[str] = None

Citation key used in BibTex for this registry.

field bioregistry_prefix: Optional[str] = None

The prefix for this registry in the Bioregistry

field contact: Attributable [Required]

The contact for the registry.

field description: str [Required]

A full description of the registry.

field download: Optional[str] = None

A download link for the data contained in the registry

field example: str [Required]

An example prefix inside the registry.

field governance: RegistryGovernance [Required]

A structured description of the governance for the registry

field homepage: str [Required]

The URL for the homepage of the registry.

field license: Optional[str] = None

The license under which the resource is redistributed

field logo_url: Optional[str] = None

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] = None

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

field qualities: RegistryQualities [Required]

A structured description of the registry’s qualities

field resolver_type: Optional[str] = None

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

field resolver_uri_format: Optional[str] = None

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

field search_uri_format: Optional[str] = None

A URL with a $1 for a prefix or string for searching for prefixes

field short_name: Optional[str] = None

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_quality_score()[source]

Get the quality score for this registry.

Return type

int

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

property has_permissive_license: bool

Check if the registry has a permissive license.

Return type

bool

property is_lookup: bool

Check if it is a lookup service.

Return type

bool

property is_prefix_provider: bool

Check if the registry is a prefix provider.

Return type

bool

property is_resolver: bool

Check if it is a resolver.

Return type

bool