Skip to contents

Base class for objects containing persistent collection of SOMA objects, mapping string keys to any SOMA object (lifecycle: maturing).

See also

Super class

tiledbsoma::SOMAObject -> SOMACollectionBase

Active bindings

members

A list with the members of this collection.

Methods

Inherited methods


Method create()

Create a SOMA collection (lifecycle: maturing).

Note: $create() is considered internal and should not be called directly; use factory functions (eg. SOMACollectionCreate()) instead.

Usage

SOMACollectionBase$create()

Returns

Returns self.


Method open()

Open the SOMA collection for read or write.

Note: $open() is considered internal and should not be called#' directly; use factory functions (eg. SOMACollectionOpen()) instead.

Usage

SOMACollectionBase$open(mode = c("READ", "WRITE", "DELETE"))

Arguments

mode

Mode to open the object in.

Returns

Returns self.


Method close()

Close the SOMA collection.

Usage

SOMACollectionBase$close()

Returns

Invisibly returns self.


Method set()

Add a new SOMA object to the collection (lifecycle: maturing).

Usage

SOMACollectionBase$set(object, name = NULL, relative = NULL)

Arguments

object

SOMA object.

name

The name to use for the object; defaults to the basename of object$uri.

relative

An optional logical value indicating whether the new object's URI is relative to the collection's URI. If NULL (the default), the object's URI is assumed to be relative unless it is a tiledb:// URI.

Returns

Invisibly returns self.


Method get()

Retrieve a SOMA object by name. (lifecycle: maturing)

Usage

SOMACollectionBase$get(name)

Arguments

name

The name of the object to retrieve.

Returns

The SOMA object stored as name.


Method remove()

Remove member. (lifecycle: maturing)

Usage

SOMACollectionBase$remove(name)

Arguments

name

Name of the member to remove.

Returns

Invisibly returns self


Method length()

Get the number of members in this collection (lifecycle: maturing).

Usage

SOMACollectionBase$length()

Returns

The number of members in this collection.


Method names()

Retrieve the names of members (lifecycle: maturing).

Usage

SOMACollectionBase$names()

Returns

A character vector of member names.


Method set_metadata()

Add list of metadata (lifecycle: maturing).

Usage

SOMACollectionBase$set_metadata(metadata)

Arguments

metadata

Named list of metadata to add.

Returns

Invisibly returns self.


Method add_new_collection()

Add a new SOMA collection to this collection (lifecycle: maturing).

Usage

SOMACollectionBase$add_new_collection(object, key)

Arguments

object

SOMA collection object.

key

The key to be added.

Returns

Returns object.


Method add_new_dataframe()

Add a new SOMA data frame to this collection (lifecycle: maturing).

Usage

SOMACollectionBase$add_new_dataframe(
  key,
  schema,
  index_column_names,
  domain,
  platform_config = NULL
)

Arguments

key

The key to be added.

schema

Arrow schema argument passed on to SOMADataFrame$create().

index_column_names

Index column names passed on to SOMADataFrame$create().

domain

As in SOMADataFrameCreate.

platform_config

A platform configuration object

platform_config

A platform configuration object

platform_config

A platform configuration object

Returns

Returns the newly created data frame stored at key.


Method add_new_dense_ndarray()

Add a new SOMA DenseNdArray to this collection (lifecycle: maturing).

Usage

SOMACollectionBase$add_new_dense_ndarray(
  key,
  type,
  shape,
  platform_config = NULL
)

Arguments

key

The key to be added.

type

An Arrow type defining the type of each element in the array.

shape

a vector of integers defining the shape of the array.

platform_config

A platform configuration object

platform_config

A platform configuration object

platform_config

A platform configuration object

Returns

Returns the newly-created array stored at key.


Method add_new_sparse_ndarray()

Add a new SOMA SparseNdArray to this collection (lifecycle: maturing).

Usage

SOMACollectionBase$add_new_sparse_ndarray(
  key,
  type,
  shape,
  platform_config = NULL
)

Arguments

key

The key to be added.

type

An Arrow type defining the type of each element in the array.

shape

a vector of integers defining the shape of the array.

platform_config

A platform configuration object

platform_config

A platform configuration object

platform_config

A platform configuration object

Returns

Returns the newly-created array stored at key.


Method print()

Print-friendly representation of the object.

Usage

SOMACollectionBase$print()

Returns

Invisibly returns self.


Method clone()

The objects of this class are cloneable with this method.

Usage

SOMACollectionBase$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.