Skip to content

Commit

Permalink
Augur scsim warnings
Browse files Browse the repository at this point in the history
Signed-off-by: zethson <[email protected]>
  • Loading branch information
Zethson committed Oct 16, 2024
1 parent 9bba130 commit 8f6fc6d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,5 @@ lightning_logs/*
*/lightning_logs/*

node_modules

test.ipynb
2 changes: 1 addition & 1 deletion pertpy/data/_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def sc_sim_augur() -> AnnData: # pragma: no cover
output_file_path = settings.datasetdir / output_file_name
if not Path(output_file_path).exists():
_download(
url="https://figshare.com/ndownloader/files/31645886",
url="https://figshare.com/ndownloader/files/49828902",
output_file_name=output_file_name,
output_path=settings.datasetdir,
is_zip=False,
Expand Down
4 changes: 2 additions & 2 deletions pertpy/tools/_augur.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
explained_variance_score,
f1_score,
make_scorer,
mean_squared_error,
precision_score,
r2_score,
recall_score,
roc_auc_score,
root_mean_squared_error,
)
from sklearn.model_selection import StratifiedKFold, cross_validate
from sklearn.preprocessing import LabelEncoder
Expand Down Expand Up @@ -440,7 +440,7 @@ def set_scorer(
"augur_score": make_scorer(self.ccc_score),
"r2": make_scorer(r2_score),
"ccc": make_scorer(self.ccc_score),
"neg_mean_squared_error": make_scorer(mean_squared_error),
"neg_mean_squared_error": make_scorer(root_mean_squared_error),
"explained_variance": make_scorer(explained_variance_score),
}
)
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ addopts = [
]
markers = [
"conda: marks a subset of tests to be ran on the Bioconda CI.",
"extra: marks tests that require extra dependencies."
"extra: marks tests that require extra dependencies.",
"slow: mark test as slow to run"
]
minversion = 6.0
norecursedirs = [ '.*', 'build', 'dist', '*.egg', 'data', '__pycache__']
Expand Down
3 changes: 1 addition & 2 deletions tests/tools/test_augur.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import pytest
import scanpy as sc
from pertpy.tools._augur import Params
from sklearn.ensemble import RandomForestRegressor

CWD = Path(__file__).parent.resolve()

Expand Down Expand Up @@ -145,7 +144,7 @@ def test_select_variance(adata):
"""Test select variance implementation."""
adata = ag_rfc.load(adata)
sc.pp.highly_variable_genes(adata)
adata_cell_type = adata[adata.obs["cell_type"] == "CellTypeA"]
adata_cell_type = adata[adata.obs["cell_type"] == "CellTypeA"].copy()
ad = ag_rfc.select_variance(adata_cell_type, var_quantile=0.5, span=0.3, filter_negative_residuals=False)

assert 3672 == len(ad.var.index[ad.var["highly_variable"]])
Expand Down

0 comments on commit 8f6fc6d

Please sign in to comment.