Open Jadeapple opened 4 months ago
Hey
I found an example in the anndata.experimental.sparse_dataset
docstring.
Here is my example code:
import anndata
import h5py
from anndata.experimental import sparse_dataset, read_elem
with h5py.File("somefile.h5ad", "r") as f:
X = sparse_dataset(f["X"])
adata = anndata.AnnData(
layers={"backed": X}, obs=read_elem(f["obs"]), var=read_elem(f["var"])
)
print(adata.layers["backed"])
Writing this anndata object to a new file does not keep the X dataset in the new format.
Hello, I want to use scATAC-seq dataset to deconvolute 10x Visium dataset, is it feasible?
When I prepare anndata for the regression model, some warings appeared as follows: cell2location.models.RegressionModel.setup_anndata(adata=adata_sc, ... batch_key='orig.ident', # 10X reaction / sample / batch ... labels_key='celltype' # cell type, covariate used for constructing signatures ... )