velocyto.serialization module


Dump all attribute of a python object to hdf5

  • obj (object) – a python object
  • filename (str) – the name of the file to be saved
  • data_compression (int) – the level of compression used by hdf5
  • chunks (Tuple, default=(2048, 2048)) – The size of the chunks to be used for compression/random access
  • noarray_compression (int, default=9) – the compression level of zlib, used when the attribute is not an array
  • pickle_protocol (int, default=2) – the protocol used by pickle.dumps when the attribute is not an array

Return type:

Nothing but it creates a file filename

velocyto.serialization.load_hdf5(filename: str, obj_class: Type[object]) → object[source]

Load all attributes from a hdf5 encoded python object

  • filename – the name of the file to be loaded
  • obj_class – the type of object to be generated

Return type:

An object that has been filled with the attributes stored in the hdf5 file


The trick to create an empty object was adapted from Guido van Rossum answer: