Skip to contents

SOMA Array Base Class

SOMA Array Base Class

Details

Virtual base class to add array-specific functionality to the SOMAObject class (lifecycle: maturing).

See also

Derived classes: SOMADataFrame, SOMANDArrayBase

Super class

tiledbsoma::SOMAObject -> SOMAArrayBase

Methods

Inherited methods


Method open()

Open the SOMA object for read or write.

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

Usage

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

Arguments

mode

Mode to open the object in.

Returns

Return sself.


Method close()

Close the SOMA array.

Usage

SOMAArrayBase$close()

Returns

Invisibly returns self.


Method allows_duplicates()

Does an array allow duplicates?

Usage

SOMAArrayBase$allows_duplicates()

Returns

TRUE if the underlying TileDB array allows duplicates; otherwise FALSE.


Method is_sparse()

Is an array sparse?

Usage

SOMAArrayBase$is_sparse()

Returns

TRUE if the underlying TileDB array is sparse; otherwise FALSE.


Method schema()

Retrieve the array schema as an Arrow schema (lifecycle: maturing).

Usage

SOMAArrayBase$schema()

Returns

An Arrow Schema object.


Method attributes()

Retrieve the array attributes.

Usage

SOMAArrayBase$attributes()

Returns

A named list of array attributes; each entry contains the following named entries:

  • name”: name of the attribute.

  • type”: datatype of the attribute.

  • ncells”: number of values per dimension cell.

  • nullable”: is the attribute nullable.

  • filter_list”: a list with filter information; this list contains the following entries:

    • filter_type

    • compression_level

    • bit_width

    • positive_delta

    • float_bytewidth

    • float_factor

    • float_offset


Method attrnames()

Retrieve attribute names (lifecycle: maturing).

Usage

SOMAArrayBase$attrnames()

Returns

A character vector with the array's attribute names.


Method dimensions()

Retrieve the array dimensions (lifecycle: maturing)

Usage

SOMAArrayBase$dimensions()

Returns

A named list of array dimensions; each entry contains the following named entries:

  • name”: name of the dimension.

  • type”: datatype of the dimension.

  • ncells”: number of values per dimension cell.

  • domain”: domain of the dimension.

  • tile”: tile of the dimension.

  • filter_list”: a list with filter information; this list contains the following entries:

    • filter_type

    • compression_level

    • bit_width

    • positive_delta

    • float_bytewidth

    • float_factor

    • float_offset


Method dimnames()

Retrieve dimension names (lifecycle: maturing).

Usage

SOMAArrayBase$dimnames()

Returns

A character vector with the array's dimension names.


Method colnames()

Retrieve the names of all columns, including dimensions and attributes (lifecycle: maturing).

Usage

SOMAArrayBase$colnames()

Returns

A character vector with the array's column names.


Method index_column_names()

Retrieve names of index (dimension) columns (lifecycle: maturing)

Usage

SOMAArrayBase$index_column_names()

Returns

A character vector with the array index (dimension) names


Method shape()

Retrieve the shape, i.e. the capacity of each dimension Attempted reads and writes outside the shape will result in a run-time error: this is the purpose of shape. This will not necessarily match the bounds of occupied cells within the array. Using $resize(), this may be increased up to the hard limit which maxshape() reports (lifecycle: maturing).

Usage

SOMAArrayBase$shape()

Returns

A named vector of dimension length and of the same type as the dimension.


Method maxshape()

Retrieve the hard limit up to which the array may be resized using the $resize() method (lifecycle: maturing).

Usage

SOMAArrayBase$maxshape()

Returns

A named vector of dimension length and of the same type as the dimension.


Method non_empty_domain()

Returns a named list of minimum/maximum pairs, one per index column, which are the smallest and largest values written on that index column.

Usage

SOMAArrayBase$non_empty_domain(index1 = FALSE, max_only = FALSE)

Arguments

index1

Return the non-empty domain with 1-based indices

max_only

Return only the max value per dimension, and return this as a vector. Names are dropped (lifecycle: maturing).

Returns

Named list of minimum/maximum values, or integer vector of maximum values.


Method ndim()

Retrieve number of dimensions (lifecycle: maturing).

Usage

SOMAArrayBase$ndim()

Returns

A scalar with the number of dimensions.


Method print()

Print-friendly representation of the object.

Usage

SOMAArrayBase$print()

Returns

Invisibly returns self.


Method clone()

The objects of this class are cloneable with this method.

Usage

SOMAArrayBase$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.