export_to_files: Export a Vitessce configuration to a directory of static...

View source: R/export.R

export_to_filesR Documentation

Export a Vitessce configuration to a directory of static files.

Description

A helper function to export files associated with a particular Vitessce configuration to a local directory. We do not recommend calling this function directly. Instead, use the export() function on a VitessceConfig instance.

Usage

export_to_files(config, with_config, base_url, out_dir)

Arguments

config

An instance of VitessceConfig

with_config

Should the config be saved in the out_dir (as a JSON file)?

base_url

If with_config is TRUE, what base_url value should be used for creation of the JSON config?

out_dir

The directory for storing exported files.

Value

If with_config = TRUE, returns the config after calling to_list with the specified base_url.

Examples

vc <- VitessceConfig$new(schema_version = "1.0.16", name = "My config")
dataset <- vc$add_dataset("My dataset")
description <- vc$add_view(dataset, Component$DESCRIPTION)
vc$layout(description)
vc$export(to = "files", out_dir = "./data")

vitessce/vitessceR documentation built on Oct. 12, 2024, 12:24 a.m.