Skip to contents

A disk-based object for single-cell analysis

Format

An R6Class object

See also

Super classes

hdf5r::H5RefClass -> hdf5r::H5File -> scdisk

Methods

Inherited methods


scdisk$new()

Create a new scdisk object

Usage

scdisk$new(
  filename = NULL,
  mode = c("a", "r", "r+", "w", "w-", "x"),
  validate = TRUE,
  ...
)

Arguments

filename

Name of on-disk file to connect to

mode

How to open the file, choose from:

a

Create new or open existing file, allow read and write

r

Open existing file, allow read only

r+

Open existing file, allow read and write

w

Create new file (deleting any existing one), allow read and write

w-, x

Create new file (error if exists), allow read and write

validate

Validate the file upon connection

...

Extra arguments passed to validation routine


scdisk$finalizer()

Handle the loss of reference to this scdisk object

Usage

scdisk$finalizer()


scdisk$chunk.points()

Generate chunk points for a dataset

Usage

scdisk$chunk.points(
  dataset,
  MARGIN = getOption(x = "scConvert.chunking.MARGIN", default = "largest"),
  csize = NULL
)

Arguments

dataset

Name of dataset

MARGIN

Direction to chunk in; defaults to largest dimension of dataset

csize

Size of chunk; defaults to hdf5r-suggested chunk size

Returns

A matrix where each row is a chunk, column 1 is start points, column 2 is end points


scdisk$timestamp()

Add a timestamp to a dataset or group as an HDF5 attribute

Usage

scdisk$timestamp(
  name = NULL,
  attr = "ts",
  tz = "UTC",
  format = TSFormats(type = "R")
)

Arguments

name

Name of dataset or group to add timestamp to; if NULL, timestamps the file as a whole

attr

Name of attribute to store timestamp ass

tz, format

See Timestamp

Returns

Invisilby returns the object


scdisk$last.modified()

Retrieve a timestamp from a dataset or group

Usage

scdisk$last.modified(
  name = NULL,
  attr = "ts",
  locale = TRUE,
  tz = "UTC",
  format = TSFormats(type = "R")
)

Arguments

name

Name of dataset or group to retrieve timestamp from; if NULL, retrieves timestamp from at the file-level

attr

Name of attribute to retrieve timestamp from

locale

Change the timestamp of to the timezone of the locale

tz, format

See Timestamp

Returns

A character with the timestamp