CsvWrapper: CsvWrapper Class

CsvWrapperR Documentation

CsvWrapper Class

Description

Class representing a CSV file in a Vitessce dataset.

Details

CSV file wrapper class

Super class

vitessceR::AbstractWrapper -> CsvWrapper

Public fields

csv_path

The object to wrap.

csv_url

The object to wrap.

local_csv_uid

The path to the local zarr store.

data_type

The Vitessce data type for this file.

options

A list of options to pass to the Vitessce file definition.

coordination_values

A list of coordination values to pass to the Vitessce file definition.

request_init

A list of requestInit values to pass to fetch when loading the CSV over HTTP.

Methods

Public methods

Inherited methods

Method new()

Create a wrapper around a CSV file.

Usage
CsvWrapper$new(
  csv_path = NA,
  csv_url = NA,
  data_type = NA,
  options = NA,
  coordination_values = NA,
  request_init = NA,
  ...
)
Arguments
csv_path

The path to a local CSV file.

csv_url

The URL to a remote CSV file.

data_type

The Vitessce data type for this file.

options

A list of options to pass to the Vitessce file definition.

coordination_values

A list of coordination values to pass to the Vitessce file definition.

request_init

A list of requestInit values to pass to fetch when loading the CSV over HTTP.

...

Parameters inherited from AbstractWrapper.

Returns

A new CsvWrapper object.


Method convert_and_save()

Create the JSON output files, web server routes, and file definition creators.

Usage
CsvWrapper$convert_and_save(dataset_uid, obj_i, base_dir = NA)
Arguments
dataset_uid

The ID for this dataset.

obj_i

The index of this data object within the dataset.

base_dir

A base directory for local data.


Method make_routes()

Get a list of server route objects.

Usage
CsvWrapper$make_routes(dataset_uid, obj_i)
Arguments
dataset_uid

The ID for this dataset.

obj_i

The index of this data object within the dataset.


Method get_csv_url()

Get the URL to the Zarr store, to fill in the file URL in the file definitions.

Usage
CsvWrapper$get_csv_url(base_url, dataset_uid, obj_i)
Arguments
base_url

The base URL, on which the route will be served.

dataset_uid

The ID for this dataset.

obj_i

The index of this data object within the dataset.

Returns

A URL as a string.


Method make_file_def_creator()

Make the file definition creator function for the cells data type.

Usage
CsvWrapper$make_file_def_creator(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 file definition creator function which takes a base_url parameter.


Method clone()

The objects of this class are cloneable with this method.

Usage
CsvWrapper$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


keller-mark/vitessce-htmlwidget documentation built on Oct. 4, 2023, 2:30 a.m.