Connect to a LaminDB instance using the connect() function.
The instance object provides access to the modules and registries
of the instance.
is_default(logical(1))
Whether this is the default instance.
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.
Instance$new(settings, api, schema, is_default, py_lamin)settingsThe settings for the instance
apiThe API for the instance
schemaThe schema for the instance
is_defaultLogical, whether this is the default instance
py_laminA Python lamindb module object
get_modules()Get the modules for the instance.
Instance$get_modules()A list of Module objects.
get_module()Get a module by name.
Instance$get_module(module_name)module_nameThe name of the module.
The Module object.
get_module_names()Get the names of the modules. Example: c("core", "bionty").
Instance$get_module_names()A character vector of module names.
get_settings()Get instance settings.
Note: This method is intended for internal use only and may be removed in the future.
Instance$get_settings()The settings for the instance.
get_api()Get instance API.
Note: This method is intended for internal use only and may be removed in the future.
Instance$get_api()The API for the instance.
get_py_lamin()Get the Python lamindb module
Instance$get_py_lamin(check = FALSE, what = "This functionality")checkLogical, whether to perform checks
whatWhat the python module is being requested for, used in check messages
Python lamindb module.
track()Start a run with tracked data lineage
Instance$track(transform = NULL, path = NULL)transformUID specifying the data transformation
pathPath to the R script or document to track
Calling track() with transform = NULL with return a UID, providing
that UID with the same path with start a run
finish()Finish a tracked run
Instance$finish()
styleLogical, whether the output is styled using ANSI codes
to_string()Create a string representation of an Instance
Instance$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
Note that by connecting to an instance via connect(), you receive
a "richer" version of the Instance class documented here, providing
direct access to all core registries and additional modules.
See the vignette on "Package Architecture" for more information:
vignette("architecture", package = "laminr").
if (FALSE) {
# Connect to an instance
db <- connect("laminlabs/cellxgene")
# fetch an artifact
artifact <- db$Artifact$get("MkRm3eUKPwfnAyZMWD9v")
# describe the artifact
artifact$describe()
# view field
artifact$id
# load dataset
artifact$load()
}
Run the code above in your browser using DataLab