Skip to contents

Open or close its option groups, and choose what its result shows (marker genes: list or heatmap, the group listed, the heatmap's look; gene signature: the set shown; the options of the plot its expanded view draws); nothing runs.

Usage

cellucid_analysis_view_set(viewer, analysis, view, in_ = "panel")

Arguments

viewer

A viewer cellucid_view() or cellucid_serve() returned.

analysis

An analysis with an options form. One of "markers", "differential", "dotplot", "signature", "composition", "correlation". Required.

view

What to change of how the analysis is shown (only the keys given). A named list. Required.

groups

The option groups open inside "More options", by id (every other is closed). A vector or list of one of "groups", "test", "filters", "ranking", "cells", "labels", "values", "layout", "scoring", "display" (each once). Optional.

heatmap

Marker genes: the heatmap's look and clustering (only the keys given). A named list. Optional.

clusterRows

TRUE or FALSE. Optional.

colorscale

One of "RdBu", "Viridis", "Blues", "YlOrRd", "Greens". Optional.

distance

One of "correlation", "euclidean", "cosine". Optional.

linkage

One of "average", "complete", "single". Optional.

transform

One of "zscore", "log1p", "none". Optional.

more

Whether its "More options" are open. TRUE or FALSE. Optional.

plot

Options of the plot its expanded view draws, each by its name and value as the expanded view offers it. A vector or list of a named list (at least 1 item). Optional.

set

Gene signature: the gene set a result of one score per set shows, by name. Text (at least 1 character). Optional.

show

Marker genes: what the result shows. One of "list", "heatmap", "clustered". Optional.

in_

Either exactly "panel" (The Analysis panel); or a whole number (at least 1) (A floating analysis window, by its number (1 is the first open)). Default "panel", the viewer's own. Sent as the parameter in.

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 analysis.view.set (Analysis). It changes what the viewer shows: one step of the viewer's history, labelled as R's, undone like any other. The state it can change: 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_analysis_view_set(viewer, analysis = "markers",
      view = list(show = "list"))
  print(request)
  # cellucid_action_result(request) waits for its outcome.
  cellucid_stop(viewer)
}