File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
dynamo/preprocessing/external Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 17
17
import statsmodels .discrete .discrete_model
18
18
import statsmodels .nonparametric .kernel_regression
19
19
from anndata import AnnData
20
- from KDEpy import FFTKDE
21
20
from scipy import stats
22
21
23
22
from ...configuration import DKM
@@ -71,6 +70,10 @@ def is_outlier(
71
70
Returns:
72
71
Boolean array indicating whether each value in `y` is an outlier (`True`) or not (`False`).
73
72
"""
73
+ try :
74
+ from KDEpy import FFTKDE
75
+ except ImportError :
76
+ raise ImportError ("Please install KDEpy for sctransform." )
74
77
z = FFTKDE (kernel = "gaussian" , bw = "ISJ" ).fit (x )
75
78
z .evaluate ()
76
79
bin_width = (max (x ) - min (x )) * z .bw / 2
@@ -215,6 +218,10 @@ def sctransform_core(
215
218
"""
216
219
import multiprocessing
217
220
import sys
221
+ try :
222
+ from KDEpy import FFTKDE
223
+ except ImportError :
224
+ raise ImportError ("Please install KDEpy for sctransform." )
218
225
219
226
main_info ("sctransform adata on layer: %s" % (layer ))
220
227
X = DKM .select_layer_data (adata , layer ).copy ()
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ pandas>=1.3.5
3
3
scipy >= 1.4.1
4
4
scikit-learn >= 0.19.1
5
5
anndata >= 0.8.0
6
- KDEpy
7
6
loompy >= 3.0.5
8
7
matplotlib >= 3.5.3
9
8
setuptools
You can’t perform that action at this time.
0 commit comments