Reputation: 1
filtering of highly variable genes using scanpy does not work in Windows. The same command has no issues while working with Mac.
sc.pp.highly_variable_genes(adata, layer = 'raw_data', n_top_genes = 4000, flavor = 'seurat_v3')
ImportError Traceback (most recent call last)
File ~\Anaconda3\lib\site-packages\scanpy\preprocessing\_highly_variable_genes.py:53, in _highly_variable_genes_seurat_v3(adata, layer, n_top_genes, batch_key, check_values, span, subset, inplace)
52 try:
---> 53 from skmisc.loess import loess
54 except ImportError:
File ~\AppData\Roaming\Python\Python39\site-packages\skmisc\loess\__init__.py:51, in <module>
1 """
2 =================================================
3 Locally-weighted regression (:mod:`skmisc.loess`)
(...)
49 pp. 829--836. 1979.
50 """
---> 51 from ._loess import (loess, loess_model, loess_inputs, loess_control,
52 loess_outputs, loess_prediction,
53 loess_confidence_intervals, loess_anova)
56 __all__ = ['loess', 'loess_model', 'loess_control', 'loess_inputs',
57 'loess_model', 'loess_outputs', 'loess_prediction',
58 'loess_confidence_intervals', 'loess_anova']
ImportError: DLL load failed while importing _loess: The specified module could not be found.
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
Input In [7], in <cell line: 1>()
----> 1 sc.pp.highly_variable_genes(adata, layer = 'raw_data', n_top_genes = 4000, flavor = 'seurat_v3')
File ~\Anaconda3\lib\site-packages\scanpy\preprocessing\_highly_variable_genes.py:422, in highly_variable_genes(adata, layer, n_top_genes, min_disp, max_disp, min_mean, max_mean, span, n_bins, flavor, subset, inplace, batch_key, check_values)
416 raise ValueError(
417 '`pp.highly_variable_genes` expects an `AnnData` argument, '
418 'pass `inplace=False` if you want to return a `pd.DataFrame`.'
419 )
421 if flavor == 'seurat_v3':
--> 422 return _highly_variable_genes_seurat_v3(
423 adata,
424 layer=layer,
425 n_top_genes=n_top_genes,
426 batch_key=batch_key,
427 check_values=check_values,
428 span=span,
429 subset=subset,
430 inplace=inplace,
431 )
433 if batch_key is None:
434 df = _highly_variable_genes_single_batch(
435 adata,
436 layer=layer,
(...)
443 flavor=flavor,
444 )
File ~\Anaconda3\lib\site-packages\scanpy\preprocessing\_highly_variable_genes.py:55, in _highly_variable_genes_seurat_v3(adata, layer, n_top_genes, batch_key, check_values, span, subset, inplace)
53 from skmisc.loess import loess
54 except ImportError:
---> 55 raise ImportError(
56 'Please install skmisc package via `pip install --user scikit-misc'
57 )
58 df = pd.DataFrame(index=adata.var_names)
59 X = adata.layers[layer] if layer is not None else adata.X
ImportError: Please install skmisc package via `pip install --user scikit-misc
That error is wrong becasue scikit-misc is already installed and requirements fulfilled.
Upvotes: 0
Views: 884
Reputation: 410
This is an issue with skmisc
, according to this you should "try installing numpy+mkl before any other packages"
Upvotes: 0