scanpy
scanpy copied to clipboard
Issue running sc.pp.highly_variable_genes
- [ x ] I have checked that this issue has not already been reported.
- [ x ] I have confirmed this bug exists on the latest version of scanpy.
- [ ] (optional) I have confirmed this bug exists on the master branch of scanpy.
I am running the standard scrnaseq pipeline on some data and am experiencing an issue.
When I run
sc.pp.highly_variable_genes(adata,n_top_genes=4000, batch_key='batch')
I get the error
If you pass `n_top_genes`, all cutoffs are ignored.
extracting highly variable genes
ZeroDivisionError: division by zero
I've unfortunately never seen this before, and i'm not sure how to address it. I would love if someone could help with this.
Some additional information on my data < adata.X.shape Out[21]: (3433, 16836)
adata.X
array([[0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], ..., [0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.], [0., 0., 0., ..., 0., 0., 0.]], dtype=float32)
anndata 0.8.0 scanpy 1.9.1
AlexFunctions NA JonFunctions NA PIL 9.1.0 PyQt5 NA atomicwrites 1.4.0 autoreload NA backcall 0.2.0 beta_ufunc NA binom_ufunc NA bs4 4.11.1 cffi 1.15.0 chardet 4.0.0 cloudpickle 2.0.0 colorama 0.4.4 cycler 0.10.0 cython_runtime NA dateutil 2.8.2 debugpy 1.6.0 decorator 5.1.1 defusedxml 0.7.1 entrypoints 0.4 h5py 3.6.0 hypergeom_ufunc NA igraph 0.9.1 import_all NA ipykernel 6.13.0 jedi 0.18.1 joblib 1.1.0 kiwisolver 1.4.2 leidenalg 0.8.4 llvmlite 0.38.0 matplotlib 3.5.1 matplotlib_inline NA mpl_toolkits NA natsort 8.1.0 nbinom_ufunc NA numba 0.55.1 numpy 1.21.6 packaging 21.3 pandas 1.4.2 params NA parso 0.8.3 pexpect 4.8.0 pickleshare 0.7.5 pkg_resources NA plotly 5.7.0 prompt_toolkit 3.0.29 psutil 5.9.0 ptyprocess 0.7.0 pycparser 2.21 pydev_ipython NA pydevconsole NA pydevd 2.8.0 pydevd_file_utils NA pydevd_plugins NA pydevd_tracing NA pygments 2.11.2 pynndescent 0.5.6 pyparsing 3.0.8 pytz 2022.1 scipy 1.8.0 seaborn 0.11.2 session_info 1.0.0 setuptools 62.1.0 sip NA six 1.16.0 sklearn 1.0.2 soupsieve 2.3.1 sphinxcontrib NA spyder 5.3.0 spyder_kernels 2.3.0 spydercustomize NA statsmodels 0.13.2 storemagic NA texttable 1.6.4 threadpoolctl 3.1.0 tornado 6.1 tqdm 4.64.0 traitlets 5.1.1 typing_extensions NA umap 0.5.3 wcwidth 0.2.5 wurlitzer 3.0.2 yaml 6.0 zipp NA zmq 22.3.0
IPython 7.32.0 jupyter_client 7.2.2 jupyter_core 4.9.2
Python 3.9.12 | packaged by conda-forge | (main, Mar 24 2022, 23:25:59) [GCC 10.3.0] Linux-5.4.0-100-generic-x86_64-with-glibc2.31
Session information updated at 2022-04-14 16:33