daf.storage.memory

Simple in-memory storage.

This just keeps everything in-memory, similarly to the way an AnnData object works; that is, this is a lightweight object that just keeps references to the data it is given. Unlike AnnData it allows for efficient storage of multiple axes.

This is the “default” storage type you should use unless you need something specific another storage format provides (typically, disk storage).

Classes:

MemoryStorage(*[, name, copy, overwrite])

Implement the StorageWriter interface for in-memory storage.

class daf.storage.memory.MemoryStorage(*, name: str = 'memory#', copy: Optional[StorageReader] = None, overwrite: bool = False)[source]

Bases: _MemoryReader, StorageWriter

Implement the StorageWriter interface for in-memory storage.

If the name ends with #, we append the object id to it to make it unique.

If copy is specified, it is copied into the directory, using the overwrite.

Note

This just keeps a reference to the data it is given, so care must be taken not to mess it up after it has been put into the storage. It does freeze it to prevent accidental modifications.