Skip to content

Commit

Permalink
tes and relnote
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep committed Dec 18, 2023
1 parent 8efef36 commit 4ef04f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/release-notes/1.9.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
- Fix {func}`scanpy.pl.violin` usage of `seaborn.catplot` {pr}`2739` {smaller}`E Roellin`
- Fix {func}`scanpy.pp.highly_variable_genes` to handle the combinations of `inplace` and `subset` consistently {pr}`2757` {smaller}`E Roellin`
- Replace usage of various deprecated functionality from {mod}`anndata` and {mod}`pandas` {pr}`2678` {pr}`2779` {smaller}`P Angerer`
- Allow to use default `n_top_genes` when using {func}`scanpy.pp.highly_variable_genes` flavor `'seurat_v3'` {pr}`2782` {smaller}`P Angerer`
6 changes: 5 additions & 1 deletion scanpy/tests/test_highly_variable_genes.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,12 +387,16 @@ def test_higly_variable_genes_compare_to_seurat_v3():
seu = pd.Index(seurat_hvg_info_batch["x"].values)
assert len(seu.intersection(df.index)) / 4000 > 0.95


@needs.skmisc
def test_higly_variable_genes_seurat_v3_warning():
pbmc = pbmc3k()[:200].copy()
sc.pp.log1p(pbmc)
with pytest.warns(
UserWarning,
match="`flavor='seurat_v3'` expects raw count data, but non-integers were found.",
):
sc.pp.highly_variable_genes(pbmc, n_top_genes=1000, flavor="seurat_v3")
sc.pp.highly_variable_genes(pbmc, flavor="seurat_v3")


def test_filter_genes_dispersion_compare_to_seurat():
Expand Down

0 comments on commit 4ef04f2

Please sign in to comment.