Provides strongly-typed access and default values for
platform_config
options stored under the “tiledb”
\(\rightarrow\) “create” mapping keys.
Intended for internal use only.
Super class
tiledbsoma::MappingBase
-> TileDBCreateOptions
Methods
Inherited methods
tiledbsoma::MappingBase$get()
tiledbsoma::MappingBase$items()
tiledbsoma::MappingBase$keys()
tiledbsoma::MappingBase$length()
tiledbsoma::MappingBase$print()
tiledbsoma::MappingBase$remove()
tiledbsoma::MappingBase$set()
tiledbsoma::MappingBase$setv()
tiledbsoma::MappingBase$update()
tiledbsoma::MappingBase$values()
Method new()
Create a TileDBCreateOptions
object
Usage
TileDBCreateOptions$new(platform_config = NULL)
Arguments
platform_config
A platform configuration object
Method cell_tile_orders()
Returns the cell and tile orders that should be used.
If neither cell_order
nor tile_order
is present, only in this
case will we use the default values provided.
Method dim_tile()
Arguments
dim_name
Name of dimension to get tiling for
default
Default tiling if
dim_name
is not set
Examples
cfg <- PlatformConfig$new()
cfg$set(
platform = 'tiledb',
param = 'create',
key = 'dims',
value = list(soma_dim_0 = list(tile = 999))
)
(tdco <- TileDBCreateOptions$new(cfg))
tdco$dim_tile("soma_dim_0")
tdco$dim_tile("soma_dim_1")
Method offsets_filters()
Usage
TileDBCreateOptions$offsets_filters(default = list())
Returns
A list of
tiledb_filter
objects
Method validity_filters()
Usage
TileDBCreateOptions$validity_filters(default = list())
Returns
A list of
tiledb_filter
objects
Method dim_filters()
Usage
TileDBCreateOptions$dim_filters(dim_name, default = list())
Arguments
dim_name
Name of dimension to get filters for
default
Default filters to use for if not currently set
Returns
A list of
tiledb_filter
objects
Examples
filters <- list(
soma_dim_0 = list(tile = 100, filters = list("RLE")),
soma_dim_1 = list(tile = 200, filters = list("RLE", list(name = "ZSTD", COMPRESSION_LEVEL = 9)))
)
cfg <- PlatformConfig$new()
cfg$set(platform = 'tiledb', param = 'create', key = 'dims', value = filters)
(tdco <- TileDBCreateOptions$new(cfg))
tdco$dim_filters("soma_dim_0")
tdco$dim_filters("non-existant")
Method attr_filters()
Usage
TileDBCreateOptions$attr_filters(attr_name, default = list())
Returns
A list of
tiledb_filter
objects
Examples
filters <- list(
soma_data_a = list(filters = list("RLE")),
soma_data_b = list(filters = list("RLE", list(name = "ZSTD", COMPRESSION_LEVEL = 9)))
)
cfg <- PlatformConfig$new()
cfg$set(platform = 'tiledb', param = 'create', key = 'attrs', value = filters)
(tdco <- TileDBCreateOptions$new(cfg))
tdco$attr_filters("soma_data_b")
tdco$attr_filters("non-existant")
Method to_list()
...
Arguments
build_filters
Build filters into
tiledb_filter
objects. If set toFALSE
, JSON strings are created instead of filter objects.
Examples
## ------------------------------------------------
## Method `TileDBCreateOptions$dim_tile`
## ------------------------------------------------
cfg <- PlatformConfig$new()
cfg$set(
platform = 'tiledb',
param = 'create',
key = 'dims',
value = list(soma_dim_0 = list(tile = 999))
)
(tdco <- TileDBCreateOptions$new(cfg))
#> <TileDBCreateOptions>
#> dims: list(soma_dim_0 = list(tile = 999))
#> tile_order: ROW_MAJOR
#> cell_order: ROW_MAJOR
#> capacity: 1e+05
#> allows_duplicates: FALSE
#> dataframe_dim_zstd_level: 3
#> sparse_nd_array_dim_zstd_level: 3
#> dense_nd_array_dim_zstd_level: 3
#> offsets_filters: list("DOUBLE_DELTA", "BIT_WIDTH_REDUCTION", "ZSTD")
#> write_X_chunked: TRUE
#> goal_chunk_nnz: 2e+08
tdco$dim_tile("soma_dim_0")
#> [1] 999
tdco$dim_tile("soma_dim_1")
#> [1] 2048
## ------------------------------------------------
## Method `TileDBCreateOptions$dim_filters`
## ------------------------------------------------
filters <- list(
soma_dim_0 = list(tile = 100, filters = list("RLE")),
soma_dim_1 = list(tile = 200, filters = list("RLE", list(name = "ZSTD", COMPRESSION_LEVEL = 9)))
)
cfg <- PlatformConfig$new()
cfg$set(platform = 'tiledb', param = 'create', key = 'dims', value = filters)
(tdco <- TileDBCreateOptions$new(cfg))
#> <TileDBCreateOptions>
#> dims: list(soma_dim_0 = list(tile = 100, filters = list("RLE")), soma_dim_1 = list(tile = 200, filters = list("RLE", list(name = "ZSTD", COMPRESSION_LEVEL = 9))))
#> tile_order: ROW_MAJOR
#> cell_order: ROW_MAJOR
#> capacity: 1e+05
#> allows_duplicates: FALSE
#> dataframe_dim_zstd_level: 3
#> sparse_nd_array_dim_zstd_level: 3
#> dense_nd_array_dim_zstd_level: 3
#> offsets_filters: list("DOUBLE_DELTA", "BIT_WIDTH_REDUCTION", "ZSTD")
#> write_X_chunked: TRUE
#> goal_chunk_nnz: 2e+08
tdco$dim_filters("soma_dim_0")
#> [[1]]
#> tiledb_filter_set_option(tiledb_filter("RLE"),"COMPRESSION_LEVEL",-1)
#>
tdco$dim_filters("non-existant")
#> list()
## ------------------------------------------------
## Method `TileDBCreateOptions$attr_filters`
## ------------------------------------------------
filters <- list(
soma_data_a = list(filters = list("RLE")),
soma_data_b = list(filters = list("RLE", list(name = "ZSTD", COMPRESSION_LEVEL = 9)))
)
cfg <- PlatformConfig$new()
cfg$set(platform = 'tiledb', param = 'create', key = 'attrs', value = filters)
(tdco <- TileDBCreateOptions$new(cfg))
#> <TileDBCreateOptions>
#> attrs: list(soma_data_a = list(filters = list("RLE")), soma_data_b = list(filters = list("RLE", list(name = "ZSTD", COMPRESSION_LEVEL = 9))))
#> tile_order: ROW_MAJOR
#> cell_order: ROW_MAJOR
#> capacity: 1e+05
#> allows_duplicates: FALSE
#> dataframe_dim_zstd_level: 3
#> sparse_nd_array_dim_zstd_level: 3
#> dense_nd_array_dim_zstd_level: 3
#> offsets_filters: list("DOUBLE_DELTA", "BIT_WIDTH_REDUCTION", "ZSTD")
#> write_X_chunked: TRUE
#> goal_chunk_nnz: 2e+08
tdco$attr_filters("soma_data_b")
#> [[1]]
#> tiledb_filter_set_option(tiledb_filter("RLE"),"COMPRESSION_LEVEL",-1)
#>
#> [[2]]
#> tiledb_filter_set_option(tiledb_filter("ZSTD"),"COMPRESSION_LEVEL",9)
#>
tdco$attr_filters("non-existant")
#> list()