Abstract class representing a local dataset object in a Vitessce dataset.
Details
Abstract dataset object wrapper class
Public fields
out_dir
The directory for processed output files.
use_cache
If converted output files already exist, should they be used?
is_remote
Is the data object fully remote?
routes
A list of VitessceConfigServerRoute
objects.
file_def_creators
A list of file definition creator functions.
base_dir
The base directory for local data.
Methods
Method new()
Create an abstract wrapper around a data object.
Arguments
out_dir
The directory for processed output files.
use_cache
If converted output files already exist, should they be used? By default, FALSE.
Returns
A new AbstractWrapper
object.
Method convert_and_save()
Fill in the file_def_creators array.
Each function added to this list should take in a base URL and generate a Vitessce file definition.
If this wrapper is wrapping local data, then create routes and fill in the routes array.
This method is void, should not return anything.
Usage
AbstractWrapper$convert_and_save(dataset_uid, obj_i, base_dir = NA)
Arguments
dataset_uid
A unique identifier for this dataset.
obj_i
Within the dataset, the index of this data wrapper object.
base_dir
Path to a base directory.
Method get_routes()
Obtain the routes that have been created for this wrapper class.
Usage
AbstractWrapper$get_routes()
Returns
A list of server routes.
Method get_file_defs()
Obtain the file definitions for this wrapper class.
Usage
AbstractWrapper$get_file_defs(base_url)
Arguments
base_url
A base URL to prepend to relative URLs.
Returns
A list of server routes.
Method get_out_dir_route()
Create a web server route for this object.
Usage
AbstractWrapper$get_out_dir_route(dataset_uid, obj_i)
Arguments
dataset_uid
The ID for this dataset.
obj_i
The index of this data object within the dataset.
Returns
A new VitessceConfigServerStaticRoute
instance.
Method get_local_dir_url()
Construct a URL to a local directory.
Usage
AbstractWrapper$get_local_dir_url(
base_url,
dataset_uid,
obj_i,
local_dir_path,
local_dir_uid
)
Arguments
base_url
The base URL on which the web server is serving.
dataset_uid
The ID for this dataset.
obj_i
The index of this data object within the dataset.
local_dir_path
The path to the local directory.
local_dir_uid
A unique identifier for this local directory in this dataset.
Returns
A string for the URL.
Method get_local_file_url()
Construct a URL to a local file.
Usage
AbstractWrapper$get_local_file_url(
base_url,
dataset_uid,
obj_i,
local_file_path,
local_file_uid
)
Arguments
base_url
The base URL on which the web server is serving.
dataset_uid
The ID for this dataset.
obj_i
The index of this data object within the dataset.
local_file_path
The path to the local file.
local_file_uid
A unique identifier for this local file in this dataset.
Returns
A string for the URL.
Method get_local_dir_route()
Create a web server route for this object.
Usage
AbstractWrapper$get_local_dir_route(
dataset_uid,
obj_i,
local_dir_path,
local_dir_uid
)
Arguments
dataset_uid
The ID for this dataset.
obj_i
The index of this data object within the dataset.
local_dir_path
The path to the local directory.
local_dir_uid
A unique identifier for this local directory in this dataset.
Returns
A new VitessceConfigServerStaticRoute
instance.
Method get_local_file_route()
Create a web server route for this object.
Usage
AbstractWrapper$get_local_file_route(
dataset_uid,
obj_i,
local_file_path,
local_file_uid
)
Arguments
dataset_uid
The ID for this dataset.
obj_i
The index of this data object within the dataset.
local_file_path
The path to the local file.
local_file_uid
A unique identifier for this local file in this dataset.
Returns
A new VitessceConfigServerFileRoute
instance.
Method get_url()
Create a local web server URL for a dataset object.
Usage
AbstractWrapper$get_url(base_url, dataset_uid, obj_i, ...)
Arguments
base_url
The base URL on which the web server is serving.
dataset_uid
The ID for this dataset.
obj_i
The index of this data object within the dataset.
...
Passes extra arguments to get_route_str
Returns
A URL as a string.
Method get_url_simple()
Construct a URL.
Usage
AbstractWrapper$get_url_simple(base_url, suffix)
Arguments
base_url
The base URL on which the web server is serving.
suffix
The suffix to append to the base URL.
Returns
A URL as a string like base_url/suffix
Method get_route_str()
Create a string representing a web server route path (the part following the base URL).
Usage
AbstractWrapper$get_route_str(dataset_uid, obj_i, ...)
Arguments
dataset_uid
The ID for this dataset.
obj_i
The index of this data object within the dataset.
...
Pastes extra arguments together after obj_i
, separated by slash.
Returns
A path as a string.
Method get_out_dir()
Create a directory path to a dataset within the base output directory.
Usage
AbstractWrapper$get_out_dir(dataset_uid, obj_i, ...)
Arguments
dataset_uid
The ID for this dataset.
obj_i
The index of this data object within the dataset.
...
Passes extra arguments to file.path
Returns
A path as a string.
Method auto_view_config()
Automatically configure views for a particular dataset.
Usage
AbstractWrapper$auto_view_config(vc)
Arguments
vc
A VitessceConfig
instance to configure.
Method clone()
The objects of this class are cloneable with this method.
Usage
AbstractWrapper$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.