metadata_ondisc_matrix {ondisc} | R Documentation |
metadata_ondisc_matrix
class
Description
A metadata_ondisc_matrix
stores an ondisc_matrix
, along with cell-specific and feature-specific covariate matrices.
Construct a metadata_ondisc_matrix
by passing an ondisc_matrix
, along with its associated cell_covariates
and feature_covariates
.
Usage
metadata_ondisc_matrix(ondisc_matrix, cell_covariates, feature_covariates)
metadata_ondisc_matrix(ondisc_matrix, cell_covariates, feature_covariates)
Arguments
ondisc_matrix |
an |
cell_covariates |
a data frame storing the cell-specific covariates. |
feature_covariates |
a data frame storing the feature-specific covariates. |
Value
a metadata_ondisc_matrix
.
Slots
ondisc_matrix
an ondisc_matrix.
cell_covariates
a data frame of cell covariates.
feature_covariates
a data frame of feature covariates.
Examples
# NOTE: You must create the HDF5 file "expressions.h5" and the RDS file
# "expressions.rds" to run this example. Navigate to the help file of
# "create_ondisc_matrix_from_mtx" (via ?create_ondisc_matrix_from_mtx),
# and execute the code in the first code block.
covariates_fp <- paste0(tempdir(), "/expressions.rds")
h5_fp <- paste0(tempdir(), "/expressions.h5")
if (file.exists(covariates_fp) && file.exists(h5_fp)) {
covariate_odm <- readRDS(covariates_fp)
cell_covariate_matrix <- covariate_odm@cell_covariates
feature_covariate_matrix <- covariate_odm@feature_covariates
covariate_odm_copy <- metadata_ondisc_matrix(
ondisc_matrix = ondisc_matrix(h5_file = h5_fp),
cell_covariates = cell_covariate_matrix,
feature_covariates = feature_covariate_matrix)
}
[Package ondisc version 1.0.0 Index]