daf.storageΒΆ
Storage objects provide low-level API for storing data in specific formats. To extend daf
to support an additional
format, implement a StorageReader
or a StorageWriter
for that format.
A storage object contains some 0D data, a set of axes (each with a unique name for each entry), and 1D and 2D data based on these axes.
Data is identified by its unique property
name for 0D data, by the axis#property
name for 1D data, and by the
rows_axis,columns_axis#property
name for 2D data. Such data need only be reported under one name, that is, there is
no requirement to also report the transposed data by the name columns_axis,rows_axis#property
. When picking which of
the two to report, the data should be reported such that the result would be in ROW_MAJOR
order, if at all possible.
If the storage contains two copies of the same data, in different internal layouts, it should expose both
foo,bar#baz
and bar,foo#baz
such that each is in ROW_MAJOR
order, as this will allow the higher code layers
to be more efficient.
Todo
Provide a ConcatStorage
that allows concatenating two data sets along a single axis, reusing all the other axes
(e.g., concatenating two data sets for distinct cells using identical genes into a single data set containing both
sets of cells).
- daf.storage.interface
StorageReader
StorageReader.name
StorageReader.as_reader()
StorageReader.description()
StorageReader.item_names()
StorageReader.has_item()
StorageReader.get_item()
StorageReader.axis_names()
StorageReader.has_axis()
StorageReader.axis_size()
StorageReader.axis_entries()
StorageReader.data1d_names()
StorageReader.has_data1d()
StorageReader.get_data1d()
StorageReader.data2d_names()
StorageReader.has_data2d()
StorageReader.get_data2d()
StorageWriter
prefix()
suffix()
- daf.storage formats
- daf.storage support