-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
--- | ||
title: "Usage" | ||
vignette: > | ||
%\VignetteIndexEntry{Usage} | ||
%\VignetteEncoding{UTF-8} | ||
%\VignetteEngine{quarto::html} | ||
editor_options: | ||
chunk_output_type: console | ||
knitr: | ||
opts_chunk: | ||
collapse: true | ||
comment: "#>" | ||
--- | ||
|
||
```{r setup} | ||
library(laminr) | ||
``` | ||
|
||
## Instance | ||
|
||
### Connect to a LaminDB instance | ||
|
||
```{r connect} | ||
db <- connect("laminlabs/cellxgene") | ||
``` | ||
|
||
|
||
### Print a LaminDB instance | ||
|
||
```{r print_instance} | ||
db | ||
``` | ||
|
||
### Get module | ||
|
||
```{r get_module} | ||
db$get_module("core") | ||
db$bionty | ||
``` | ||
|
||
## Registry | ||
|
||
```{r get_artifact_registry} | ||
db$Artifact | ||
``` | ||
|
||
```{r get_bionty_celline} | ||
db$bionty$CellLine | ||
``` | ||
|
||
## Record | ||
|
||
### Get artifact | ||
|
||
```{r get_artifact} | ||
artifact <- db$Artifact$get("KBW89Mf7IGcekja2hADu") | ||
``` | ||
|
||
### Print artifact | ||
|
||
```{r print_artifact} | ||
artifact | ||
``` | ||
|
||
### Print simple fields | ||
|
||
```{r print_simple_fields} | ||
artifact$id | ||
artifact$uid | ||
artifact$key | ||
``` | ||
|
||
### Print related fields | ||
|
||
```{r print_related_fields} | ||
artifact$storage | ||
artifact$created_by | ||
artifact$experimental_factors | ||
``` | ||
|
||
### Cache artifact | ||
|
||
:::{.callout-note} | ||
Only S3 storage is supported at the moment. | ||
::: | ||
|
||
```{r cache_artifact} | ||
artifact$cache() | ||
``` | ||
|
||
### Load artifact | ||
|
||
:::{.callout-note} | ||
Only S3 storage and AnnData accessors are supported at the moment. | ||
::: | ||
|
||
```{r load_artifact} | ||
artifact$load() | ||
``` |