agora.io.bridge.BridgeH5

class agora.io.bridge.BridgeH5(filename, flag='r')

Bases: object

Base class to interact with h5 data stores. It also contains functions useful to predict how long should segmentation take.

Attributes
cell_tree

Methods

get_info_tree([fields])

Returns traps, time points and labels for this position in form of a tree in the hierarchy determined by the argument fields.

close

get_consecutives

get_npairs

get_npairs_over_time

__init__(filename, flag='r')

Methods

__init__(filename[, flag])

close()

get_consecutives(tree, nstepsback)

get_info_tree([fields])

Returns traps, time points and labels for this position in form of a tree in the hierarchy determined by the argument fields.

get_npairs([nstepsback, tree])

get_npairs_over_time([nstepsback])

Attributes

cell_tree

get_info_tree(fields: Union[tuple, list] = ('trap', 'timepoint', 'cell_label'))

Returns traps, time points and labels for this position in form of a tree in the hierarchy determined by the argument fields. Note that it is compressed to non-empty elements and timepoints.

Default hierarchy is: - trap

  • time point

  • cell label

This function currently produces trees of depth 3, but it can easily be extended for deeper trees if needed (e.g. considering groups, chambers and/or positions).

input :fields: Fields to fetch from ‘cell_info’ inside the hdf5 storage

returns :tree: Nested dictionary where keys (or branches) are the upper levels

and the leaves are the last element of :fields:.