diff --git a/README.md b/README.md index d69bf7c..53a7fee 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ pip install scdataloader # or pip install scDataLoader[dev] # for dev dependencies -lamin init --storage ./testdb --name test --schema bionty +lamin init --storage ./testdb --name test --modules bionty ``` if you start with lamin and had to do a `lamin init`, you will also need to @@ -107,7 +107,7 @@ pip install -e scDataLoader[dev] ```python # initialize a local lamin database -#! lamin init --storage ./cellxgene --name cellxgene --schema bionty +#! lamin init --storage ./cellxgene --name cellxgene --modules bionty from scdataloader import utils, Preprocessor, DataModule @@ -143,7 +143,7 @@ more ```python # initialize a local lamin database -#! lamin init --storage ./cellxgene --name cellxgene --schema bionty +#! lamin init --storage ./cellxgene --name cellxgene --modules bionty from scdataloader import utils, Preprocessor, SimpleAnnDataset, Collator, DataLoader @@ -203,7 +203,7 @@ scDataLoader as a script (a notebook version is also available in ```python # initialize a local lamin database -#! lamin init --storage ./cellxgene --name cellxgene --schema bionty +#! lamin init --storage ./cellxgene --name cellxgene --modules bionty from scdataloader import utils from scdataloader.preprocess import LaminPreprocessor, additional_postprocess, additional_preprocess diff --git a/docs/index.md b/docs/index.md index d979407..87e9f14 100644 --- a/docs/index.md +++ b/docs/index.md @@ -53,7 +53,7 @@ pip install scdataloader # or pip install scDataLoader[dev] # for dev dependencies -lamin init --storage ./testdb --name test --schema bionty +lamin init --storage ./testdb --name test --modules bionty ``` if you start with lamin and had to do a `lamin init`, you will also need to @@ -97,7 +97,7 @@ pip install -e scDataLoader[dev] ```python # initialize a local lamin database -#! lamin init --storage ./cellxgene --name cellxgene --schema bionty +#! lamin init --storage ./cellxgene --name cellxgene --modules bionty from scdataloader import utils, Preprocessor, DataModule @@ -133,7 +133,7 @@ more ```python # initialize a local lamin database -#! lamin init --storage ./cellxgene --name cellxgene --schema bionty +#! lamin init --storage ./cellxgene --name cellxgene --modules bionty from scdataloader import utils, Preprocessor, SimpleAnnDataset, Collator, DataLoader @@ -193,7 +193,7 @@ scDataLoader as a script (a notebook version is also available in ```python # initialize a local lamin database -#! lamin init --storage ./cellxgene --name cellxgene --schema bionty +#! lamin init --storage ./cellxgene --name cellxgene --modules bionty from scdataloader import utils from scdataloader.preprocess import LaminPreprocessor, additional_postprocess, additional_preprocess diff --git a/docs/notebooks/1_download_and_preprocess.ipynb b/docs/notebooks/1_download_and_preprocess.ipynb index 6691db5..325f973 100644 --- a/docs/notebooks/1_download_and_preprocess.ipynb +++ b/docs/notebooks/1_download_and_preprocess.ipynb @@ -30,7 +30,7 @@ ], "source": [ "# initialize a local lamin database\n", - "# !lamin init --storage ~/scdataloader --schema bionty\n", + "# !lamin init --storage ~/scdataloader --modules bionty\n", "! lamin load scdataloader" ] }, diff --git a/pyproject.toml b/pyproject.toml index 3ad7996..c8e5a07 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "scdataloader" -version = "2.1.2" +version = "2.1.3" description = "a dataloader for single cell data in lamindb" authors = [ {name = "jkobject", email = "jkobject@gmail.com"} diff --git a/scdataloader/preprocess.py b/scdataloader/preprocess.py index c1311ef..6cce138 100644 --- a/scdataloader/preprocess.py +++ b/scdataloader/preprocess.py @@ -866,10 +866,12 @@ def additional_postprocess(adata): adata.obs[NEWOBS] = adata.obs[NEWOBS].map(relab) + # scipy >= 1.15 no longer accepts a pandas Series for sparse boolean + # indexing of AnnData.X, so cast the mask to a numpy array. cluster_means = pd.DataFrame( np.array( [ - adata.X[adata.obs[NEWOBS] == i].mean(axis=0) + adata.X[(adata.obs[NEWOBS] == i).to_numpy()].mean(axis=0) for i in adata.obs[NEWOBS].unique() ] )[:, 0, :],