dandelion.polars.io.read_h5ddl

dandelion.polars.io.read_h5ddl(filename='dandelion_data.h5ddl', distance_zarr=None, verbose=False)[source]

Read in and returns a Dandelion class from .h5ddl format.

All components (data, metadata, graph, distances, layout, germline) are loaded and converted to their polars equivalents. If a companion .zarr store exists alongside the .h5ddl file (same stem, .zarr extension) it is picked up automatically as the distance array; this mirrors the behaviour of write_h5ddl when distances are a dask array.

Parameters:
  • filename (Path | str, optional) – path to .h5ddl file

  • distance_zarr (Path | str | None, optional) – path to Zarr array for distances if computed lazily. Auto-detected from a companion .zarr file when not provided.

  • verbose (bool, optional) – whether or not to print messages during creation of the Dandelion object.

Returns:

DandelionPolars object.

Return type:

DandelionPolars

Raises:

AttributeError – if data not found in .h5ddl file.