VitessceConfigDataset | R Documentation |
Class representing a dataset in a Vitessce view config.
Dataset in a VitessceConfig
dataset
The dataset as a list.
base_dir
The base directory for the config.
new()
Create a new dataset object.
VitessceConfigDataset$new(uid, name, base_dir = NA)
uid
A unique identifier string for the dataset.
name
A name for the dataset
base_dir
A 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 )
url
The URL to the file.
file_type
The file type for the file.
options
Optional. An options list for the file.
data_type
The 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)
obj
The 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_url
The 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)
deep
Whether 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.