Contains a key-value mapping where the keys are string names and
the values are any SOMA-defined foundational or composed type, including
SOMACollection
, SOMADataFrame
,
SOMADenseNDArray
, SOMASparseNDArray
, or
SOMAExperiment
(lifecycle: maturing).
Adding new objects to a collection
The SOMACollection
class provides a number of type-specific methods for
adding new a object to the collection, such as add_new_sparse_ndarray()
and
add_new_dataframe()
. These methods will create the new object and add it as
member of the SOMACollection
. The new object will always inherit the parent
context (see SOMATileDBContext
) and, by default, its platform
configuration (see PlatformConfig
). However, the user can override the
default platform configuration by passing a custom configuration to the
platform_config
argument.
Super classes
tiledbsoma::SOMAObject
-> tiledbsoma::SOMACollectionBase
-> SOMACollection
Methods
Inherited methods
tiledbsoma::SOMAObject$class()
tiledbsoma::SOMAObject$exists()
tiledbsoma::SOMAObject$get_metadata()
tiledbsoma::SOMAObject$initialize()
tiledbsoma::SOMAObject$is_open()
tiledbsoma::SOMAObject$mode()
tiledbsoma::SOMAObject$reopen()
tiledbsoma::SOMACollectionBase$add_new_collection()
tiledbsoma::SOMACollectionBase$add_new_dataframe()
tiledbsoma::SOMACollectionBase$add_new_dense_ndarray()
tiledbsoma::SOMACollectionBase$add_new_sparse_ndarray()
tiledbsoma::SOMACollectionBase$close()
tiledbsoma::SOMACollectionBase$create()
tiledbsoma::SOMACollectionBase$get()
tiledbsoma::SOMACollectionBase$length()
tiledbsoma::SOMACollectionBase$names()
tiledbsoma::SOMACollectionBase$open()
tiledbsoma::SOMACollectionBase$print()
tiledbsoma::SOMACollectionBase$remove()
tiledbsoma::SOMACollectionBase$set()
tiledbsoma::SOMACollectionBase$set_metadata()
Examples
uri <- withr::local_tempfile(pattern = "soma-collection")
(col <- SOMACollectionCreate(uri))
#> <SOMACollection>
#> uri: /tmp/RtmpjD0Pq2/soma-collection270976dc7fc6
col$add_new_sparse_ndarray("sparse", arrow::float64(), shape = c(100L, 100L))
#> <SOMASparseNDArray>
#> uri: /tmp/RtmpjD0Pq2/soma-collection270976dc7fc6/sparse
#> dimensions: soma_dim_0, soma_dim_1
#> attributes: soma_data
col$close()
(col <- SOMACollectionOpen(uri))
#> <SOMACollection>
#> uri: /tmp/RtmpjD0Pq2/soma-collection270976dc7fc6
col$names()
#> [1] "sparse"