Base class for 2D sparse matrix-like data with string dimensions. An AssayMatrix may contain one or more "layers" (i.e., additional measurements that share the same dimensions and non-empty coordinates.

Used for the X field of SOMA.

Public fields

verbose

Print status messages

Methods

Inherited methods


Method from_matrix()

Ingest assay data from a sparse matrix

Usage

AssayMatrix$from_matrix(x, index_cols, value_col = "value")

Arguments

x

any matrix-like object coercible to a TsparseMatrix with string dimensions.

index_cols

Names to use for the TileDB array's dimensions that will contain the matrix row/column names.

value_col

Name to use for the TileDB array's attribute that will contain the matrix values.


Method from_dataframe()

Ingest assay data from a COO-formatted data frame

Usage

AssayMatrix$from_dataframe(x, index_cols)

Arguments

x

a data.frame

index_cols

A column index, either numeric with a column index, or character with a column name, identifying the 2 index columns. All other columns are ingested as attributes.


Method to_dataframe()

Retrieve the assay data from TileDB

Usage

AssayMatrix$to_dataframe(attrs = NULL, batch_mode = FALSE)

Arguments

attrs

Specify one or more attributes to retrieve. If NULL, all attributes are retrieved.

batch_mode

logical, if TRUE, batch query mode is enabled, which provides the ability to detect partial query results and resubmit until all results are retrieved.

Returns

A Matrix::dgTMatrix.


Method to_matrix()

Retrieve assay data from TileDB as a 2D sparse matrix.

Usage

AssayMatrix$to_matrix(attr = NULL, batch_mode = FALSE)

Arguments

attr

The name of the attribute layer to retrieve. If NULL, the first layer is returned.

batch_mode

logical, if TRUE, batch query mode is enabled, which provides the ability to detect partial query results and resubmit until all results are retrieved.

Returns

A Matrix::dgTMatrix.


Method clone()

The objects of this class are cloneable with this method.

Usage

AssayMatrix$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.