File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -121,18 +121,22 @@ def write_zarr(
121121 Matrices - sparse or dense - are currently stored as they are.
122122 """
123123 import zarr
124+ from anndata import settings
124125 from anndata ._io .specs .registry import write_elem
125126 from anndata ._io .zarr import write_zarr as anndata_write_zarr
126127
127128 from .. import __anndataversion__ , __mudataversion__ , __version__
129+ zarr_format = 2
130+ if hasattr (settings , "zarr_write_format" ):
131+ zarr_format = settings .zarr_write_format
128132
129133 if isinstance (data , AnnData ):
130134 adata = data
131135 anndata_write_zarr (store , adata , chunks = chunks , ** kwargs )
132136 elif isinstance (data , MuData ):
133137 if isinstance (store , Path ):
134138 store = str (store )
135- file = zarr .open (store , mode = "w" )
139+ file = zarr .open (store , mode = "w" , zarr_format = zarr_format )
136140 mdata = data
137141 write_elem (
138142 file ,
You can’t perform that action at this time.
0 commit comments