AssayMatrix | R Documentation |
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
.
tiledbsc::TileDBObject
-> tiledbsc::TileDBArray
-> tiledbsc::AnnotationArray
-> AssayMatrix
verbose
Print status messages
tiledbsc::TileDBObject$class()
tiledbsc::TileDBObject$exists()
tiledbsc::TileDBArray$add_metadata()
tiledbsc::TileDBArray$array_exists()
tiledbsc::TileDBArray$attributes()
tiledbsc::TileDBArray$attrnames()
tiledbsc::TileDBArray$dimensions()
tiledbsc::TileDBArray$dimnames()
tiledbsc::TileDBArray$fragment_count()
tiledbsc::TileDBArray$get_metadata()
tiledbsc::TileDBArray$initialize()
tiledbsc::TileDBArray$print()
tiledbsc::TileDBArray$reset_query()
tiledbsc::TileDBArray$schema()
tiledbsc::TileDBArray$set_query()
tiledbsc::TileDBArray$tiledb_array()
from_matrix()
Ingest assay data from a sparse matrix
AssayMatrix$from_matrix(x, index_cols, value_col = "value")
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.
from_dataframe()
Ingest assay data from a COO-formatted data frame
AssayMatrix$from_dataframe(x, index_cols)
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.
to_dataframe()
Retrieve the assay data from TileDB
AssayMatrix$to_dataframe(attrs = NULL, batch_mode = FALSE)
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.
A Matrix::dgTMatrix
.
to_matrix()
Retrieve assay data from TileDB as a 2D sparse matrix.
AssayMatrix$to_matrix(attr = NULL, batch_mode = FALSE)
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.
A Matrix::dgTMatrix
.
clone()
The objects of this class are cloneable with this method.
AssayMatrix$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.