Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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


Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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


Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/notebooks/1_download_and_preprocess.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
},
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"}
Expand Down
4 changes: 3 additions & 1 deletion scdataloader/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -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, :],
Expand Down
Loading