Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Dask in highly_variable_genes #2809

Merged
merged 59 commits into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
7ced391
add some failing tests
flying-sheep Jan 15, 2024
8081869
simplify test
flying-sheep Jan 15, 2024
cf50542
make tests make sense
flying-sheep Jan 15, 2024
b3ca8a8
ddf
flying-sheep Jan 16, 2024
de6064e
ddf
flying-sheep Jan 16, 2024
c4540ef
Merge branch 'master' into dask-hvg
flying-sheep Jan 16, 2024
8d6142a
Fix highly_variable_genes with layer specified
flying-sheep Jan 16, 2024
16190c6
WIP
flying-sheep Jan 16, 2024
a027908
WIP
flying-sheep Jan 18, 2024
4049faa
WIP
flying-sheep Jan 19, 2024
cff83e0
extract
flying-sheep Jan 19, 2024
826e0b0
almost
flying-sheep Jan 19, 2024
55b9d4b
single works
flying-sheep Jan 19, 2024
4f3b410
refactor cutoffs
flying-sheep Jan 19, 2024
6af0e98
Fix regression
flying-sheep Jan 19, 2024
350f9f5
extract batch branch
flying-sheep Jan 19, 2024
47d676c
var names
flying-sheep Jan 19, 2024
0f92811
Merge branch 'master' into dask-hvg
flying-sheep Jan 19, 2024
5a63881
add tests for n_top_genes and cell_ranger
flying-sheep Jan 19, 2024
2dc0ad8
n_top_genes
flying-sheep Jan 19, 2024
5a43095
Support cell_ranger
flying-sheep Jan 22, 2024
0448a22
refactor
flying-sheep Jan 22, 2024
28d25bc
more WIP
flying-sheep Jan 22, 2024
1bedd5c
cell ranger fix
flying-sheep Jan 23, 2024
181a6c5
almost
flying-sheep Jan 23, 2024
ac7398f
Merge branch 'master' into dask-hvg
flying-sheep Jan 23, 2024
e28aefa
add XFail
flying-sheep Jan 23, 2024
e3beadd
Fix docs, add relnote
flying-sheep Jan 23, 2024
ce115c3
reuse
flying-sheep Jan 25, 2024
d6ea0dd
oops
flying-sheep Jan 25, 2024
4d22ed1
Merge branch 'master' into dask-hvg
flying-sheep Jan 25, 2024
414e667
Fix order
flying-sheep Jan 25, 2024
246f9b5
remove helper
flying-sheep Feb 1, 2024
f53e4b7
Use pandas
flying-sheep Feb 1, 2024
4398114
remove unneeded shims
flying-sheep Feb 1, 2024
db5c191
remove series_to_array
flying-sheep Feb 1, 2024
35a79ab
Merge branch 'master' into dask-hvg
flying-sheep Feb 1, 2024
ab21f00
Update scanpy/preprocessing/_highly_variable_genes.py
flying-sheep Feb 6, 2024
b1b53bd
remove unused mark
flying-sheep Feb 6, 2024
4e09933
use pandas ddof
flying-sheep Feb 6, 2024
698af7d
Use COW compatible indexing
flying-sheep Feb 6, 2024
850aae4
remove _unbin
flying-sheep Feb 6, 2024
cdfd231
Don’t set index name
flying-sheep Feb 6, 2024
a949869
restructure stats functions
flying-sheep Feb 6, 2024
f1832b6
relnotes
flying-sheep Feb 6, 2024
222f340
fmt
flying-sheep Feb 6, 2024
e1f3cca
try showing patch coverage
ivirshup Feb 12, 2024
5ecc09e
Revert "try showing patch coverage"
ivirshup Feb 12, 2024
92da20b
index =
flying-sheep Feb 12, 2024
1cf81c4
_postprocess_dispersions_seurat
flying-sheep Feb 12, 2024
6d21326
Check log entries
flying-sheep Feb 12, 2024
5ab665f
Merge branch 'master' into dask-hvg
flying-sheep Feb 12, 2024
5a7c74d
back to X
flying-sheep Feb 12, 2024
2ae87bd
warning instead of info
flying-sheep Feb 12, 2024
3d18c07
Fix handler stuf
flying-sheep Feb 12, 2024
28ea6a2
Merge branch 'master' into dask-hvg
flying-sheep Feb 13, 2024
b956742
Merge branch 'master' into dask-hvg
flying-sheep Feb 15, 2024
c0c9756
Discard changes to scanpy/tests/conftest.py
flying-sheep Feb 15, 2024
54388f8
Merge branch 'master' into dask-hvg
flying-sheep Feb 15, 2024
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
1 change: 1 addition & 0 deletions docs/release-notes/1.10.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
now support a `mask` parameter {pr}`2272` {smaller}`C Bright, T Marcella, & P Angerer`
* {func}`scanpy.tl.rank_genes_groups` no longer warns that it's default was changed from t-test_overestim_var to t-test {pr}`2798` {smaller}`L Heumos`
* {func}`scanpy.pp.highly_variable_genes` has new flavor `seurat_v3_paper` that is in its implementation consistent with the paper description in Stuart et al 2018. {pr}`2792` {smaller}`E Roellin`
* {func}`scanpy.pp.highly_variable_genes` supports dask for the default `seurat` and `cell_ranger` flavors {pr}`2809` {smaller}`P Angerer`

```{rubric} Docs
```
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ doc = [
"ipython>=7.20", # for nbsphinx code highlighting
"matplotlib!=3.6.1",
# TODO: remove necessity for being able to import doc-linked classes
"dask",
"scanpy[paga]",
"sam-algorithm",
]
Expand Down
9 changes: 8 additions & 1 deletion scanpy/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@ class ZappyArray:
pass


__all__ = ["cache", "DaskArray", "fullname", "pkg_metadata", "pkg_version"]
__all__ = [
"cache",
"DaskArray",
"ZappyArray",
"fullname",
"pkg_metadata",
"pkg_version",
]


def fullname(typ: type) -> str:
Expand Down
3 changes: 2 additions & 1 deletion scanpy/preprocessing/_deprecated/highly_variable_genes.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ def filter_genes_dispersion( # noqa: PLR0917
if n_top_genes is not None and not all(
x is None for x in [min_disp, max_disp, min_mean, max_mean]
):
logg.info("If you pass `n_top_genes`, all cutoffs are ignored.")
msg = "If you pass `n_top_genes`, all cutoffs are ignored."
warnings.warn(msg, UserWarning)
if min_disp is None:
min_disp = 0.5
if min_mean is None:
Expand Down
2 changes: 1 addition & 1 deletion scanpy/preprocessing/_distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def materialize_as_ndarray(
def materialize_as_ndarray(
a: ArrayLike | tuple[ArrayLike | ZappyArray | DaskArray, ...],
) -> tuple[np.ndarray] | np.ndarray:
"""Convert distributed arrays to ndarrays."""
"""Compute distributed arrays and convert them to numpy ndarrays."""
if not isinstance(a, tuple):
return np.asarray(a)

Expand Down
Loading
Loading