AnnDataWrapper: AnnDataWrapper Class

AnnDataWrapperR Documentation

AnnDataWrapper Class

Description

Class representing an AnnData object (saved to a Zarr store) in a Vitessce dataset.

Details

AnnData object wrapper class

Super class

vitessceR::AbstractWrapper -> AnnDataWrapper

Public fields

adata_path

The object to wrap.

adata_url

The object to wrap.

local_dir_uid

The path to the local zarr store.

obs_feature_matrix_path

The path to the observation-by-feature matrix within the Zarr store.

feature_filter_path

The path to the a column of adata.var within the Zarr store. Use this if obs_feature_matrix_path points to a subset of adata.X (relative to the full adata.var).

initial_feature_filter_path

The path to the a column of adata.var within the Zarr store. Use this to load a subset of the matrix at obs_feature_matrix_path initially.

obs_set_paths

A list of paths to the observation sets within the Zarr store.

obs_set_names

A list of names for the observation sets.

obs_locations_path

The path to the observation locations within the Zarr store.

obs_segmentations_path

The path to the observation segmentations within the Zarr store.

obs_embedding_paths

A list of paths to the observation embeddings within the Zarr store.

obs_embedding_names

A list of names for the observation embeddings.

obs_embedding_dims

A list of dimensions for the observation embeddings.

feature_labels_path

The path to the feature labels within the Zarr store.

obs_labels_path

The path to the observation labels within the Zarr store.

obs_labels_paths

A list of paths to the observation labels within the Zarr store.

obs_labels_names

A list of names for the observation labels.

coordination_values

A list of coordination values for the file definition.

request_init

A list of requestInit options for the Zarr store.

Methods

Public methods

Inherited methods

Method new()

Create a wrapper around an AnnData object saved to a Zarr store.

Usage
AnnDataWrapper$new(
  adata_path = NA,
  adata_url = NA,
  obs_feature_matrix_path = NA,
  feature_filter_path = NA,
  initial_feature_filter_path = NA,
  obs_set_paths = NA,
  obs_set_names = NA,
  obs_locations_path = NA,
  obs_segmentations_path = NA,
  obs_embedding_paths = NA,
  obs_embedding_names = NA,
  obs_embedding_dims = NA,
  request_init = NA,
  feature_labels_path = NA,
  coordination_values = NA,
  obs_labels_paths = NA,
  obs_labels_names = NA,
  ...
)
Arguments
adata_path

The path to a local Zarr store.

adata_url

The URL to a remote Zarr store.

obs_feature_matrix_path

The path to the observation-by-feature matrix within the Zarr store.

feature_filter_path

The path to the a column of adata.var within the Zarr store. Use this if obs_feature_matrix_path points to a subset of adata.X (relative to the full adata.var).

initial_feature_filter_path

The path to the a column of adata.var within the Zarr store. Use this to load a subset of the matrix at obs_feature_matrix_path initially.

obs_set_paths

A list of paths to the observation sets within the Zarr store.

obs_set_names

A list of names for the observation sets.

obs_locations_path

The path to the observation locations within the Zarr store.

obs_segmentations_path

The path to the observation segmentations within the Zarr store.

obs_embedding_paths

A list of paths to the observation embeddings within the Zarr store.

obs_embedding_names

A list of names for the observation embeddings.

obs_embedding_dims

A list of dimensions for the observation embeddings.

request_init

A list of requestInit options for the Zarr store.

feature_labels_path

The path to the feature labels within the Zarr store.

coordination_values

A list of coordination values for the file definition.

obs_labels_paths

A list of paths to the observation labels within the Zarr store.

obs_labels_names

A list of names for the observation labels.

...

Parameters inherited from AbstractWrapper.

Returns

A new AnnDataWrapper object.


Method convert_and_save()

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

Usage
AnnDataWrapper$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
AnnDataWrapper$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_zarr_url()

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

Usage
AnnDataWrapper$get_zarr_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
AnnDataWrapper$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
AnnDataWrapper$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


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