You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Persisting normalized data so it doesn't need to be recomputed:
adata.X: dask.array.Arrayfromanndata.ioimportTemporaryStorage# Comes up with unique key names so user doesn't have to think about overridingtemp_store=TemporaryStorage(zarr.open("s3:..."))
adata.layers["counts"] =adata.X.copy()
sc.pp.normalize_total(adata)
sc.pp.log1p(adata)
sc.pp.pca(adata)
adata.obsm["X_pca"] =temp_store .store(adata.obsm["X_pca"])
adata.X=temp_store .store(adata.X)
Persisting a copy of the matrix optimized for plotting
The to_zarr call seems to provide significant benefit by caching the normalization and log transformation that would otherwise need to be performed again for calculating HVGs, firing the PCA, and finally calculating the observation level embeddings.
Activity
ivirshup commentedon Mar 20, 2024
While working on:
We got to see some performance benefits to this. For example:
The
to_zarrcall seems to provide significant benefit by caching the normalization and log transformation that would otherwise need to be performed again for calculating HVGs, firing the PCA, and finally calculating the observation level embeddings.