pySCENIC
pySCENIC copied to clipboard
[BUG] Error when trying to use custom thresholds in the binarize function
Describe the bug This may be a bug or a user-error, but I am unable to use custom thresholds in the binarize function
Steps to reproduce the behavior
- Command run when the error occurred:
custom_auc_thresholds = pd.read_csv(args.custom_auc_thresholds, names = ['regulon', 'threshold'])
custom_auc_thresholds = dict(zip(custom_auc_thresholds.regulon, custom_auc_thresholds.threshold))
binary_mtx, auc_thresholds = binarize(auc_mtx.T, threshold_overides = custom_auc_thresholds, num_workers = args.binarize_threads)
args.custom_auc_thresholds is a csv file with regulon as the first column and threshold as the second (same as the output thresholds file from binarize
custom_auc_thresholds is a dictionary with the regulon names as the keys and the thresholds as the values
- Error encountered:
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: Couldn't close file
Expected behavior Use the supplied thresholds for binarization
Please complete the following information:
- pySCENIC version: 0.10.2
- Installation method: Pip
- Run environment: Spyder
- OS: [e.g. Ubuntu]
- Package versions: [obtain using
pip freeze
,conda list
, or skip this if using Docker/Singularity]:
# Name Version Build Channel
_libgcc_mutex 0.1 main
alabaster 0.7.12 py_0 conda-forge
anndata 0.7.3 py37hc8dfbb8_0 conda-forge
applaunchservices 0.2.1 py_0 conda-forge
appnope 0.1.0 py37hc8dfbb8_1001 conda-forge
arboreto 0.1.5 pypi_0 pypi
argh 0.26.2 py37_1001 conda-forge
astroid 2.4.2 py37hc8dfbb8_0 conda-forge
atomicwrites 1.4.0 pyh9f0ad1d_0 conda-forge
attrs 19.3.0 py_0 conda-forge
autopep8 1.4.4 py_0
babel 2.8.0 py_0 conda-forge
backcall 0.1.0 py_0 conda-forge
bcrypt 3.1.7 py37h9bfed18_1 conda-forge
bleach 3.1.5 pyh9f0ad1d_0 conda-forge
blosc 1.19.0 h4a8c4bd_0 conda-forge
bokeh 2.0.1 py37hc8dfbb8_0 conda-forge
boltons 20.1.0 pypi_0 pypi
boto3 1.9.66 py37_0
botocore 1.12.189 py_0
brotlipy 0.7.0 py37h9bfed18_1000 conda-forge
bzip2 1.0.8 h0b31af3_2 conda-forge
ca-certificates 2020.6.20 hecda079_0 conda-forge
cachetools 4.1.0 py_1 conda-forge
certifi 2020.6.20 py37hc8dfbb8_0 conda-forge
cffi 1.14.0 py37h356ff06_0 conda-forge
cgatcore 0.6.5 py_1 bioconda
chardet 3.0.4 py37hc8dfbb8_1006 conda-forge
click 7.1.2 pyh9f0ad1d_0 conda-forge
cloudpickle 1.4.1 py_0 conda-forge
coreutils 8.31 h0b31af3_0 conda-forge
cryptography 2.9.2 py37he655712_0 conda-forge
cycler 0.10.0 py_2 conda-forge
cytoolz 0.10.1 py37h0b31af3_0 conda-forge
dask 1.0.0 py_1 conda-forge
dask-core 1.0.0 py_0 conda-forge
dbus 1.13.6 h2f22bb5_0 conda-forge
decorator 4.4.2 py_0 conda-forge
defusedxml 0.6.0 py_0 conda-forge
diff-match-patch 20181111 py_0 conda-forge
dill 0.3.1.1 pypi_0 pypi
distributed 1.28.1 py37_0 conda-forge
docutils 0.16 py37hc8dfbb8_1 conda-forge
drmaa 0.7.9 py_1000 conda-forge
entrypoints 0.3 py37hc8dfbb8_1001 conda-forge
expat 2.2.9 h4a8c4bd_2 conda-forge
fastcluster 1.1.26 py37h94625e5_1 conda-forge
flake8 3.7.9 py37hc8dfbb8_1 conda-forge
freetype 2.10.2 h8da9a1a_0 conda-forge
frozendict 1.2 pypi_0 pypi
ftputil 4.0.0 py_0 conda-forge
future 0.18.2 py37hc8dfbb8_1 conda-forge
get_version 2.1 py_1 conda-forge
gettext 0.19.8.1 h46ab8bc_1002 conda-forge
gevent 20.6.1 py37h9bfed18_0 conda-forge
glib 2.64.3 h577aef8_0 conda-forge
google-api-core 1.20.0 pypi_0 pypi
google-auth 1.16.1 pypi_0 pypi
google-cloud-core 1.3.0 py_0 conda-forge
google-cloud-sdk 297.0.1 py37hc8dfbb8_0 conda-forge
google-cloud-storage 1.28.1 pyh9f0ad1d_0 conda-forge
google-resumable-media 0.5.1 pyh9f0ad1d_0 conda-forge
googleapis-common-protos 1.52.0 pypi_0 pypi
greenlet 0.4.16 py37h9bfed18_0 conda-forge
h5py 2.10.0 nompi_py37h106b333_102 conda-forge
hdf5 1.10.5 nompi_h3e39495_1104 conda-forge
heapdict 1.0.1 py_0 conda-forge
icu 64.2 h6de7cb9_1 conda-forge
idna 2.9 py_1 conda-forge
imagesize 1.2.0 py_0 conda-forge
importlib-metadata 1.6.1 py37hc8dfbb8_0 conda-forge
importlib_metadata 1.6.1 0 conda-forge
interlap 0.2.6 pypi_0 pypi
intervaltree 3.0.2 py_0 conda-forge
ipykernel 5.3.0 py37h43977f1_0 conda-forge
ipython 7.15.0 py37hc8dfbb8_0 conda-forge
ipython_genutils 0.2.0 py_1 conda-forge
isort 4.3.21 py37hc8dfbb8_1 conda-forge
jedi 0.15.2 py37_0 conda-forge
jinja2 2.11.2 pyh9f0ad1d_0 conda-forge
jmespath 0.10.0 pyh9f0ad1d_0 conda-forge
joblib 0.15.1 py_0 conda-forge
jpeg 9d h0b31af3_0 conda-forge
jsonschema 3.2.0 py37hc8dfbb8_1 conda-forge
jupyter_client 6.1.3 py_0 conda-forge
jupyter_core 4.6.3 py37hc8dfbb8_1 conda-forge
keyring 21.2.1 py37hc8dfbb8_0 conda-forge
kiwisolver 1.2.0 py37ha1cc60f_0 conda-forge
krb5 1.17.1 h1752a42_0 conda-forge
lazy-object-proxy 1.4.3 py37h9bfed18_2 conda-forge
legacy-api-wrap 1.2 py_0 conda-forge
libblas 3.8.0 16_openblas conda-forge
libcblas 3.8.0 16_openblas conda-forge
libclang 9.0.1 default_hf57f61e_0 conda-forge
libcxx 10.0.0 h1af66ff_2 conda-forge
libedit 3.1.20191231 hed1e85f_0 conda-forge
libffi 3.2.1 1 bioconda
libgfortran 4.0.0 2 conda-forge
libiconv 1.15 h0b31af3_1006 conda-forge
liblapack 3.8.0 16_openblas conda-forge
libllvm8 8.0.1 h770b8ee_0 conda-forge
libllvm9 9.0.1 h7475705_1 conda-forge
libopenblas 0.3.9 h3d69b6c_0 conda-forge
libpng 1.6.37 hbbe82c9_1 conda-forge
libpq 12.2 h489d428_1 conda-forge
libprotobuf 3.12.3 hd174df1_0 conda-forge
libsodium 1.0.17 h01d97ff_0 conda-forge
libspatialindex 1.9.3 h4a8c4bd_3 conda-forge
libtiff 4.1.0 h2ae36a8_6 conda-forge
libwebp-base 1.1.0 h0b31af3_3 conda-forge
llvm-openmp 10.0.0 h28b9765_0 conda-forge
llvmlite 0.33.0 pypi_0 pypi
locket 0.2.0 py_2 conda-forge
loompy 3.0.6 pypi_0 pypi
lz4-c 1.9.2 h4a8c4bd_1 conda-forge
markupsafe 1.1.1 py37h9bfed18_1 conda-forge
matplotlib-base 3.2.1 py37hddda452_0 conda-forge
mccabe 0.6.1 py_1 conda-forge
mistune 0.8.4 py37h9bfed18_1001 conda-forge
mock 4.0.2 py37hc8dfbb8_0 conda-forge
msgpack-python 0.6.2 py37ha1b3eb9_0 conda-forge
multiprocessing-on-dill 3.5.0a4 pypi_0 pypi
natsort 7.0.1 py_0 conda-forge
nbconvert 5.6.1 py37hc8dfbb8_1 conda-forge
nbformat 5.0.6 py_0 conda-forge
ncurses 6.1 h0a44026_1002 conda-forge
networkx 2.4 py_1 conda-forge
nomkl 1.0 h5ca1d4c_0 conda-forge
nspr 4.20 h0a44026_1000 conda-forge
nss 3.47 hc0980d9_0 conda-forge
numba 0.50.0 pypi_0 pypi
numexpr 2.7.1 py37h94625e5_1 conda-forge
numpy 1.18.4 py37h7687784_0 conda-forge
numpy-groupies 0+unknown pypi_0 pypi
numpydoc 1.0.0 pyh9f0ad1d_0 conda-forge
olefile 0.46 py_0 conda-forge
openssl 1.1.1g h0b31af3_0 conda-forge
packaging 20.4 pyh9f0ad1d_0 conda-forge
pandas 0.25.3 py37h4f17bb1_0 conda-forge
pandoc 2.9.2.1 0 conda-forge
pandocfilters 1.4.2 py_1 conda-forge
paramiko 2.7.1 py37_0 conda-forge
parso 0.5.2 py_0
partd 1.1.0 py_0 conda-forge
pathtools 0.1.2 py_1 conda-forge
patsy 0.5.1 py_0 conda-forge
pcre 8.44 h4a8c4bd_0 conda-forge
pexpect 4.8.0 py37hc8dfbb8_1 conda-forge
pickleshare 0.7.5 py37hc8dfbb8_1001 conda-forge
pillow 7.1.2 py37hfd78ece_0 conda-forge
pip 20.1.1 py_1 conda-forge
pluggy 0.13.1 py37hc8dfbb8_1 conda-forge
prompt-toolkit 3.0.5 py_0 conda-forge
protobuf 3.12.2 pypi_0 pypi
psutil 5.7.0 py37h9bfed18_1 conda-forge
ptyprocess 0.6.0 py_1001 conda-forge
pyarrow 0.16.0 pypi_0 pypi
pyasn1 0.4.8 py_0 conda-forge
pyasn1-modules 0.2.8 pypi_0 pypi
pycodestyle 2.5.0 py37_0
pycparser 2.20 py_0 conda-forge
pydocstyle 5.0.2 py_0 conda-forge
pyflakes 2.1.1 py37_0
pygments 2.6.1 py_0 conda-forge
pylint 2.5.2 py37hc8dfbb8_0 conda-forge
pynacl 1.3.0 py37h0b31af3_1001 conda-forge
pyopenssl 19.1.0 py_1 conda-forge
pyparsing 2.4.7 pyh9f0ad1d_0 conda-forge
pyqt 5.12.3 py37ha62fc16_3 conda-forge
pyqt5-sip 4.19.18 pypi_0 pypi
pyqtchart 5.12 pypi_0 pypi
pyqtwebengine 5.12.1 pypi_0 pypi
pyrsistent 0.16.0 py37h9bfed18_0 conda-forge
pyscenic 0.10.2 pypi_0 pypi
pysftp 0.2.9 py_1 conda-forge
pysocks 1.7.1 py37hc8dfbb8_1 conda-forge
pytables 3.6.1 py37h6f8395a_1 conda-forge
python 3.7.6 cpython_h1fd5dd1_6 conda-forge
python-dateutil 2.8.1 py_0 conda-forge
python-jsonrpc-server 0.3.4 pyh9f0ad1d_1 conda-forge
python-language-server 0.31.10 py37hc8dfbb8_0 conda-forge
python.app 1.3 py37h9bfed18_1 conda-forge
python_abi 3.7 1_cp37m conda-forge
pytz 2020.1 pyh9f0ad1d_0 conda-forge
pyyaml 5.3.1 py37h9bfed18_0 conda-forge
pyzmq 19.0.1 py37haec44b1_0 conda-forge
qdarkstyle 2.8.1 pyh9f0ad1d_0 conda-forge
qt 5.12.5 h514805e_3 conda-forge
qtawesome 0.7.2 pyh9f0ad1d_0 conda-forge
qtconsole 4.7.4 pyh9f0ad1d_0 conda-forge
qtpy 1.9.0 py_0 conda-forge
readline 8.0 hcfe32e1_0 conda-forge
requests 2.23.0 pyh8c360ce_2 conda-forge
rope 0.17.0 pyh9f0ad1d_0 conda-forge
rsa 4.6 pyh9f0ad1d_0 conda-forge
rtree 0.9.4 py37h8526d28_1 conda-forge
ruffus 2.8.4 py_0 bioconda
s3transfer 0.1.13 py37_1001 conda-forge
scanpy 1.5.1 py_0 bioconda
scikit-learn 0.23.1 py37hf5857e7_0 conda-forge
scipy 1.4.1 py37hce1b9e5_3 conda-forge
seaborn 0.10.1 1 conda-forge
seaborn-base 0.10.1 py_1 conda-forge
setuptools 47.1.1 py37hc8dfbb8_0 conda-forge
setuptools-scm 4.1.2 pyh9f0ad1d_0 conda-forge
setuptools_scm 4.1.2 0 conda-forge
six 1.15.0 pyh9f0ad1d_0 conda-forge
snowballstemmer 2.0.0 py_0 conda-forge
sortedcontainers 2.1.0 py_0 conda-forge
sphinx 3.1.1 py_0 conda-forge
sphinxcontrib-applehelp 1.0.2 py_0 conda-forge
sphinxcontrib-devhelp 1.0.2 py_0 conda-forge
sphinxcontrib-htmlhelp 1.0.3 py_0 conda-forge
sphinxcontrib-jsmath 1.0.1 py_0 conda-forge
sphinxcontrib-qthelp 1.0.3 py_0 conda-forge
sphinxcontrib-serializinghtml 1.1.4 py_0 conda-forge
spyder 4.1.3 py37hc8dfbb8_0 conda-forge
spyder-kernels 1.9.1 py37hc8dfbb8_0 conda-forge
sqlalchemy 1.3.17 py37h9bfed18_0 conda-forge
sqlite 3.30.1 h93121df_0 conda-forge
statsmodels 0.11.1 py37h9bfed18_2 conda-forge
tbb 2019.0 pypi_0 pypi
tblib 1.6.0 py_0 conda-forge
testpath 0.4.4 py_0 conda-forge
threadpoolctl 2.1.0 pyh5ca1d4c_0 conda-forge
time 1.8 h01d97ff_0 conda-forge
tk 8.6.10 hbbe82c9_0 conda-forge
toml 0.10.1 pyh9f0ad1d_0 conda-forge
toolz 0.10.0 py_0 conda-forge
tornado 6.0.4 py37h9bfed18_1 conda-forge
tqdm 4.46.1 pyh9f0ad1d_0 conda-forge
traitlets 4.3.3 py37hc8dfbb8_1 conda-forge
typed-ast 1.4.1 py37h0b31af3_0 conda-forge
typing_extensions 3.7.4.2 py_0 conda-forge
ujson 1.35 py37h570ac47_1002 conda-forge
umap-learn 0.4.4 py37hc8dfbb8_0 conda-forge
urllib3 1.25.9 py_0 conda-forge
watchdog 0.10.2 py37h0b31af3_0 conda-forge
wcwidth 0.2.4 pyh9f0ad1d_0 conda-forge
webencodings 0.5.1 py_1 conda-forge
wheel 0.34.2 py_1 conda-forge
wrapt 1.11.2 py37h9bfed18_0 conda-forge
wurlitzer 2.0.0 py37hc8dfbb8_1 conda-forge
xz 5.2.5 h0b31af3_0 conda-forge
yaml 0.2.5 h0b31af3_0 conda-forge
yapf 0.29.0 py_0 conda-forge
zeromq 4.3.2 h6de7cb9_2 conda-forge
zict 2.0.0 py_0 conda-forge
zipp 3.1.0 py_0 conda-forge
zlib 1.2.11 h0b31af3_1006 conda-forge
zope.event 4.4 pyh9f0ad1d_0 conda-forge
zope.interface 5.1.0 py37h9bfed18_0 conda-forge
zstd 1.4.4 h4b3e974_3 conda-forge