A registry in a module.
module(Module)
The instance the registry belongs to.
name(character(1))
The API for the instance.
class_name(character(1))
The class name for the registry.
is_link_table(logical(1))
Whether the registry is a link table.
new()Creates an instance of this R6 class. This class should not be instantiated directly,
but rather by connecting to a LaminDB instance using the connect() function.
Registry$new(instance, module, api, registry_name, registry_schema)instanceThe instance the registry belongs to.
moduleThe module the registry belongs to.
apiThe API for the instance.
registry_nameThe name of the registry.
registry_schemaThe schema for the registry.
get()Get a record by ID or UID.
Registry$get(id_or_uid, include_foreign_keys = FALSE, verbose = FALSE)id_or_uidThe ID or UID of the record.
include_foreign_keysLogical, whether to include foreign keys in the record.
verboseLogical, whether to print verbose output.
A Record object.
df()Get a data frame summarising records in the registry
Registry$df(limit = 100, verbose = FALSE)limitMaximum number of records to return
verboseBoolean, whether to print progress messages
A data.frame containing the available records
from_df()Create a record from a data frame
Registry$from_df(dataframe, key = NULL, description = NULL, run = NULL)dataframeThe data.frame to create a record from
keyA relative path within the default storage
descriptionA string describing the record
runA Run object that creates the record
Creating records is only possible for the default instance, requires the
Python lamindb module and is only implemented for the core Artifact
registry.
A TemporaryRecord object containing the new record. This is not
saved to the database until temp_record$save() is called.
from_path()Create a record from a path
Registry$from_path(path, key = NULL, description = NULL, run = NULL)pathPath to create a record from
keyA relative path within the default storage
descriptionA string describing the record
runA Run object that creates the record
Creating records is only possible for the default instance, requires the
Python lamindb module and is only implemented for the core Artifact
registry.
A TemporaryRecord object containing the new record. This is not
saved to the database until temp_record$save() is called.
from_anndata()Create a record from an AnnData
Registry$from_anndata(adata, key = NULL, description = NULL, run = NULL)adataThe anndata::AnnData object to create a record from
keyA relative path within the default storage
descriptionA string describing the record
runA Run object that creates the record
Creating records is only possible for the default instance, requires the
Python lamindb module and is only implemented for the core Artifact
registry.
A TemporaryRecord object containing the new record. This is not
saved to the database until temp_record$save() is called.
get_fields()Get the fields in the registry.
Registry$get_fields()A list of Field objects.
get_field()Get a field by name.
Registry$get_field(field_name)field_nameThe name of the field.
A Field object.
get_field_names()Get the field names in the registry.
Registry$get_field_names()A character vector of field names.
get_record_class()Get the record class for the registry.
Note: This method is intended for internal use only and may be removed in the future.
Registry$get_record_class()A Record class.
get_temporary_record_class()Get the temporary record class for the registry.
Note: This method is intended for internal use only and may be removed in the future.
Registry$get_temporary_record_class()A TemporaryRecord class.
styleLogical, whether the output is styled using ANSI codes
A character vector
to_string()Create a string representation of a Registry
Registry$to_string(style = FALSE)styleLogical, whether the output is styled using ANSI codes
A cli::cli_ansi_string if style = TRUE or a character vector