| VitessceConfigDataset | R Documentation |
Class representing a dataset in a Vitessce view config.
Dataset in a VitessceConfig
datasetThe dataset as a list.
base_dirThe base directory for the config.
new()Create a new dataset object.
VitessceConfigDataset$new(uid, name, base_dir = NA)
uidA unique identifier string for the dataset.
nameA name for the dataset
base_dirA directory which local files are configured relative to.
A new VitessceConfigDataset object.
get_name()Get the dataset name.
VitessceConfigDataset$get_name()
The name as a string.
get_uid()Get the dataset UID.
VitessceConfigDataset$get_uid()
The uid as a string.
add_file()Add a file to this dataset.
VitessceConfigDataset$add_file( url = NA, file_type = NA, options = NA, coordination_values = NA, data_type = NA )
urlThe URL to the file.
file_typeThe file type for the file.
optionsOptional. An options list for the file.
data_typeThe data type for the file.
Invisible self, to allow chaining.
base_url <- "http://localhost:8000/"
vc <- VitessceConfig$new(schema_version = "1.0.16", name = "My config")
dataset <- vc$add_dataset("My dataset")$add_file(
url = paste0(base_url, "cells.json"),
data_type = DataType$CELLS,
file_type = FileType$CELLS_JSON
)
add_object()Add a data object to this dataset.
VitessceConfigDataset$add_object(obj)
objThe data object to add.
Invisible self, to allow chaining.
get_routes()Get a list of web server route objects corresponding to any local files which will need to be served.
VitessceConfigDataset$get_routes()
A list of VitessceConfigServerStaticRoute.
to_list()Convert the dataset to an R list. Helpful when converting the config to JSON.
VitessceConfigDataset$to_list(base_url = NA)
base_urlThe base URL to prepend to web server file paths.
A list that can be serialized to JSON using rjson.
clone()The objects of this class are cloneable with this method.
VitessceConfigDataset$clone(deep = FALSE)
deepWhether to make a deep clone.
## ------------------------------------------------
## Method `VitessceConfigDataset$add_file`
## ------------------------------------------------
base_url <- "http://localhost:8000/"
vc <- VitessceConfig$new(schema_version = "1.0.16", name = "My config")
dataset <- vc$add_dataset("My dataset")$add_file(
url = paste0(base_url, "cells.json"),
data_type = DataType$CELLS,
file_type = FileType$CELLS_JSON
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.