Skip to contents

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.

Methods


Method new()

Create an abstract wrapper around a data object.

Usage

AbstractWrapper$new(out_dir = NA, use_cache = FALSE)

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)

Arguments

dataset_uid

A unique identifier for this dataset.

obj_i

Within the dataset, the index of this data wrapper object.


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_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_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.