Skip to content

Commit

Permalink
Address deprecated way of initializing AnnData in _scrublet.py
Browse files Browse the repository at this point in the history
While running SnapAtac2 notebooks the following warning was
fairly frequently encountered when running `snap.pp.scrublet()`:

```
/usr/local/lib/python3.11/site-packages/anndata/_core/anndata.py:522: FutureWarning:

The dtype argument is deprecated and will be removed in late 2024.
```

It looks like the `anndata` project plans to deprecate and completely
remove the `dtype` argument to `AnnData` instantiation somewhat soon.
See: scverse/anndata@85162c7
See also: scverse/anndata#1126

This commit removes the `dtype` argument from `AnnData` instantiation
as it will be removed in future versions of `AnnData`.
  • Loading branch information
njmei committed Mar 30, 2024
1 parent 58fe90a commit f9fe4f9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def scrub_doublets_core(
del count_matrix_sim
gc.collect()
_, evecs = spectral(
AnnData(X=merged_matrix, dtype=merged_matrix.dtype),
AnnData(X=merged_matrix),
features=None,
n_comps=n_comps,
inplace=False,
Expand Down

0 comments on commit f9fe4f9

Please sign in to comment.