lilab-bcb / pegasus

A tool for analyzing trascriptomes of millions of single cells.
https://pegasus.readthedocs.io
BSD 3-Clause "New" or "Revised" License
81 stars 21 forks source link

Conda yaml for pegasus #184

Closed bschilder closed 3 years ago

bschilder commented 3 years ago

Is there a yaml file to create a fully functional conda env for pegasus? The instructions in the README install the latest umap-learn which isn't compatible with pegasus currently, so I made a conda yaml file to try and be more explicit:

Conda yaml

pegasus.yml.txt

name: pegasus
channels:
  - conda-forge
  - bioconda 
  - plotly 
  - nodefaults  
dependencies: 
  # Python
  - python=3.8    
  - "umap-learn<0.5,>=0.4" 
  - anndata  
  - matplotlib 
  - seaborn 
  - plotly 
  - chart-studio 
  - glob2   
  # Jupyter
  - jupyter
  ## nbconvert >=6.0 causes problems
  - nbconvert=5.6.1
  - nb_conda_kernels
  ## After install jupyter_contrib_nbextensions, run: jupyter nbextensions_configurator enable --user
  - jupyter_contrib_nbextensions 
  - pip 
  - pip: 
    - pegasuspy 

conda create env -f pegasus.yml.txt

Conda env: full

``` # packages in environment at /home/bschilder/anaconda3/envs/pegasus: # # Name Version Build Channel _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 1_llvm conda-forge _r-mutex 1.0.1 anacondar_1 conda-forge adjusttext 0.7.3 pypi_0 pypi alsa-lib 1.2.3 h516909a_0 conda-forge anndata 0.7.6 py38h578d9bd_0 conda-forge annoy 1.17.0 pypi_0 pypi argon2-cffi 20.1.0 py38h27cfd23_1 asciitree 0.3.3 pypi_0 pypi attrs 20.3.0 pyhd3eb1b0_0 backcall 0.2.0 pyhd3eb1b0_0 binutils_impl_linux-64 2.35.1 h193b22a_2 conda-forge binutils_linux-64 2.35 h67ddf6f_30 conda-forge bleach 3.3.0 pyhd3eb1b0_0 brotlipy 0.7.0 py38h27cfd23_1003 bwidget 1.9.14 ha770c72_0 conda-forge bzip2 1.0.8 h7b6447c_0 c-ares 1.17.1 h27cfd23_0 ca-certificates 2021.4.13 h06a4308_1 cached-property 1.5.2 py_0 cairo 1.16.0 hf32fb01_1 certifi 2020.12.5 py38h06a4308_0 cffi 1.14.5 py38h261ae71_0 chardet 4.0.0 py38h06a4308_1003 chart-studio 1.1.0 pyh9f0ad1d_0 conda-forge click 7.1.2 pypi_0 pypi colormath 3.0.0 py_2 conda-forge cryptography 3.4.7 py38hd23ed53_0 curl 7.76.1 h979ede3_1 conda-forge cycler 0.10.0 py38_0 cython 0.29.23 pypi_0 pypi dbus 1.13.18 hb2f20db_0 decorator 5.0.7 pyhd8ed1ab_0 conda-forge defusedxml 0.7.1 pyhd3eb1b0_0 demuxem 0.1.5.post1 pypi_0 pypi docopt 0.6.2 pypi_0 pypi entrypoints 0.3 py38_0 expat 2.3.0 h2531618_2 fasteners 0.16 pypi_0 pypi fbpca 1.0 pypi_0 pypi fontconfig 2.13.1 hba837de_1005 conda-forge forceatlas2-python 1.1 pypi_0 pypi freetype 2.10.4 h5ab3b9f_0 fribidi 1.0.10 h7b6447c_0 gcc_impl_linux-64 9.3.0 h70c0ae5_19 conda-forge gcc_linux-64 9.3.0 hf25ea35_30 conda-forge geosketch 1.2 pypi_0 pypi gettext 0.21.0 hf68c758_0 gfortran_impl_linux-64 9.3.0 hc4a2995_19 conda-forge gfortran_linux-64 9.3.0 hdc58fab_30 conda-forge glib 2.68.1 h36276a3_0 glob2 0.7 py_0 conda-forge gmp 6.2.1 h2531618_2 gprofiler-official 1.0.0 pypi_0 pypi graphite2 1.3.14 h23475e2_0 gsl 2.6 he838d99_2 conda-forge gst-plugins-base 1.18.4 hf529b03_1 conda-forge gstreamer 1.18.4 h76c114f_1 conda-forge gxx_impl_linux-64 9.3.0 hd87eabc_19 conda-forge gxx_linux-64 9.3.0 h3fbe746_30 conda-forge h5py 3.2.1 nompi_py38h9915d05_100 conda-forge harfbuzz 2.8.0 h83ec7ef_1 conda-forge harmony-pytorch 0.1.6 pypi_0 pypi hdf5 1.10.6 nompi_h6a2412b_1114 conda-forge hnswlib 0.5.1 pypi_0 pypi icu 68.1 h2531618_0 idna 2.10 pyhd3eb1b0_0 importlib-metadata 4.0.1 py38h578d9bd_0 conda-forge importlib_metadata 4.0.1 hd8ed1ab_0 conda-forge intervaltree 2.1.0 pypi_0 pypi ipykernel 5.5.3 py38hd0cf306_0 conda-forge ipython 7.22.0 py38hb070fc8_0 ipython_genutils 0.2.0 pyhd3eb1b0_1 ipywidgets 7.6.3 pyhd3eb1b0_1 jedi 0.17.0 py38_0 jinja2 2.11.3 pyhd3eb1b0_0 joblib 1.0.1 pyhd8ed1ab_0 conda-forge jpeg 9d h36c2ea0_0 conda-forge jsonschema 3.2.0 py_2 jupyter 1.0.0 py38h578d9bd_6 conda-forge jupyter_client 6.1.12 pyhd3eb1b0_0 jupyter_console 6.4.0 pyhd3eb1b0_0 jupyter_contrib_core 0.3.3 py_2 conda-forge jupyter_contrib_nbextensions 0.5.1 pyhd8ed1ab_2 conda-forge jupyter_core 4.7.1 py38h06a4308_0 jupyter_highlight_selected_word 0.2.0 py38h578d9bd_1002 conda-forge jupyter_latex_envs 1.4.6 pyhd8ed1ab_1002 conda-forge jupyter_nbextensions_configurator 0.4.1 py38h578d9bd_2 conda-forge jupyterlab_widgets 1.0.0 pyhd3eb1b0_1 kernel-headers_linux-64 2.6.32 h77966d4_13 conda-forge kiwisolver 1.3.1 py38h2531618_0 krb5 1.17.2 h926e7f8_0 conda-forge lcms2 2.12 h3be6417_0 ld_impl_linux-64 2.35.1 hea4e1c9_2 conda-forge libblas 3.9.0 8_mkl conda-forge libcblas 3.9.0 8_mkl conda-forge libclang 11.1.0 default_ha53f305_0 conda-forge libcurl 7.76.1 hc4aaa36_1 conda-forge libedit 3.1.20210216 h27cfd23_1 libev 4.33 h7b6447c_0 libevent 2.1.10 hcdb4288_3 conda-forge libffi 3.3 he6710b0_2 libgcc-devel_linux-64 9.3.0 h7864c58_19 conda-forge libgcc-ng 9.3.0 h2828fa1_19 conda-forge libgfortran-ng 9.3.0 hff62375_19 conda-forge libgfortran5 9.3.0 hff62375_19 conda-forge libglib 2.68.1 h3e27bee_0 conda-forge libgomp 9.3.0 h2828fa1_19 conda-forge libiconv 1.16 h516909a_0 conda-forge liblapack 3.9.0 8_mkl conda-forge libllvm10 10.0.1 he513fc3_3 conda-forge libllvm11 11.1.0 hf817b99_2 conda-forge libnghttp2 1.43.0 h812cca2_0 conda-forge libpng 1.6.37 hbc83047_0 libpq 13.2 hfd2b0eb_2 conda-forge libsodium 1.0.18 h7b6447c_0 libssh2 1.9.0 h1ba5d50_1 libstdcxx-devel_linux-64 9.3.0 hb016644_19 conda-forge libstdcxx-ng 9.3.0 h6de172a_19 conda-forge libtiff 4.2.0 hdc55705_1 conda-forge libuuid 2.32.1 h7f98852_1000 conda-forge libwebp-base 1.2.0 h27cfd23_0 libxcb 1.14 h7b6447c_0 libxkbcommon 1.0.3 he3ba5ed_0 conda-forge libxml2 2.9.10 h72842e0_4 conda-forge libxslt 1.1.33 h15afd5d_2 conda-forge lightgbm 3.2.1 pypi_0 pypi lineedit 0.1.6 pyhd8ed1ab_0 conda-forge llvm-openmp 11.1.0 h4bd325d_1 conda-forge llvmlite 0.36.0 py38h4630a5e_0 conda-forge loompy 3.0.6 pypi_0 pypi louvain 0.7.0 pypi_0 pypi lxml 4.6.3 py38hf1fe3a4_0 conda-forge lz4-c 1.9.3 h2531618_0 make 4.3 hd18ef5c_1 conda-forge markupsafe 1.1.1 py38h7b6447c_0 matplotlib 3.3.4 py38h06a4308_0 matplotlib-base 3.3.4 py38h62a2d02_0 mistune 0.8.4 py38h7b6447c_1000 mkl 2020.4 h726a3e6_304 conda-forge mysql-common 8.0.23 ha770c72_1 conda-forge mysql-libs 8.0.23 h935591d_1 conda-forge natsort 7.1.1 pyhd3eb1b0_0 nb_conda_kernels 2.3.1 py38h578d9bd_0 conda-forge nbconvert 5.6.1 py38h32f6830_1 conda-forge nbformat 5.1.3 pyhd3eb1b0_0 ncurses 6.2 he6710b0_1 networkx 2.5 py_0 notebook 6.3.0 py38h06a4308_0 nspr 4.30 h9c3ff4c_0 conda-forge nss 3.64 hb5efdd6_0 conda-forge numba 0.53.1 py38h0e12cce_0 conda-forge numcodecs 0.7.3 pypi_0 pypi numpy 1.20.2 py38h9894fe3_0 conda-forge numpy-groupies 0.9.13 pypi_0 pypi olefile 0.46 py_0 openssl 1.1.1k h27cfd23_0 packaging 20.9 pyhd3eb1b0_0 pandas 1.2.4 py38h2531618_0 pandoc 2.12 h06a4308_0 pandocfilters 1.4.3 py38h06a4308_1 pango 1.48.4 hb8ff022_0 conda-forge parso 0.8.2 pyhd3eb1b0_0 patsy 0.5.1 pypi_0 pypi pcre 8.44 he6710b0_0 pcre2 10.36 h032f7d1_1 conda-forge pegasusio 0.2.10 pypi_0 pypi pegasuspy 1.3.0 pypi_0 pypi pexpect 4.8.0 pyhd3eb1b0_3 pickleshare 0.7.5 pyhd3eb1b0_1003 pillow 8.2.0 py38he98fc37_0 pip 21.0.1 pyhd8ed1ab_0 conda-forge pixman 0.40.0 h7b6447c_0 plotly 4.14.3 pyh44b312d_0 conda-forge prometheus_client 0.10.1 pyhd3eb1b0_0 prompt-toolkit 3.0.18 pyha770c72_0 conda-forge prompt_toolkit 3.0.18 hd8ed1ab_0 conda-forge psutil 5.8.0 pypi_0 pypi ptyprocess 0.7.0 pyhd3eb1b0_2 pybind11 2.6.2 pypi_0 pypi pycparser 2.20 py_2 pygments 2.8.1 pyhd3eb1b0_0 pyopenssl 20.0.1 pyhd3eb1b0_1 pyparsing 2.4.7 pyhd3eb1b0_0 pyqt 5.12.3 py38h578d9bd_7 conda-forge pyqt-impl 5.12.3 py38h7400c14_7 conda-forge pyqt5-sip 4.19.18 py38h709712a_7 conda-forge pyqtchart 5.12 py38h7400c14_7 conda-forge pyqtwebengine 5.12.1 py38h7400c14_7 conda-forge pyrsistent 0.17.3 py38h7b6447c_0 pysocks 1.7.1 py38h06a4308_0 python 3.8.8 hffdb5ce_0_cpython conda-forge python-dateutil 2.8.1 pyhd3eb1b0_0 python-igraph 0.9.1 pypi_0 pypi python_abi 3.8 1_cp38 conda-forge pytz 2021.1 pyhd3eb1b0_0 pyyaml 5.4.1 py38h27cfd23_1 pyzmq 22.0.3 py38h2035c66_1 conda-forge qt 5.12.9 hda022c4_4 conda-forge qtconsole 5.0.3 pyhd3eb1b0_0 qtpy 1.9.0 py_0 r-abind 1.4_5 r40h6115d3f_1003 conda-forge r-askpass 1.1 r40hcdcec82_2 conda-forge r-assertthat 0.2.1 r40h6115d3f_2 conda-forge r-backports 1.2.1 r40hcfec24a_0 conda-forge r-base 4.0.3 h349a78a_8 conda-forge r-base64enc 0.1_3 r40hcdcec82_1004 conda-forge r-bh 1.75.0_0 r40hc72bb7e_0 conda-forge r-bitops 1.0_6 r40hcdcec82_1004 conda-forge r-brio 1.1.1 r40hcfec24a_0 conda-forge r-bslib 0.2.4 r40hc72bb7e_0 conda-forge r-cachem 1.0.4 r40hcfec24a_0 conda-forge r-callr 3.7.0 r40hc72bb7e_0 conda-forge r-catools 1.18.2 r40h03ef668_0 conda-forge r-cli 2.4.0 r40hc72bb7e_0 conda-forge r-cluster 2.1.1 r40h859d828_0 conda-forge r-codetools 0.2_18 r40hc72bb7e_0 conda-forge r-colorspace 2.0_0 r40h9e2df91_0 conda-forge r-commonmark 1.7 r40hcdcec82_1002 conda-forge r-cowplot 1.1.1 r40hc72bb7e_0 conda-forge r-crayon 1.4.1 r40hc72bb7e_0 conda-forge r-crosstalk 1.1.1 r40hc72bb7e_0 conda-forge r-curl 4.3 r40hcfec24a_1 conda-forge r-data.table 1.14.0 r40hcfec24a_0 conda-forge r-deldir 0.2_10 r40h859d828_0 conda-forge r-desc 1.3.0 r40hc72bb7e_0 conda-forge r-diffobj 0.3.3 r40hcfec24a_0 conda-forge r-digest 0.6.27 r40h1b71b39_0 conda-forge r-dplyr 1.0.5 r40h03ef668_0 conda-forge r-dqrng 0.2.1 r40h0357c0b_2 conda-forge r-ellipsis 0.3.1 r40hcdcec82_0 conda-forge r-evaluate 0.14 r40h6115d3f_2 conda-forge r-fansi 0.4.2 r40hcfec24a_0 conda-forge r-farver 2.1.0 r40h03ef668_0 conda-forge r-fastmap 1.1.0 r40h03ef668_0 conda-forge r-fitdistrplus 1.1_3 r40hc72bb7e_0 conda-forge r-fnn 1.1.3 r40h0357c0b_2 conda-forge r-fs 1.5.0 r40h0357c0b_0 conda-forge r-future 1.21.0 r40hc72bb7e_0 conda-forge r-future.apply 1.7.0 r40hc72bb7e_0 conda-forge r-generics 0.1.0 r40hc72bb7e_0 conda-forge r-ggplot2 3.3.3 r40hc72bb7e_0 conda-forge r-ggrepel 0.9.1 r40h03ef668_0 conda-forge r-ggridges 0.5.3 r40hc72bb7e_0 conda-forge r-globals 0.14.0 r40hc72bb7e_0 conda-forge r-glue 1.4.2 r40hcfec24a_0 conda-forge r-goftest 1.2_2 r40hcdcec82_1 conda-forge r-gplots 3.1.1 r40hc72bb7e_0 conda-forge r-gridextra 2.3 r40h6115d3f_1003 conda-forge r-gtable 0.3.0 r40h6115d3f_3 conda-forge r-gtools 3.8.2 r40hcdcec82_1 conda-forge r-hexbin 1.28.2 r40h859d828_0 conda-forge r-htmltools 0.5.1.1 r40h03ef668_0 conda-forge r-htmlwidgets 1.5.3 r40hc72bb7e_0 conda-forge r-httpuv 1.5.5 r40h03ef668_0 conda-forge r-httr 1.4.2 r40h6115d3f_0 conda-forge r-ica 1.0_2 r40h6115d3f_2 conda-forge r-igraph 1.2.6 r40hfbf21e4_1 conda-forge r-irlba 2.3.3 r40h7fa42b6_3 conda-forge r-isoband 0.2.4 r40h03ef668_0 conda-forge r-jquerylib 0.1.3 r40hc72bb7e_0 conda-forge r-jsonlite 1.7.2 r40hcfec24a_0 conda-forge r-kernsmooth 2.23_18 r40h742201e_0 conda-forge r-labeling 0.4.2 r40h142f84f_0 conda-forge r-later 1.1.0.1 r40h0357c0b_0 conda-forge r-lattice 0.20_41 r40hcfec24a_3 conda-forge r-lazyeval 0.2.2 r40hcdcec82_2 conda-forge r-leiden 0.3.7 r40hc72bb7e_0 conda-forge r-lifecycle 1.0.0 r40hc72bb7e_0 conda-forge r-listenv 0.8.0 r40h6115d3f_1 conda-forge r-lmtest 0.9_38 r40h580db52_1 conda-forge r-lsei 1.3_0 r40h86c2bf4_1 conda-forge r-magrittr 2.0.1 r40hcfec24a_1 conda-forge r-mass 7.3_53.1 r40hcfec24a_0 conda-forge r-matrix 1.3_2 r40he454529_0 conda-forge r-matrixstats 0.58.0 r40hcfec24a_0 conda-forge r-mgcv 1.8_34 r40he454529_0 conda-forge r-mime 0.10 r40hcfec24a_0 conda-forge r-miniui 0.1.1.1 r40h6115d3f_1002 conda-forge r-munsell 0.5.0 r40h6115d3f_1003 conda-forge r-nlme 3.1_152 r40h859d828_0 conda-forge r-npsurv 0.5_0 r40h6115d3f_0 conda-forge r-openssl 1.4.3 r40he5c4762_0 conda-forge r-parallelly 1.24.0 r40hc72bb7e_0 conda-forge r-patchwork 1.1.1 r40hc72bb7e_0 conda-forge r-pbapply 1.4_3 r40h6115d3f_0 conda-forge r-pillar 1.6.0 r40hc72bb7e_0 conda-forge r-pkgconfig 2.0.3 r40h6115d3f_1 conda-forge r-pkgload 1.2.1 r40h03ef668_0 conda-forge r-plotly 4.9.3 r40hc72bb7e_0 conda-forge r-plyr 1.8.6 r40h0357c0b_1 conda-forge r-png 0.1_7 r40hcdcec82_1004 conda-forge r-polyclip 1.10_0 r40h0357c0b_2 conda-forge r-praise 1.0.0 r40h6115d3f_1004 conda-forge r-processx 3.5.1 r40hcfec24a_0 conda-forge r-promises 1.2.0.1 r40h03ef668_0 conda-forge r-ps 1.6.0 r40hcfec24a_0 conda-forge r-purrr 0.3.4 r40hcdcec82_1 conda-forge r-r6 2.5.0 r40hc72bb7e_0 conda-forge r-rann 2.6.1 r40h0357c0b_2 conda-forge r-rappdirs 0.3.3 r40hcfec24a_0 conda-forge r-rcolorbrewer 1.1_2 r40h6115d3f_1003 conda-forge r-rcpp 1.0.6 r40h03ef668_0 conda-forge r-rcppannoy 0.0.18 r40h03ef668_0 conda-forge r-rcpparmadillo 0.10.4.0.0 r40h306847c_0 conda-forge r-rcppeigen 0.3.3.9.1 r40h306847c_0 conda-forge r-rcppparallel 5.1.2 r40h03ef668_0 conda-forge r-rcppprogress 0.4.2 r40h6115d3f_1 conda-forge r-rematch2 2.1.2 r40h6115d3f_1 conda-forge r-reshape2 1.4.4 r40h0357c0b_1 conda-forge r-reticulate 1.18 r40h03ef668_0 conda-forge r-rlang 0.4.10 r40hcfec24a_0 conda-forge r-rocr 1.0_11 r40h6115d3f_1 conda-forge r-rpart 4.1_15 r40hcfec24a_2 conda-forge r-rprojroot 2.0.2 r40hc72bb7e_0 conda-forge r-rspectra 0.16_0 r40h51c796c_3 conda-forge r-rstudioapi 0.13 r40hc72bb7e_0 conda-forge r-rtsne 0.15 r40hc8faad4_3 conda-forge r-sass 0.3.1 r40h03ef668_0 conda-forge r-scales 1.1.1 r40h6115d3f_0 conda-forge r-scattermore 0.7 r40hcfec24a_0 conda-forge r-sctransform 0.3.2 r40h34e6507_0 conda-forge r-seurat 4.0.1 r40h03ef668_0 conda-forge r-seuratobject 4.0.0 r40h03ef668_0 conda-forge r-shiny 1.6.0 r40hc72bb7e_0 conda-forge r-sitmo 2.0.1 r40h0357c0b_2 conda-forge r-sourcetools 0.1.7 r40he1b5a44_1002 conda-forge r-spatstat 2.1_0 r40hc72bb7e_0 conda-forge r-spatstat.core 2.1_2 r40h03ef668_0 conda-forge r-spatstat.data 2.1_0 r40hc72bb7e_0 conda-forge r-spatstat.geom 2.1_0 r40hcfec24a_0 conda-forge r-spatstat.linnet 2.1_1 r40hcfec24a_0 conda-forge r-spatstat.sparse 2.0_0 r40hcfec24a_0 conda-forge r-spatstat.utils 2.1_0 r40h7f98852_0 conda-forge r-stringi 1.5.3 r40hcabe038_1 conda-forge r-stringr 1.4.0 r40h6115d3f_2 conda-forge r-survival 3.2_10 r40hcfec24a_0 conda-forge r-sys 3.4 r40hcdcec82_0 conda-forge r-tensor 1.5 r40h6115d3f_1003 conda-forge r-testthat 3.0.2 r40h03ef668_0 conda-forge r-tibble 3.1.1 r40hcfec24a_0 conda-forge r-tidyr 1.1.3 r40h03ef668_0 conda-forge r-tidyselect 1.1.0 r40h6115d3f_0 conda-forge r-utf8 1.2.1 r40hcfec24a_0 conda-forge r-uwot 0.1.10 r40h03ef668_0 conda-forge r-vctrs 0.3.7 r40hcfec24a_0 conda-forge r-viridislite 0.4.0 r40hc72bb7e_0 conda-forge r-waldo 0.2.5 r40hc72bb7e_0 conda-forge r-withr 2.4.2 r40hc72bb7e_0 conda-forge r-xtable 1.8_4 r40h6115d3f_3 conda-forge r-yaml 2.2.1 r40hcfec24a_1 conda-forge r-zeallot 0.1.0 r40h6115d3f_1002 conda-forge r-zoo 1.8_9 r40hcfec24a_0 conda-forge radian 0.5.10 pyhd8ed1ab_0 conda-forge rchitect 0.3.30 py38h497a2fe_1 conda-forge readline 8.1 h27cfd23_0 requests 2.25.1 pyhd3eb1b0_0 retrying 1.3.3 py_2 scanorama 1.7.1 pypi_0 pypi scikit-learn 0.24.1 py38h658cfdd_0 conda-forge scikit-misc 0.1.3 pypi_0 pypi scipy 1.6.2 py38h7b17777_0 conda-forge seaborn 0.11.1 pyhd3eb1b0_0 sed 4.8 h7b6447c_0 send2trash 1.5.0 pyhd3eb1b0_1 setuptools 52.0.0 py38h06a4308_0 six 1.15.0 py38h06a4308_0 sortedcontainers 2.3.0 pypi_0 pypi spectra 0.0.11 py_1 conda-forge sqlite 3.35.5 h74cdb3f_0 conda-forge statsmodels 0.12.2 pypi_0 pypi sysroot_linux-64 2.12 h77966d4_13 conda-forge tbb 2020.3 hfd86e86_0 terminado 0.9.4 py38h06a4308_0 testpath 0.4.4 pyhd3eb1b0_0 texttable 1.6.3 pypi_0 pypi threadpoolctl 2.1.0 pyh5ca1d4c_0 conda-forge tk 8.6.10 hbc83047_0 tktable 2.10 h14c3975_0 torch 1.8.1 pypi_0 pypi tornado 6.1 py38h27cfd23_0 traitlets 5.0.5 pyhd3eb1b0_0 typing-extensions 3.7.4.3 pypi_0 pypi umap-learn 0.4.6 py38h32f6830_0 conda-forge urllib3 1.26.4 pyhd3eb1b0_0 wcwidth 0.2.5 py_0 webencodings 0.5.1 py38_1 wheel 0.36.2 pyhd3eb1b0_0 widgetsnbextension 3.5.1 py38_0 xlrd 1.2.0 pypi_0 pypi xlsxwriter 1.4.0 pypi_0 pypi xorg-kbproto 1.0.7 h7f98852_1002 conda-forge xorg-libice 1.0.10 h7f98852_0 conda-forge xorg-libsm 1.2.3 hd9c2040_1000 conda-forge xorg-libx11 1.6.12 h516909a_0 conda-forge xorg-libxt 1.2.1 h7f98852_0 conda-forge xorg-xproto 7.0.31 h27cfd23_1007 xz 5.2.5 h7b6447c_0 yaml 0.2.5 h7b6447c_0 zarr 2.7.1 pypi_0 pypi zeromq 4.3.4 h2531618_0 zipp 3.4.1 pyhd3eb1b0_0 zlib 1.2.11 h7b6447c_3 zstd 1.4.9 haebb681_0 ```

However, when I tried to import pegasus I get the following:

Error: snippet

import pegasus as pg 
LoweringError: Failed in nopython mode pipeline (step: nopython mode backend)
Storing i64 to ptr of i32 ('dim'). FE type int32

File "../../anaconda3/envs/pegasus/lib/python3.8/site-packages/umap/layouts.py", line 52:
def rdist(x, y):
    <source elided>
    result = 0.0
    dim = x.shape[0]
    ^

During: lowering "dim = static_getitem(value=$8load_attr.2, index=0, index_var=$const10.3, fn=<built-in function getitem>)" at /home/bschilder/anaconda3/envs/pegasus/lib/python3.8/site-packages/umap/layouts.py (52)

Error: full

``` AssertionError Traceback (most recent call last) ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/numba/core/errors.py in new_error_context(fmt_, *args, **kwargs) 743 try: --> 744 yield 745 except NumbaError as e: ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/numba/core/lowering.py in lower_block(self, block) 229 loc=self.loc, errcls_=defaulterrcls): --> 230 self.lower_inst(inst) 231 self.post_block(block) ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/numba/core/lowering.py in lower_inst(self, inst) 327 val = self.lower_assign(ty, inst) --> 328 self.storevar(val, inst.target.name) 329 ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/numba/core/lowering.py in storevar(self, value, name) 1277 name=name) -> 1278 raise AssertionError(msg) 1279 AssertionError: Storing i64 to ptr of i32 ('dim'). FE type int32 During handling of the above exception, another exception occurred: LoweringError Traceback (most recent call last) in ----> 1 import pegasus as pg ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/pegasus/__init__.py in 24 from pegasusio import infer_file_type, read_input, write_output, aggregate_matrices 25 from demuxEM import estimate_background_probs, demultiplex, attach_demux_results ---> 26 from .tools import ( 27 qc_metrics, 28 get_filter_stats, ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/pegasus/tools/__init__.py in 36 from .clustering import jump_method, louvain, leiden, spectral_louvain, spectral_leiden, cluster 37 from .net_regressor import net_train_and_predict ---> 38 from .visualization import ( 39 tsne, 40 umap, ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/pegasus/tools/visualization.py in 2 import numpy as np 3 import scipy ----> 4 import umap as umap_module 5 import forceatlas2 as fa2 6 import uuid ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/umap/__init__.py in ----> 1 from .umap_ import UMAP 2 3 # Workaround: https://github.com/numba/numba/issues/3341 4 import numba 5 ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/umap/umap_.py in 52 from umap.spectral import spectral_layout 53 from umap.utils import deheap_sort, submatrix ---> 54 from umap.layouts import ( 55 optimize_layout_euclidean, 56 optimize_layout_generic, ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/umap/layouts.py in 37 }, 38 ) ---> 39 def rdist(x, y): 40 """Reduced Euclidean distance. 41 ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/numba/core/decorators.py in wrapper(func) 219 with typeinfer.register_dispatcher(disp): 220 for sig in sigs: --> 221 disp.compile(sig) 222 disp.disable_compile() 223 return disp ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/numba/core/dispatcher.py in compile(self, sig) 907 with ev.trigger_event("numba:compile", data=ev_details): 908 try: --> 909 cres = self._compiler.compile(args, return_type) 910 except errors.ForceLiteralArg as e: 911 def folded(args, kws): ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/numba/core/dispatcher.py in compile(self, args, return_type) 77 78 def compile(self, args, return_type): ---> 79 status, retval = self._compile_cached(args, return_type) 80 if status: 81 return retval ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/numba/core/dispatcher.py in _compile_cached(self, args, return_type) 91 92 try: ---> 93 retval = self._compile_core(args, return_type) 94 except errors.TypingError as e: 95 self._failed_cache[key] = e ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/numba/core/dispatcher.py in _compile_core(self, args, return_type) 104 105 impl = self._get_implementation(args, {}) --> 106 cres = compiler.compile_extra(self.targetdescr.typing_context, 107 self.targetdescr.target_context, 108 impl, ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/numba/core/compiler.py in compile_extra(typingctx, targetctx, func, args, return_type, flags, locals, library, pipeline_class) 604 pipeline = pipeline_class(typingctx, targetctx, library, 605 args, return_type, flags, locals) --> 606 return pipeline.compile_extra(func) 607 608 ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/numba/core/compiler.py in compile_extra(self, func) 351 self.state.lifted = () 352 self.state.lifted_from = None --> 353 return self._compile_bytecode() 354 355 def compile_ir(self, func_ir, lifted=(), lifted_from=None): ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/numba/core/compiler.py in _compile_bytecode(self) 413 """ 414 assert self.state.func_ir is None --> 415 return self._compile_core() 416 417 def _compile_ir(self): ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/numba/core/compiler.py in _compile_core(self) 393 self.state.status.fail_reason = e 394 if is_final_pipeline: --> 395 raise e 396 else: 397 raise CompilerError("All available pipelines exhausted") ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/numba/core/compiler.py in _compile_core(self) 384 res = None 385 try: --> 386 pm.run(self.state) 387 if self.state.cr is not None: 388 break ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/numba/core/compiler_machinery.py in run(self, state) 337 (self.pipeline_name, pass_desc) 338 patched_exception = self._patch_error(msg, e) --> 339 raise patched_exception 340 341 def dependency_analysis(self): ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/numba/core/compiler_machinery.py in run(self, state) 328 pass_inst = _pass_registry.get(pss).pass_inst 329 if isinstance(pass_inst, CompilerPass): --> 330 self._runPass(idx, pass_inst, state) 331 else: 332 raise BaseException("Legacy pass in use") ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/numba/core/compiler_lock.py in _acquire_compile_lock(*args, **kwargs) 33 def _acquire_compile_lock(*args, **kwargs): 34 with self: ---> 35 return func(*args, **kwargs) 36 return _acquire_compile_lock 37 ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/numba/core/compiler_machinery.py in _runPass(self, index, pss, internal_state) 287 mutated |= check(pss.run_initialization, internal_state) 288 with SimpleTimer() as pass_time: --> 289 mutated |= check(pss.run_pass, internal_state) 290 with SimpleTimer() as finalize_time: 291 mutated |= check(pss.run_finalizer, internal_state) ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/numba/core/compiler_machinery.py in check(func, compiler_state) 260 261 def check(func, compiler_state): --> 262 mangled = func(compiler_state) 263 if mangled not in (True, False): 264 msg = ("CompilerPass implementations should return True/False. " ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/numba/core/typed_passes.py in run_pass(self, state) 461 462 # TODO: Pull this out into the pipeline --> 463 NativeLowering().run_pass(state) 464 lowered = state['cr'] 465 signature = typing.signature(state.return_type, *state.args) ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/numba/core/typed_passes.py in run_pass(self, state) 382 lower = lowering.Lower(targetctx, library, fndesc, interp, 383 metadata=metadata) --> 384 lower.lower() 385 if not flags.no_cpython_wrapper: 386 lower.create_cpython_wrapper(flags.release_gil) ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/numba/core/lowering.py in lower(self) 134 if self.generator_info is None: 135 self.genlower = None --> 136 self.lower_normal_function(self.fndesc) 137 else: 138 self.genlower = self.GeneratorLower(self) ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/numba/core/lowering.py in lower_normal_function(self, fndesc) 188 # Init argument values 189 self.extract_function_arguments() --> 190 entry_block_tail = self.lower_function_body() 191 192 # Close tail of entry block ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/numba/core/lowering.py in lower_function_body(self) 214 bb = self.blkmap[offset] 215 self.builder.position_at_end(bb) --> 216 self.lower_block(block) 217 self.post_lower() 218 return entry_block_tail ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/numba/core/lowering.py in lower_block(self, block) 228 with new_error_context('lowering "{inst}" at {loc}', inst=inst, 229 loc=self.loc, errcls_=defaulterrcls): --> 230 self.lower_inst(inst) 231 self.post_block(block) 232 ~/anaconda3/envs/pegasus/lib/python3.8/contextlib.py in __exit__(self, type, value, traceback) 129 value = type() 130 try: --> 131 self.gen.throw(type, value, traceback) 132 except StopIteration as exc: 133 # Suppress StopIteration *unless* it's the same exception that ~/anaconda3/envs/pegasus/lib/python3.8/site-packages/numba/core/errors.py in new_error_context(fmt_, *args, **kwargs) 749 newerr = errcls(e).add_context(_format_msg(fmt_, args, kwargs)) 750 tb = sys.exc_info()[2] if numba.core.config.FULL_TRACEBACKS else None --> 751 raise newerr.with_traceback(tb) 752 753 LoweringError: Failed in nopython mode pipeline (step: nopython mode backend) Storing i64 to ptr of i32 ('dim'). FE type int32 File "../../anaconda3/envs/pegasus/lib/python3.8/site-packages/umap/layouts.py", line 52: def rdist(x, y): result = 0.0 dim = x.shape[0] ^ During: lowering "dim = static_getitem(value=$8load_attr.2, index=0, index_var=$const10.3, fn=)" at /home/bschilder/anaconda3/envs/pegasus/lib/python3.8/site-packages/umap/layouts.py (52) ```

Many thanks!, Brian

bschilder commented 3 years ago

Also tried a version of this where I installed pegasuspy via conda (instead of pip), but got the same error message as above. pegasus.yml.txt

yihming commented 3 years ago

Hi @bschilder . Thank you for bringing this issue up!

For the compatibility issue with umap v0.5+, we'll adapt Pegasus' API in the next release.

For the conda environment, it's actually more complicated. One of Pegasus' dependencies, hnswlib, has the issue on compilation across platforms of different CPU models. This is why Pegasus conda version is 1.2.0, not the latest stable v1.3.0, because its build failed on conda-forge platform. A systematic way of resolving it in our plan is to update hnswlib by resolving its issue on conda. But it can take time.

yihming commented 3 years ago

Actually, besides the incompatibility with umap v0.5+, you also need to restrict your numba version no later than 0.52.0.

bschilder commented 3 years ago

Ah right, you totally mentioned the numba issue to me earlier and forgot to add it. Here's the corrected yaml. Using this yaml, the conda env seems to be working fine!

pegasus.yml.txt

The only exception so far is when i try to use Harmony:

2021-04-23 20:45:57,439 - pegasus.tools.batch_correction - INFO - Start integration using Harmony.
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-20-a2534b9d859e> in <module>
----> 1 harmony_key = pg.run_harmony(data_harmony)

~/anaconda3/envs/pegasus/lib/python3.8/site-packages/pegasusio/decorators.py in wrapper_timer(*args, **kwargs)
     10                 def wrapper_timer(*args, **kwargs):
     11                         start = time.perf_counter()
---> 12                         result = func(*args, **kwargs)
     13                         end = time.perf_counter()
     14                         message = f"Function '{func.__name__}' finished in {{:.{precision}f}}s.".format(end - start)

~/anaconda3/envs/pegasus/lib/python3.8/site-packages/pegasus/tools/batch_correction.py in run_harmony(data, rep, n_jobs, n_clusters, random_state)
    247     logger.info("Start integration using Harmony.")
    248     out_rep = rep + '_harmony'
--> 249     data.obsm['X_' + out_rep] = harmonize(X_from_rep(data, rep), data.obs, 'Channel', n_clusters = n_clusters, n_jobs_kmeans = n_jobs, random_state = random_state)
    250     return out_rep
    251 

TypeError: harmonize() got an unexpected keyword argument 'n_jobs_kmeans'

This also seems to be a version conflict issue. Do you have a recommended max version of Harmony?

yihming commented 3 years ago

Thank you for working on this issue!

The incompatibility with harmony-pytorch is because we've changed API a little bit in its latest version v0.1.6, so it won't be compatible with pegasus v1.2.0. For now, it would be easier to use an older version of harmony-pytorch, say v0.1.5.

bschilder commented 3 years ago

Great! Thanks, added this dep to the conda yaml as well. Feel free to include this in the GitHub repo if you think people will find it helpful.

pegasus.yml.txt

hoondy commented 3 years ago

Actually, besides the incompatibility with umap v0.5+, you also need to restrict your numba version no later than 0.52.0.

I was having trouble loading pegasuspy with errors related to numba and umap. downgrading numba to 0.52 resolved issue. I think it would be helpful to revise https://github.com/klarman-cell-observatory/pegasus/blob/master/requirements.txt to be explicit.

  - numba<=0.52.0 
yihming commented 3 years ago

Hello @hoondy ,

Which version of Pegasuspy you were running? The current release v1.4.3 is already compatible with umap-learn v0.5+. And numba's version later than 0.52.0 also works well with it in my test.

hoondy commented 3 years ago

Hello @hoondy ,

Which version of Pegasuspy you were running? The current release v1.4.3 is already compatible with umap-learn v0.5+. And numba's version later than 0.52.0 also works well with it in my test.

I was using the latest v1.4.3. It was working when I upgraded from v1.3.0 but I had to wipe and reinstall pegasus v1.4.3 from scratch. On the new installation, I had numba-0.53.1 and the following is the error I saw upon calling import pegasus as pg. Upon downgrading to 0.52.0, it worked again.

I am currently using

numba                     0.52.0           py38h51da96c_0    conda-forge
pegasusio                 0.3.1.post2              pypi_0    pypi
pegasuspy                 1.4.3                    pypi_0    pypi
umap-learn                0.5.1                    pypi_0    pypi
---------------------------------------------------------------------------
AssertionError                            Traceback (most recent call last)
/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/numba/core/errors.py in new_error_context(fmt_, *args, **kwargs)
    743     try:
--> 744         yield
    745     except NumbaError as e:

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/numba/core/lowering.py in lower_block(self, block)
    229                                    loc=self.loc, errcls_=defaulterrcls):
--> 230                 self.lower_inst(inst)
    231         self.post_block(block)

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/numba/core/lowering.py in lower_inst(self, inst)
    327             val = self.lower_assign(ty, inst)
--> 328             self.storevar(val, inst.target.name)
    329 

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/numba/core/lowering.py in storevar(self, value, name)
   1277                                                           name=name)
-> 1278             raise AssertionError(msg)
   1279 

AssertionError: Storing i64 to ptr of i32 ('dim'). FE type int32

During handling of the above exception, another exception occurred:

LoweringError                             Traceback (most recent call last)
/tmp/ipykernel_320047/2641037559.py in <module>
----> 1 import pegasus as pg
      2 import matplotlib.pyplot as plt
      3 import seaborn as sns
      4 import pandas as pd
      5 # import anndata

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/pegasus/__init__.py in <module>
     24 from pegasusio import infer_file_type, read_input, write_output, aggregate_matrices
     25 from demuxEM import estimate_background_probs, demultiplex, attach_demux_results
---> 26 from .tools import (
     27     qc_metrics,
     28     get_filter_stats,

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/pegasus/tools/__init__.py in <module>
     36 from .clustering import jump_method, louvain, leiden, spectral_louvain, spectral_leiden, cluster, split_one_cluster
     37 from .net_regressor import net_train_and_predict
---> 38 from .visualization import (
     39     tsne,
     40     umap,

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/pegasus/tools/visualization.py in <module>
      2 import numpy as np
      3 import scipy
----> 4 import umap as umap_module
      5 import forceatlas2 as fa2
      6 import uuid

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/umap/__init__.py in <module>
----> 1 from .umap_ import UMAP
      2 
      3 # Workaround: https://github.com/numba/numba/issues/3341
      4 import numba
      5 

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/umap/umap_.py in <module>
     52 from umap.spectral import spectral_layout
     53 from umap.utils import deheap_sort, submatrix
---> 54 from umap.layouts import (
     55     optimize_layout_euclidean,
     56     optimize_layout_generic,

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/umap/layouts.py in <module>
     37     },
     38 )
---> 39 def rdist(x, y):
     40     """Reduced Euclidean distance.
     41 

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/numba/core/decorators.py in wrapper(func)
    219             with typeinfer.register_dispatcher(disp):
    220                 for sig in sigs:
--> 221                     disp.compile(sig)
    222                 disp.disable_compile()
    223         return disp

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/numba/core/dispatcher.py in compile(self, sig)
    907                 with ev.trigger_event("numba:compile", data=ev_details):
    908                     try:
--> 909                         cres = self._compiler.compile(args, return_type)
    910                     except errors.ForceLiteralArg as e:
    911                         def folded(args, kws):

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/numba/core/dispatcher.py in compile(self, args, return_type)
     77 
     78     def compile(self, args, return_type):
---> 79         status, retval = self._compile_cached(args, return_type)
     80         if status:
     81             return retval

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/numba/core/dispatcher.py in _compile_cached(self, args, return_type)
     91 
     92         try:
---> 93             retval = self._compile_core(args, return_type)
     94         except errors.TypingError as e:
     95             self._failed_cache[key] = e

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/numba/core/dispatcher.py in _compile_core(self, args, return_type)
    104 
    105         impl = self._get_implementation(args, {})
--> 106         cres = compiler.compile_extra(self.targetdescr.typing_context,
    107                                       self.targetdescr.target_context,
    108                                       impl,

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/numba/core/compiler.py in compile_extra(typingctx, targetctx, func, args, return_type, flags, locals, library, pipeline_class)
    604     pipeline = pipeline_class(typingctx, targetctx, library,
    605                               args, return_type, flags, locals)
--> 606     return pipeline.compile_extra(func)
    607 
    608 

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/numba/core/compiler.py in compile_extra(self, func)
    351         self.state.lifted = ()
    352         self.state.lifted_from = None
--> 353         return self._compile_bytecode()
    354 
    355     def compile_ir(self, func_ir, lifted=(), lifted_from=None):

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/numba/core/compiler.py in _compile_bytecode(self)
    413         """
    414         assert self.state.func_ir is None
--> 415         return self._compile_core()
    416 
    417     def _compile_ir(self):

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/numba/core/compiler.py in _compile_core(self)
    393                 self.state.status.fail_reason = e
    394                 if is_final_pipeline:
--> 395                     raise e
    396         else:
    397             raise CompilerError("All available pipelines exhausted")

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/numba/core/compiler.py in _compile_core(self)
    384             res = None
    385             try:
--> 386                 pm.run(self.state)
    387                 if self.state.cr is not None:
    388                     break

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/numba/core/compiler_machinery.py in run(self, state)
    337                     (self.pipeline_name, pass_desc)
    338                 patched_exception = self._patch_error(msg, e)
--> 339                 raise patched_exception
    340 
    341     def dependency_analysis(self):

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/numba/core/compiler_machinery.py in run(self, state)
    328                 pass_inst = _pass_registry.get(pss).pass_inst
    329                 if isinstance(pass_inst, CompilerPass):
--> 330                     self._runPass(idx, pass_inst, state)
    331                 else:
    332                     raise BaseException("Legacy pass in use")

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/numba/core/compiler_lock.py in _acquire_compile_lock(*args, **kwargs)
     33         def _acquire_compile_lock(*args, **kwargs):
     34             with self:
---> 35                 return func(*args, **kwargs)
     36         return _acquire_compile_lock
     37 

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/numba/core/compiler_machinery.py in _runPass(self, index, pss, internal_state)
    287             mutated |= check(pss.run_initialization, internal_state)
    288         with SimpleTimer() as pass_time:
--> 289             mutated |= check(pss.run_pass, internal_state)
    290         with SimpleTimer() as finalize_time:
    291             mutated |= check(pss.run_finalizer, internal_state)

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/numba/core/compiler_machinery.py in check(func, compiler_state)
    260 
    261         def check(func, compiler_state):
--> 262             mangled = func(compiler_state)
    263             if mangled not in (True, False):
    264                 msg = ("CompilerPass implementations should return True/False. "

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/numba/core/typed_passes.py in run_pass(self, state)
    461 
    462         # TODO: Pull this out into the pipeline
--> 463         NativeLowering().run_pass(state)
    464         lowered = state['cr']
    465         signature = typing.signature(state.return_type, *state.args)

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/numba/core/typed_passes.py in run_pass(self, state)
    382                 lower = lowering.Lower(targetctx, library, fndesc, interp,
    383                                        metadata=metadata)
--> 384                 lower.lower()
    385                 if not flags.no_cpython_wrapper:
    386                     lower.create_cpython_wrapper(flags.release_gil)

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/numba/core/lowering.py in lower(self)
    134         if self.generator_info is None:
    135             self.genlower = None
--> 136             self.lower_normal_function(self.fndesc)
    137         else:
    138             self.genlower = self.GeneratorLower(self)

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/numba/core/lowering.py in lower_normal_function(self, fndesc)
    188         # Init argument values
    189         self.extract_function_arguments()
--> 190         entry_block_tail = self.lower_function_body()
    191 
    192         # Close tail of entry block

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/numba/core/lowering.py in lower_function_body(self)
    214             bb = self.blkmap[offset]
    215             self.builder.position_at_end(bb)
--> 216             self.lower_block(block)
    217         self.post_lower()
    218         return entry_block_tail

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/numba/core/lowering.py in lower_block(self, block)
    228             with new_error_context('lowering "{inst}" at {loc}', inst=inst,
    229                                    loc=self.loc, errcls_=defaulterrcls):
--> 230                 self.lower_inst(inst)
    231         self.post_block(block)
    232 

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/contextlib.py in __exit__(self, type, value, traceback)
    129                 value = type()
    130             try:
--> 131                 self.gen.throw(type, value, traceback)
    132             except StopIteration as exc:
    133                 # Suppress StopIteration *unless* it's the same exception that

/xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/numba/core/errors.py in new_error_context(fmt_, *args, **kwargs)
    749         newerr = errcls(e).add_context(_format_msg(fmt_, args, kwargs))
    750         tb = sys.exc_info()[2] if numba.core.config.FULL_TRACEBACKS else None
--> 751         raise newerr.with_traceback(tb)
    752 
    753 

LoweringError: Failed in nopython mode pipeline (step: nopython mode backend)
Storing i64 to ptr of i32 ('dim'). FE type int32

File "../../../xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/umap/layouts.py", line 52:
def rdist(x, y):
    <source elided>
    result = 0.0
    dim = x.shape[0]
    ^

During: lowering "dim = static_getitem(value=$8load_attr.2, index=0, index_var=$const10.3, fn=<built-in function getitem>)" at /xx/xxx/projects/xxx/xxx/conda/envs/pegasus/lib/python3.8/site-packages/umap/layouts.py (52)
yihming commented 3 years ago

I see that your numba was installed from conda. But after trying to repeat your conda environment, pegasuspy was still able to be imported. My test was on both macOS and Ubuntu 20.04 with miniconda3.

Could you please send me the output of conda list command of your conda environment? Also, which OS are you using?

hoondy commented 3 years ago

Thanks for looking into this. I may have cause a corner case when I was installing other single cell tools. After seeing the error, I manually installed numba using conda install -c anaconda numba=0.52.0. I tested this on CentOS 7, using miniconda3. Here's output of conda list:

(pegasus) [xxx@xxx analysis_pegasus]$ conda list
# packages in environment at /xx/xxx/projects/xxx/xx/conda/envs/pegasus:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       1_gnu    conda-forge
_r-mutex                  1.0.1               anacondar_1    conda-forge
anndata                   0.7.6            py38h578d9bd_0    conda-forge
appdirs                   1.4.4                    pypi_0    pypi
arpack                    3.7.0                hdefa2d7_2    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
backports.zoneinfo        0.2.1            py38h497a2fe_4    conda-forge
beautifulsoup4            4.9.3                    pypi_0    pypi
binutils_impl_linux-64    2.36.1               h193b22a_2    conda-forge
binutils_linux-64         2.36                 hf3e587d_0    conda-forge
bioservices               1.7.11                   pypi_0    pypi
biothings-client          0.2.6                    pypi_0    pypi
blosc                     1.21.0               h9c3ff4c_0    conda-forge
bwidget                   1.9.14               ha770c72_0    conda-forge
bzip2                     1.0.8                h7f98852_4    conda-forge
c-ares                    1.17.2               h7f98852_0    conda-forge
ca-certificates           2020.10.14                    0    anaconda
cached-property           1.5.2                hd8ed1ab_1    conda-forge
cached_property           1.5.2              pyha770c72_1    conda-forge
cairo                     1.16.0            h9f066cc_1006    conda-forge
certifi                   2020.6.20                py38_0    anaconda
cffi                      1.14.4           py38ha312104_0    conda-forge
chardet                   4.0.0                    pypi_0    pypi
click                     8.0.1                    pypi_0    pypi
colorama                  0.4.4                    pypi_0    pypi
colorlog                  5.0.1                    pypi_0    pypi
curl                      7.78.0               hea6ffbf_0    conda-forge
cycler                    0.10.0                     py_2    conda-forge
cython                    0.29.23                  pypi_0    pypi
debugpy                   1.4.1            py38h709712a_0    conda-forge
decorator                 4.4.2                      py_0    anaconda
dunamai                   1.5.5                    pypi_0    pypi
easydev                   0.11.1                   pypi_0    pypi
entrypoints               0.3             pyhd8ed1ab_1003    conda-forge
fontconfig                2.13.1            hba837de_1005    conda-forge
freetype                  2.10.4               h0708190_1    conda-forge
fribidi                   1.0.10               h36c2ea0_0    conda-forge
gcc_impl_linux-64         9.4.0                h03d3576_8    conda-forge
gcc_linux-64              9.4.0                h391b98a_0    conda-forge
get-version               3.2                      pypi_0    pypi
gettext                   0.19.8.1          hf34092f_1004    conda-forge
gevent                    21.1.2                   pypi_0    pypi
gfortran_impl_linux-64    9.4.0                h0003116_8    conda-forge
gfortran_linux-64         9.4.0                hf0ab688_0    conda-forge
glpk                      4.65              h9202a9a_1004    conda-forge
gmp                       6.2.1                h58526e2_0    conda-forge
graphite2                 1.3.13            h58526e2_1001    conda-forge
greenlet                  1.1.0                    pypi_0    pypi
grequests                 0.6.0                    pypi_0    pypi
gseapy                    0.10.4                   pypi_0    pypi
gsl                       2.6                  he838d99_2    conda-forge
gxx_impl_linux-64         9.4.0                h03d3576_8    conda-forge
gxx_linux-64              9.4.0                h0316aca_0    conda-forge
h5py                      3.4.0           nompi_py38hfbb2109_100    conda-forge
harfbuzz                  2.7.2                ha5b49bf_1    conda-forge
hdf5                      1.12.1          nompi_h2750804_100    conda-forge
icu                       67.1                 he1b5a44_0    conda-forge
idna                      2.10                     pypi_0    pypi
igraph                    0.9.2                ha184e22_0    conda-forge
ipykernel                 6.3.1            py38he5a9106_0    conda-forge
ipython                   7.27.0           py38he5a9106_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
itsdangerous              2.0.1                    pypi_0    pypi
jbig                      2.1               h7f98852_2003    conda-forge
jedi                      0.18.0           py38h578d9bd_2    conda-forge
jinja2                    3.0.1              pyhd8ed1ab_0    conda-forge
joblib                    1.0.1              pyhd8ed1ab_0    conda-forge
jpeg                      9d                   h36c2ea0_0    conda-forge
jupyter_client            7.0.2              pyhd8ed1ab_0    conda-forge
jupyter_core              4.7.1            py38h578d9bd_0    conda-forge
kernel-headers_linux-64   2.6.32              he073ed8_14    conda-forge
kiwisolver                1.3.1                    pypi_0    pypi
krb5                      1.19.2               hcc1bbae_0    conda-forge
lcms2                     2.12                 hddcbb42_0    conda-forge
ld_impl_linux-64          2.36.1               hea4e1c9_2    conda-forge
legacy-api-wrap           1.2                      pypi_0    pypi
leidenalg                 0.8.4                    pypi_0    pypi
lerc                      2.2.1                h9c3ff4c_0    conda-forge
libblas                   3.9.0           11_linux64_openblas    conda-forge
libcblas                  3.9.0           11_linux64_openblas    conda-forge
libcurl                   7.78.0               h2574ce0_0    conda-forge
libdeflate                1.7                  h7f98852_5    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libev                     4.33                 h516909a_1    conda-forge
libffi                    3.2.1             he1b5a44_1007    conda-forge
libgcc                    7.2.0                h69d50b8_2    conda-forge
libgcc-devel_linux-64     9.4.0                hd854feb_8    conda-forge
libgcc-ng                 11.1.0               hc902ee8_8    conda-forge
libgfortran-ng            11.1.0               h69a702a_8    conda-forge
libgfortran5              11.1.0               h6c583b3_8    conda-forge
libglib                   2.66.3               hbe7bbb4_0    conda-forge
libgomp                   11.1.0               hc902ee8_8    conda-forge
libiconv                  1.16                 h516909a_0    conda-forge
liblapack                 3.9.0           11_linux64_openblas    conda-forge
libllvm10                 10.0.1               he513fc3_3    conda-forge
libnghttp2                1.43.0               h812cca2_0    conda-forge
libopenblas               0.3.17          pthreads_h8fe5266_1    conda-forge
libpng                    1.6.37               h21135ba_2    conda-forge
libsanitizer              9.4.0                h79bfe98_8    conda-forge
libsodium                 1.0.18               h36c2ea0_1    conda-forge
libssh2                   1.10.0               ha56f1ee_0    conda-forge
libstdcxx-devel_linux-64  9.4.0                hd854feb_8    conda-forge
libstdcxx-ng              11.1.0               h56837e0_8    conda-forge
libtiff                   4.3.0                hf544144_1    conda-forge
libuuid                   2.32.1            h7f98852_1000    conda-forge
libwebp-base              1.2.1                h7f98852_0    conda-forge
libxcb                    1.13              h7f98852_1003    conda-forge
libxml2                   2.9.10               h68273f3_2    conda-forge
llvmlite                  0.35.0                   pypi_0    pypi
lxml                      4.6.3                    pypi_0    pypi
lz4-c                     1.9.3                h9c3ff4c_1    conda-forge
lzo                       2.10              h516909a_1000    conda-forge
make                      4.3                  hd18ef5c_1    conda-forge
markupsafe                2.0.1            py38h497a2fe_0    conda-forge
matplotlib                3.4.2                    pypi_0    pypi
matplotlib-base           3.4.3            py38hf4fb855_0    conda-forge
matplotlib-inline         0.1.2              pyhd8ed1ab_2    conda-forge
metis                     5.1.0             h58526e2_1006    conda-forge
mock                      4.0.3            py38h578d9bd_1    conda-forge
mpfr                      4.1.0                h9202a9a_1    conda-forge
mygene                    3.2.2                    pypi_0    pypi
natsort                   7.1.1              pyhd8ed1ab_0    conda-forge
ncurses                   6.2                  h58526e2_4    conda-forge
nest-asyncio              1.5.1              pyhd8ed1ab_0    conda-forge
networkx                  2.5.1                    pypi_0    pypi
nmf-torch                 0.1.1                    pypi_0    pypi
numba                     0.52.0           py38h51da96c_0    conda-forge
numexpr                   2.7.3            py38h51da96c_0    conda-forge
numpy                     1.20.3                   pypi_0    pypi
olefile                   0.46               pyh9f0ad1d_1    conda-forge
openjpeg                  2.4.0                hb52868f_1    conda-forge
openssl                   1.1.1l               h7f98852_0    conda-forge
packaging                 20.9                     pypi_0    pypi
pandas                    1.3.2            py38h43a58ef_0    conda-forge
pango                     1.42.4               h69149e4_5    conda-forge
parso                     0.8.2              pyhd8ed1ab_0    conda-forge
patsy                     0.5.1                      py_0    conda-forge
pcre                      8.45                 h9c3ff4c_0    conda-forge
pcre2                     10.36                h032f7d1_1    conda-forge
pegasusio                 0.3.1.post2              pypi_0    pypi
pegasuspy                 1.4.3                    pypi_0    pypi
pexpect                   4.8.0              pyh9f0ad1d_2    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    8.2.0                    pypi_0    pypi
pip                       21.2.4             pyhd8ed1ab_0    conda-forge
pixman                    0.40.0               h36c2ea0_0    conda-forge
prompt-toolkit            3.0.20             pyha770c72_0    conda-forge
psutil                    5.8.0                    pypi_0    pypi
pthread-stubs             0.4               h36c2ea0_1001    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
pycparser                 2.20               pyh9f0ad1d_2    conda-forge
pygments                  2.10.0             pyhd8ed1ab_0    conda-forge
pynndescent               0.5.2                    pypi_0    pypi
pyparsing                 2.4.7              pyh9f0ad1d_0    conda-forge
pytables                  3.6.1            py38hdb04529_4    conda-forge
python                    3.8.0                h357f687_5    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-igraph             0.9.1            py38h2af5540_0    conda-forge
python_abi                3.8                      2_cp38    conda-forge
pytz                      2021.1             pyhd8ed1ab_0    conda-forge
pyzmq                     22.2.1           py38h2035c66_0    conda-forge
r-base                    3.2.2                         0
readline                  8.1                  h46c0cb4_0    conda-forge
requests                  2.25.1                   pypi_0    pypi
requests-cache            0.6.4                    pypi_0    pypi
scanorama                 1.7.1                    pypi_0    pypi
scanpy                    1.8.1                    pypi_0    pypi
scikit-learn              0.24.2           py38h1561384_1    conda-forge
scipy                     1.7.1            py38h56a6a73_0    conda-forge
seaborn                   0.11.1                   pypi_0    pypi
seaborn-base              0.11.2             pyhd8ed1ab_0    conda-forge
sed                       4.8                  he412f7d_0    conda-forge
setuptools                57.4.0           py38h578d9bd_0    conda-forge
simplegeneric             0.8.1                      py_1    conda-forge
sinfo                     0.3.4                    pypi_0    pypi
six                       1.16.0             pyh6c4a22f_0    conda-forge
sortedcontainers          2.4.0                    pypi_0    pypi
soupsieve                 2.2.1                    pypi_0    pypi
sqlite                    3.36.0               h9cd32fc_0    conda-forge
statsmodels               0.12.2           py38h5c078b8_0    conda-forge
stdlib-list               0.8.0                    pypi_0    pypi
suds-jurko                0.6                      pypi_0    pypi
suitesparse               5.10.1               hd8046ac_0    conda-forge
sysroot_linux-64          2.12                he073ed8_14    conda-forge
tbb                       2020.2               h4bd325d_4    conda-forge
texttable                 1.6.4              pyhd8ed1ab_0    conda-forge
threadpoolctl             2.1.0                    pypi_0    pypi
tk                        8.6.11               h21135ba_0    conda-forge
tktable                   2.10                 hb7b940f_3    conda-forge
tornado                   6.1              py38h497a2fe_1    conda-forge
tqdm                      4.61.1                   pypi_0    pypi
traitlets                 5.1.0              pyhd8ed1ab_0    conda-forge
typing-extensions         3.10.0.0                 pypi_0    pypi
tzdata                    2021a                he74cb21_1    conda-forge
tzlocal                   3.0              py38h578d9bd_2    conda-forge
umap-learn                0.5.1                    pypi_0    pypi
url-normalize             1.4.3                    pypi_0    pypi
urllib3                   1.26.5                   pypi_0    pypi
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
wheel                     0.37.0             pyhd8ed1ab_1    conda-forge
wordcloud                 1.8.1                    pypi_0    pypi
xlrd                      1.2.0                    pypi_0    pypi
xlsxwriter                1.4.3                    pypi_0    pypi
xmltodict                 0.12.0                   pypi_0    pypi
xorg-kbproto              1.0.7             h7f98852_1002    conda-forge
xorg-libice               1.0.10               h7f98852_0    conda-forge
xorg-libsm                1.2.3             hd9c2040_1000    conda-forge
xorg-libx11               1.7.2                h7f98852_0    conda-forge
xorg-libxau               1.0.9                h7f98852_0    conda-forge
xorg-libxdmcp             1.1.3                h7f98852_0    conda-forge
xorg-libxext              1.3.4                h7f98852_1    conda-forge
xorg-libxrender           0.9.10            h7f98852_1003    conda-forge
xorg-libxt                1.2.1                h7f98852_2    conda-forge
xorg-renderproto          0.11.1            h7f98852_1002    conda-forge
xorg-xextproto            7.3.0             h7f98852_1002    conda-forge
xorg-xproto               7.0.31            h7f98852_1007    conda-forge
xz                        5.2.5                h516909a_1    conda-forge
zeromq                    4.3.4                h9c3ff4c_1    conda-forge
zlib                      1.2.11            h516909a_1010    conda-forge
zope-event                4.5.0                    pypi_0    pypi
zope-interface            5.4.0                    pypi_0    pypi
zstd                      1.5.0                ha95c52a_0    conda-forge
yihming commented 3 years ago

My apology. Could you send the result of

conda list --export > package-list.txt

command instead, so that I can directly create a conda environment from the generated package-list.txt file?

Besides, could you also send me the command you update numba to v0.53.1 within this environment? In specific, did you update it using pip or conda?

I have a guess that your issue was probably due to the mixture of conda and pip installations. But I'll need further test, especially within your environment.

hoondy commented 3 years ago

No problem. I installed numba v0.53.1 using conda install numba. Then, downgraded it using conda install numba=0.52.0 Simply put, I installed all packages using conda whenever it was available. Rest of github repo and dev software, I used pip install git+https://github.com/xyz/xyz.git@v1.2.3

Just to be clear, my installation issue is resolved. However, I am happy to help so you can debug what was causing this error.

package-list.txt

yihming commented 3 years ago

Well, I still could not reproduce your issue. However, based on my reading on your conda environment, there are some required dependencies of Pegasus missing. Moreover, your import error message is quite similar to the case when using Pegasuspy v1.3.0 with numba v0.53.0+. So I suspect this might be because your upgrade on Pegasuspy was not complete.

Bellow are my suggestions:

  1. In your pegasus environment, run
    pip install -U pegasuspy

    to install the missing dependencies. Then upgrade your numba and see if Pegasus could still be loaded.

  2. Alternatively, create a new environment (with a different name from pegasus), and in that environment, repeat Step 3 onward in installation to install the current release of Pegasus.
hoondy commented 3 years ago

Many thanks for your help!

yihming commented 3 years ago

@hoondy ,

I'll go ahead to close this issue, as well as your pull request, if there is no more question. Please feel free to reopen it, or maybe more appropriately create a new issue, if you encounter new problems.

Sincerely, Yiming