Change the data mapping
cellucid_mapping_set.RdChoose which stored arrays are the embeddings, neighbour graph, genes (modality, expression matrix, gene names, log1p, highly variable), latent space and vector fields; groups not named stay as they are. Applied as one change: refused, nothing changes.
Usage
cellucid_mapping_set(
viewer,
embeddings,
expression,
gene_names,
highly_variable,
knn,
latent,
log1p,
modality,
vector_fields
)Arguments
- viewer
A viewer
cellucid_view()orcellucid_serve()returned.- embeddings
The embeddings views can show, sorted by key then columns, and the default of each dimension. A named list. Left out unless given (the viewer then chooses as its own control does).
enabledA vector or list of a named list (at least 1 item). Required.
- expression
"X", "raw", "layer:<name>", or null for no genes. Text or
NULL(at least 1 character). Left out unless given (the viewer then chooses as its own control does).- gene_names
"index", or "column:<var column>". Text (at least 1 character). Left out unless given (the viewer then chooses as its own control does).
- highly_variable
The boolean var column marking highly variable genes, or null. Text or
NULL(at least 1 character). Left out unless given (the viewer then chooses as its own control does).- knn
The obsp neighbour graph, or null for none. Text or
NULL(at least 1 character). Left out unless given (the viewer then chooses as its own control does).- latent
The obsm latent space outlier filters use, or null. Text or
NULL(at least 1 character). Left out unless given (the viewer then chooses as its own control does).- log1p
Each expression matrix that holds log1p values, with its base (null: e). A vector or list of a named list. Left out unless given (the viewer then chooses as its own control does).
- modality
The modality genes are read from (a dataset of several). Text (at least 1 character). Left out unless given (the viewer then chooses as its own control does).
- vector_fields
Vector fields bound to enabled embeddings, sorted by embedding then key. A vector or list of a named list. Left out unless given (the viewer then chooses as its own control does).
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 (what it did, as names, counts and ids), or NULL when it had nothing to report; request$step is the history step it made.
Details
The viewer's action mapping.set (Data). It changes the viewer's state: one step of the viewer's history, labelled as R's, undone like any other. The state it can change: mapping, views, active-field, filters, colors, camera, analysis.
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_mapping_set(viewer)
print(request)
# cellucid_action_result(request) waits for its outcome.
cellucid_stop(viewer)
}