Open a dataset
cellucid_dataset_open.RdOpen a dataset by the name the person gives: a built-in sample, one of their datasets (My datasets), a link, or an accession the link box takes. It replaces the open dataset; that one's history stays kept in this browser and the new one starts its own. A whole-file download is asked about first.
Arguments
- viewer
A viewer
cellucid_view()orcellucid_serve()returned.- name
A sample's name or id, a name from My datasets, a link to a dataset (a file, a Zarr store, a dataset folder, a CELLxGENE, Zenodo, Figshare or GitHub address), an accession (GSE123456, a DOI), or a Cellucid server (localhost:8765). Text (at least 1 character). Required.
- kind
Where to look for the name: any (samples, then My datasets, then as a link), sample, my-datasets or link. One of
"any","sample","my-datasets","link". Default"any", the viewer's own.
Value
A cellucid_action_request, at once and invisibly: the action is sent now, or when the viewer's channel opens.
cellucid_action_result(request) returns its outcome: a list of already_open (It was open already, so nothing was opened again and its history goes on), cells (The cells open (a share of the dataset when it is subsampled)), genes, kind (Where it opens from: a built-in sample, a link, a Cellucid server, a file or folder of the person's computer, or a notebook (Python, R) that serves it), name (The dataset now open, as Cellucid names it), saved_states (Histories of this dataset kept in this browser from earlier visits; the person was offered to continue the latest), total_cells.
Details
The viewer's action dataset.open (Datasets). It opens another dataset in place of the one the viewer shows, as an agent in the viewer does: it makes no step of the history.
A viewer opened from R shows the dataset R serves, so the viewer refuses this action from R: show another dataset with cellucid_view.
When an agent (Claude, ChatGPT) runs it, the viewer asks the person first (large-download); from R it is not asked.
See also
cellucid_act() sends any action by its type, and cellucid_action_result()
collects its answer.
Examples
if (interactive() && requireNamespace("SeuratObject", quietly = TRUE)) {
data("pbmc_small", package = "SeuratObject")
viewer <- cellucid_view(SeuratObject::UpdateSeuratObject(pbmc_small))
request <- cellucid_dataset_open(viewer, name = "Pancreatic endocrinogenesis (scVelo)")
print(request)
# cellucid_action_result(request) waits for its outcome.
cellucid_stop(viewer)
}