read cell metadata from list
Usage
readCellMetadata(
data_list,
default_spat_unit = NULL,
default_feat_type = NULL,
provenance = NULL,
verbose = TRUE
)
Examples
df <- data.frame(
cell_ID = c("cell_1", "cell_2", "cell_3"),
annotation = c("cell_type_1", "cell_type_1", "cell_type_2")
)
temporal_dir <- tempdir()
write.csv(df, paste0(temporal_dir, "/metadata.csv"), row.names = FALSE)
readCellMetadata(paste0(temporal_dir, "/metadata.csv"))
#>
#> List item [1]:
#> spat_unit: cell
#> feat_type: rna
#> [[1]]
#> An object of class cellMetaObj
#> spat_unit : "cell"
#> feat_type : "rna"
#> provenance: cell
#> dimensions: 3 2
#>
#> cell_ID annotation
#> <char> <char>
#> 1: cell_1 cell_type_1
#> 2: cell_2 cell_type_1
#> 3: cell_3 cell_type_2
#>