theislab / zellkonverter

Conversion between scRNA-seq objects
https://theislab.github.io/zellkonverter/
Other
149 stars 27 forks source link

Compression argument for `writeH5AD` #49

Closed ivirshup closed 3 years ago

ivirshup commented 3 years ago

It would be nice to be able to write compressed h5ad files by passing through the compression key word argument. The space savings are nice to have on a laptop:

In [6]: adata.write_h5ad("uncompressed.h5ad")

In [7]: adata.write_h5ad("compressed.h5ad", compression="lzf")

In [8]: !du -hs uncompressed.h5ad
2.4G    uncompressed.h5ad

In [9]: !du -hs compressed.h5ad
1.4G    compressed.h5ad