aertslab / pycisTopic

pycisTopic is a Python module to simultaneously identify cell states and cis-regulatory topics from single cell epigenomics data.
Other
55 stars 10 forks source link

Bug report [BUG] list index out of error when running get_consensus_peaks #73

Open midichlorianrich opened 1 year ago

midichlorianrich commented 1 year ago

Describe the bug list index out of error when running get_consensus_peaks

To Reproduce

from pycisTopic.iterative_peak_calling import *
# Other param
peak_half_width=250
path_to_blacklist='/Users/M258140/scenicplus/notebooks/Kylie_tutorial/data/mm10-blacklist.v2.bed'
# Get consensus peaks
consensus_peaks=get_consensus_peaks(narrow_peaks_dict, peak_half_width, chromsizes=chromsizes, path_to_blacklist=path_to_blacklist)

Error output

2023-04-06 10:40:11,398 cisTopic     INFO     Extending and merging peaks per class
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
Cell In[160], line 6
      4 path_to_blacklist='/Users/M258140/scenicplus/notebooks/Kylie_tutorial/data/mm10-blacklist.v2.bed'
      5 # Get consensus peaks
----> 6 consensus_peaks=get_consensus_peaks(narrow_peaks_dict, peak_half_width, chromsizes=chromsizes, path_to_blacklist=path_to_blacklist)

File ~/opt/anaconda3/envs/py39/lib/python3.9/site-packages/pycisTopic/iterative_peak_calling.py:65, in get_consensus_peaks(narrow_peaks_dict, peak_half_width, chromsizes, path_to_blacklist)
     62     chromsizes = pr.PyRanges(chromsizes)
     64 log.info("Extending and merging peaks per class")
---> 65 center_extended_peaks = [
     66     iterative_peak_filtering(
     67         calculate_peaks_and_extend(
     68             narrow_peaks_dict[x], peak_half_width, chromsizes, path_to_blacklist
     69         )
     70     ).df
     71     for x in list(narrow_peaks_dict.keys())
     72 ]
     73 log.info("Normalizing peak scores")
     74 center_extended_peaks_norm = [cpm(x, "Score") for x in center_extended_peaks]

File ~/opt/anaconda3/envs/py39/lib/python3.9/site-packages/pycisTopic/iterative_peak_calling.py:67, in <listcomp>(.0)
     62     chromsizes = pr.PyRanges(chromsizes)
     64 log.info("Extending and merging peaks per class")
     65 center_extended_peaks = [
     66     iterative_peak_filtering(
---> 67         calculate_peaks_and_extend(
     68             narrow_peaks_dict[x], peak_half_width, chromsizes, path_to_blacklist
     69         )
     70     ).df
     71     for x in list(narrow_peaks_dict.keys())
     72 ]
     73 log.info("Normalizing peak scores")
     74 center_extended_peaks_norm = [cpm(x, "Score") for x in center_extended_peaks]

File ~/opt/anaconda3/envs/py39/lib/python3.9/site-packages/pycisTopic/iterative_peak_calling.py:142, in calculate_peaks_and_extend(narrow_peaks, peak_half_width, chromsizes, path_to_blacklist)
    138     center_extended_peaks = center_extended_peaks.intersect(
    139         chromsizes, how="containment"
    140     )
    141 if isinstance(path_to_blacklist, str):
--> 142     blacklist = pr.read_bed(path_to_blacklist)
    143     center_extended_peaks = center_extended_peaks.overlap(blacklist, invert=True)
    144 return center_extended_peaks

File ~/opt/anaconda3/envs/py39/lib/python3.9/site-packages/pyranges/readers.py:80, in read_bed(f, as_df, nrows)
     78     first_start = gzip.open(f).readline().split()[1]
     79 else:
---> 80     first_start = open(f).readline().split()[1]
     82 header = None
     84 try:

IndexError: list index out of range
**Version (please complete the following information):**
 r-mutex                  1.0.1               anacondar_1    conda-forge
accessible-pygments       0.0.4                    pypi_0    pypi
adjusttext                0.7.3                    pypi_0    pypi
aiohttp                   3.8.4                    pypi_0    pypi
aiohttp-cors              0.7.0                    pypi_0    pypi
aiosignal                 1.3.1                    pypi_0    pypi
alabaster                 0.7.13                   pypi_0    pypi
anndata                   0.8.0                    pypi_0    pypi
annoy                     1.17.1                   pypi_0    pypi
ansiwrap                  0.8.4                    pypi_0    pypi
appdirs                   1.4.4                    pypi_0    pypi
appnope                   0.1.3                    pypi_0    pypi
arboreto                  0.1.6                    pypi_0    pypi
argparse                  1.4.0                    pypi_0    pypi
arrow                     1.2.3                    pypi_0    pypi
arviz                     0.14.0                   pypi_0    pypi
asttokens                 2.2.1                    pypi_0    pypi
async-timeout             4.0.2                    pypi_0    pypi
attr                      0.3.2                    pypi_0    pypi
attrs                     22.2.0                   pypi_0    pypi
babel                     2.12.1                   pypi_0    pypi
backcall                  0.2.0                    pypi_0    pypi
bbknn                     1.5.1                    pypi_0    pypi
beautifulsoup4            4.12.0                   pypi_0    pypi
bioservices               1.11.2                   pypi_0    pypi
bleach                    6.0.0                    pypi_0    pypi
blessed                   1.20.0                   pypi_0    pypi
blosc2                    2.0.0                    pypi_0    pypi
bokeh                     2.4.3                    pypi_0    pypi
boltons                   23.0.0                   pypi_0    pypi
bs4                       0.0.1                    pypi_0    pypi
bwidget                   1.9.14               h694c41f_1    conda-forge
bzip2                     1.0.8                h0d85af4_4    conda-forge
ca-certificates           2022.12.7            h033912b_0    conda-forge
cachetools                5.3.0                    pypi_0    pypi
cairo                     1.16.0            he8db5a5_1006    conda-forge
cattrs                    22.2.0                   pypi_0    pypi
cctools_osx-64            973.0.1             hcc6d90d_11    conda-forge
certifi                   2022.12.7                pypi_0    pypi
cffi                      1.15.1                   pypi_0    pypi
cftime                    1.6.2                    pypi_0    pypi
charset-normalizer        3.0.1                    pypi_0    pypi
clang                     14.0.6               h694c41f_0    conda-forge
clang-14                  14.0.6          default_h55ffa42_0    conda-forge
clang_osx-64              14.0.6               h3113cd8_4    conda-forge
clangxx                   14.0.6          default_h55ffa42_0    conda-forge
clangxx_osx-64            14.0.6               h6f97653_4    conda-forge
click                     8.1.3                    pypi_0    pypi
cloudpickle               2.2.1                    pypi_0    pypi
colorama                  0.4.6                    pypi_0    pypi
colorful                  0.5.5                    pypi_0    pypi
colorlog                  6.7.0                    pypi_0    pypi
comm                      0.1.2                    pypi_0    pypi
compiler-rt               14.0.6               h613da45_0    conda-forge
compiler-rt_osx-64        14.0.6               hab78ec2_0    conda-forge
contourpy                 1.0.7                    pypi_0    pypi
cryptography              40.0.1                   pypi_0    pypi
ctxcore                   0.2.0                    pypi_0    pypi
curl                      7.71.1               hbdca1c0_1    conda-forge
custom-inherit            2.4.0                    pypi_0    pypi
cycler                    0.11.0                   pypi_0    pypi
cython                    0.29.33                  pypi_0    pypi
cytoolz                   0.12.1                   pypi_0    pypi
dask                      2023.3.2                 pypi_0    pypi
dastk                     1.0.1.post1              pypi_0    pypi
dataclasses-json          0.5.7                    pypi_0    pypi
datetime                  5.0                      pypi_0    pypi
debugpy                   1.6.6                    pypi_0    pypi
decorator                 5.1.1                    pypi_0    pypi
defusedxml                0.7.1                    pypi_0    pypi
dill                      0.3.6                    pypi_0    pypi
distlib                   0.3.6                    pypi_0    pypi
distributed               2023.3.2                 pypi_0    pypi
docutils                  0.18.1                   pypi_0    pypi
easydev                   0.12.1                   pypi_0    pypi
entrypoints               0.4                      pypi_0    pypi
et-xmlfile                1.1.0                    pypi_0    pypi
ete3                      3.1.2                    pypi_0    pypi
exceptiongroup            1.1.1                    pypi_0    pypi
executing                 1.2.0                    pypi_0    pypi
fastjsonschema            2.16.3                   pypi_0    pypi
fbpca                     1.0                      pypi_0    pypi
filelock                  3.10.7                   pypi_0    pypi
fontconfig                2.13.1            h10f422b_1005    conda-forge
fonttools                 4.38.0                   pypi_0    pypi
freetype                  2.12.1               h3f81eb7_1    conda-forge
fribidi                   1.0.10               hbcb3906_0    conda-forge
frozendict                2.3.6                    pypi_0    pypi
frozenlist                1.3.3                    pypi_0    pypi
fsspec                    2023.3.0                 pypi_0    pypi
future                    0.18.3                   pypi_0    pypi
futures                   3.0.5                    pypi_0    pypi
gensim                    4.3.1                    pypi_0    pypi
geosketch                 1.2                      pypi_0    pypi
gettext                   0.21.1               h8a4c099_0    conda-forge
gevent                    22.10.2                  pypi_0    pypi
gfortran_impl_osx-64      9.5.0               he506f9a_27    conda-forge
gfortran_osx-64           9.5.0                h18f7dce_0    conda-forge
globre                    0.1.5                    pypi_0    pypi
gmp                       6.2.1                h2e338ed_0    conda-forge
google-api-core           2.11.0                   pypi_0    pypi
google-auth               2.17.1                   pypi_0    pypi
googleapis-common-protos  1.59.0                   pypi_0    pypi
gpustat                   1.0.0                    pypi_0    pypi
graphite2                 1.3.13            h2e338ed_1001    conda-forge
greenlet                  2.0.2                    pypi_0    pypi
grequests                 0.6.0                    pypi_0    pypi
grpcio                    1.49.1                   pypi_0    pypi
gseapy                    0.10.8                   pypi_0    pypi
gsl                       2.6                  h71c5fe9_2    conda-forge
h5py                      3.8.0                    pypi_0    pypi
harfbuzz                  2.7.2                h73e2de6_1    conda-forge
harmonypy                 0.0.9                    pypi_0    pypi
heapdict                  1.0.1                    pypi_0    pypi
icu                       67.1                 hb1e8313_0    conda-forge
idna                      3.4                      pypi_0    pypi
igraph                    0.10.4                   pypi_0    pypi
imageio                   2.27.0                   pypi_0    pypi
imagesize                 1.4.1                    pypi_0    pypi
importlib-metadata        6.0.0                    pypi_0    pypi
interlap                  0.2.7                    pypi_0    pypi
intervaltree              3.1.0                    pypi_0    pypi
ipykernel                 6.21.0                   pypi_0    pypi
ipympl                    0.9.3                    pypi_0    pypi
ipython                   8.9.0                    pypi_0    pypi
ipython-genutils          0.2.0                    pypi_0    pypi
ipywidgets                8.0.4                    pypi_0    pypi
isl                       0.25                 hb486fe8_0    conda-forge
jax                       0.4.2                    pypi_0    pypi
jaxlib                    0.4.2                    pypi_0    pypi
jedi                      0.18.2                   pypi_0    pypi
jinja2                    3.1.2                    pypi_0    pypi
joblib                    1.2.0                    pypi_0    pypi
jpeg                      9e                   hac89ed1_2    conda-forge
jsonpickle                3.0.1                    pypi_0    pypi
jsonschema                4.17.3                   pypi_0    pypi
jupyter-client            8.0.2                    pypi_0    pypi
jupyter-core              5.2.0                    pypi_0    pypi
jupyterlab-pygments       0.2.2                    pypi_0    pypi
jupyterlab-widgets        3.0.5                    pypi_0    pypi
kaleido                   0.2.1                    pypi_0    pypi
kiwisolver                1.4.4                    pypi_0    pypi
krb5                      1.17.2               h60d9502_0    conda-forge
ld64_osx-64               609                 hfd63004_11    conda-forge
lda                       2.0.0                    pypi_0    pypi
leidenalg                 0.9.1                    pypi_0    pypi
levenshtein               0.20.9                   pypi_0    pypi
libblas                   3.9.0           16_osx64_openblas    conda-forge
libcblas                  3.9.0           16_osx64_openblas    conda-forge
libclang-cpp14            14.0.6          default_h55ffa42_0    conda-forge
libcurl                   7.71.1               he6690cf_1    conda-forge
libcxx                    14.0.6               hccf4f1f_0    conda-forge
libedit                   3.1.20191231         h0678c8f_2    conda-forge
libffi                    3.2.1                         1    bioconda
libgfortran               5.0.0           11_3_0_h97931a8_27    conda-forge
libgfortran-devel_osx-64  9.5.0               hc2d6858_27    conda-forge
libgfortran5              11.3.0              h082f757_27    conda-forge
libglib                   2.66.3               h2575888_0    conda-forge
libiconv                  1.17                 hac89ed1_0    conda-forge
liblapack                 3.9.0           16_osx64_openblas    conda-forge
libllvm14                 14.0.6               h5b596cc_1    conda-forge
libopenblas               0.3.21          openmp_h429af6e_3    conda-forge
libpng                    1.6.39               ha978bb4_0    conda-forge
libsqlite                 3.40.0               ha978bb4_0    conda-forge
libssh2                   1.10.0               h7535e13_3    conda-forge
libtiff                   4.2.0                h1167814_3    conda-forge
libwebp-base              1.2.4                h775f41a_0    conda-forge
libxml2                   2.9.10               h2c6e4a5_2    conda-forge
libzlib                   1.2.13               hfd90126_4    conda-forge
llvm-openmp               15.0.7               h61d9ccf_0    conda-forge
llvm-tools                14.0.6               h5b596cc_1    conda-forge
llvmlite                  0.39.1                   pypi_0    pypi
locket                    1.0.0                    pypi_0    pypi
loompy                    3.0.7                    pypi_0    pypi
loomxpy                   0.4.2                    pypi_0    pypi
lxml                      4.9.2                    pypi_0    pypi
lz4                       4.3.2                    pypi_0    pypi
macs2                     2.2.7.1          py39h7222f55_5    bioconda
make                      4.3                  h22f3db7_1    conda-forge
markdown-it-py            2.1.0                    pypi_0    pypi
markupsafe                2.1.2                    pypi_0    pypi
marshmallow               3.19.0                   pypi_0    pypi
marshmallow-enum          1.5.1                    pypi_0    pypi
matplotlib                3.6.3                    pypi_0    pypi
matplotlib-inline         0.1.6                    pypi_0    pypi
mdurl                     0.1.2                    pypi_0    pypi
mistune                   2.0.5                    pypi_0    pypi
mizani                    0.8.1                    pypi_0    pypi
mpc                       1.3.1                h81bd1dd_0    conda-forge
mpfr                      4.1.0                h0f52abe_1    conda-forge
msgpack                   1.0.5                    pypi_0    pypi
mudata                    0.2.1                    pypi_0    pypi
multidict                 6.0.4                    pypi_0    pypi
multipledispatch          0.6.0                    pypi_0    pypi
multiprocessing-on-dill   3.5.0a4                  pypi_0    pypi
muon                      0.1.2                    pypi_0    pypi
mypy-extensions           1.0.0                    pypi_0    pypi
natsort                   8.2.0                    pypi_0    pypi
nbclient                  0.7.2                    pypi_0    pypi
nbconvert                 7.2.10                   pypi_0    pypi
nbformat                  5.8.0                    pypi_0    pypi
nbsphinx                  0.9.1                    pypi_0    pypi
nbsphinx-link             1.3.0                    pypi_0    pypi
ncls                      0.0.66                   pypi_0    pypi
ncurses                   6.3                  h96cf925_1    conda-forge
netcdf4                   1.6.2                    pypi_0    pypi
networkx                  3.0                      pypi_0    pypi
numba                     0.56.4                   pypi_0    pypi
numexpr                   2.8.4                    pypi_0    pypi
numpy                     1.23.5                   pypi_0    pypi
numpy-groupies            0.9.20                   pypi_0    pypi
numpydoc                  1.5.0                    pypi_0    pypi
numpyro                   0.10.1                   pypi_0    pypi
nvidia-ml-py              11.495.46                pypi_0    pypi
opencensus                0.11.2                   pypi_0    pypi
opencensus-context        0.1.3                    pypi_0    pypi
openpyxl                  3.1.2                    pypi_0    pypi
openssl                   1.1.1s               hfd90126_1    conda-forge
opt-einsum                3.3.0                    pypi_0    pypi
packaging                 23.0                     pypi_0    pypi
palettable                3.3.0                    pypi_0    pypi
pandas                    1.5.3                    pypi_0    pypi
pandoc                    2.3                      pypi_0    pypi
pandocfilters             1.5.0                    pypi_0    pypi
pango                     1.42.4               ha86e081_5    conda-forge
papermill                 2.4.0                    pypi_0    pypi
parso                     0.8.3                    pypi_0    pypi
partd                     1.3.0                    pypi_0    pypi
patsy                     0.5.3                    pypi_0    pypi
pbr                       3.1.1                    pypi_0    pypi
pcre                      8.45                 he49afe7_0    conda-forge
pcre2                     10.36                h5cf9962_1    conda-forge
pertpy                    0.3.0                    pypi_0    pypi
pexpect                   4.8.0                    pypi_0    pypi
pickleshare               0.7.5                    pypi_0    pypi
pillow                    9.4.0                    pypi_0    pypi
pip                       23.0               pyhd8ed1ab_0    conda-forge
pixman                    0.40.0               hbcb3906_0    conda-forge
platformdirs              2.6.2                    pypi_0    pypi
plotly                    5.14.0                   pypi_0    pypi
plotnine                  0.10.1                   pypi_0    pypi
plumbum                   1.8.1                    pypi_0    pypi
ply                       3.11                     pypi_0    pypi
polars                    0.16.17                  pypi_0    pypi
progressbar2              4.2.0                    pypi_0    pypi
prometheus-client         0.16.0                   pypi_0    pypi
prompt-toolkit            3.0.36                   pypi_0    pypi
protobuf                  4.22.1                   pypi_0    pypi
psutil                    5.9.4                    pypi_0    pypi
ptyprocess                0.7.0                    pypi_0    pypi
pure-eval                 0.2.2                    pypi_0    pypi
py-cpuinfo                9.0.0                    pypi_0    pypi
py-spy                    0.3.14                   pypi_0    pypi
pyarrow                   11.0.0                   pypi_0    pypi
pyasn1                    0.4.8                    pypi_0    pypi
pyasn1-modules            0.2.8                    pypi_0    pypi
pybedtools                0.9.0                    pypi_0    pypi
pybigwig                  0.3.21                   pypi_0    pypi
pybiomart                 0.2.0                    pypi_0    pypi
pycistarget               1.0.2.dev11+g7daf370          pypi_0    pypi
pycistopic                1.0.2.dev21+g219225d          pypi_0    pypi
pycparser                 2.21                     pypi_0    pypi
pydantic                  1.10.7                   pypi_0    pypi
pydata-sphinx-theme       0.13.3                   pypi_0    pypi
pyfasta                   0.5.2                    pypi_0    pypi
pygam                     0.9.0                    pypi_0    pypi
pygments                  2.14.0                   pypi_0    pypi
pynndescent               0.5.8                    pypi_0    pypi
pyopenssl                 23.1.1                   pypi_0    pypi
pyparsing                 3.0.9                    pypi_0    pypi
pypi-latest               0.1.2                    pypi_0    pypi
pypng                     0.20220715.0             pypi_0    pypi
pyqt5                     5.15.8                   pypi_0    pypi
pyqt5-qt5                 5.15.2                   pypi_0    pypi
pyqt5-sip                 12.11.1                  pypi_0    pypi
pyranges                  0.0.120                  pypi_0    pypi
pyrle                     0.0.35                   pypi_0    pypi
pyrsistent                0.19.3                   pypi_0    pypi
pysam                     0.20.0                   pypi_0    pypi
pyscenic                  0.12.1+1.g0a90cb5          pypi_0    pypi
python                    3.9.0           ha017127_4_cpython    conda-forge
python-dateutil           2.8.2                    pypi_0    pypi
python-igraph             0.10.4                   pypi_0    pypi
python-levenshtein        0.20.9                   pypi_0    pypi
python-utils              3.5.2                    pypi_0    pypi
python_abi                3.9                      3_cp39    conda-forge
pytz                      2022.7.1                 pypi_0    pypi
pyvis                     0.3.2                    pypi_0    pypi
pywavelets                1.4.1                    pypi_0    pypi
pyyaml                    6.0                      pypi_0    pypi
pyzmq                     25.0.0                   pypi_0    pypi
questionary               1.10.0                   pypi_0    pypi
r-base                    4.0.3                hc5aadab_3    conda-forge
rapidfuzz                 2.14.0                   pypi_0    pypi
ray                       2.3.1                    pypi_0    pypi
readline                  8.1.2                h3899abd_0    conda-forge
reportlab                 3.6.12                   pypi_0    pypi
requests                  2.28.2                   pypi_0    pypi
requests-cache            1.0.1                    pypi_0    pypi
rich                      13.3.1                   pypi_0    pypi
rsa                       4.9                      pypi_0    pypi
scanorama                 1.7.3                    pypi_0    pypi
scanpy                    1.9.3                    pypi_0    pypi
scenicplus                0.1.dev466+g37cf1fc          pypi_0    pypi
scikit-image              0.19.3                   pypi_0    pypi
scikit-learn              1.2.1                    pypi_0    pypi
scikit-misc               0.1.4                    pypi_0    pypi
scipy                     1.10.1                   pypi_0    pypi
scrublet                  0.2.3                    pypi_0    pypi
seaborn                   0.11.2                   pypi_0    pypi
session-info              1.0.0                    pypi_0    pypi
setuptools                66.1.1             pyhd8ed1ab_0    conda-forge
sigtool                   0.1.3                h57ddcff_0    conda-forge
six                       1.16.0                   pypi_0    pypi
sklearn                   0.0.post1                pypi_0    pypi
smart-open                6.3.0                    pypi_0    pypi
snowballstemmer           2.2.0                    pypi_0    pypi
sorted-nearest            0.0.38                   pypi_0    pypi
sortedcontainers          2.4.0                    pypi_0    pypi
soupsieve                 2.4                      pypi_0    pypi
sphinx                    6.1.3                    pypi_0    pypi
sphinx-book-theme         1.0.1                    pypi_0    pypi
sphinx-rtd-theme          1.2.0                    pypi_0    pypi
sphinxcontrib-applehelp   1.0.4                    pypi_0    pypi
sphinxcontrib-devhelp     1.0.2                    pypi_0    pypi
sphinxcontrib-htmlhelp    2.0.1                    pypi_0    pypi
sphinxcontrib-jquery      4.1                      pypi_0    pypi
sphinxcontrib-jsmath      1.0.1                    pypi_0    pypi
sphinxcontrib-qthelp      1.0.3                    pypi_0    pypi
sphinxcontrib-serializinghtml 1.1.5                    pypi_0    pypi
sqlite                    3.40.0               h9ae0607_0    conda-forge
stack-data                0.6.2                    pypi_0    pypi
statannotations           0.5.0                    pypi_0    pypi
statistics                1.0.3.5                  pypi_0    pypi
statsmodels               0.13.5                   pypi_0    pypi
stdlib-list               0.8.0                    pypi_0    pypi
suds-community            1.1.2                    pypi_0    pypi
switchlang                0.1.0                    pypi_0    pypi
tables                    3.8.0                    pypi_0    pypi
tabulate                  0.9.0                    pypi_0    pypi
tapi                      1100.0.11            h9ce4665_0    conda-forge
tblib                     1.7.0                    pypi_0    pypi
tenacity                  8.2.2                    pypi_0    pypi
texttable                 1.6.7                    pypi_0    pypi
textwrap3                 0.9.2                    pypi_0    pypi
threadpoolctl             3.1.0                    pypi_0    pypi
tifffile                  2023.3.21                pypi_0    pypi
tinycss2                  1.2.1                    pypi_0    pypi
tk                        8.6.12               h5dbffcc_0    conda-forge
tktable                   2.10                 h49f0cf7_3    conda-forge
tmtoolkit                 0.11.2                   pypi_0    pypi
toolz                     0.12.0                   pypi_0    pypi
tornado                   6.2                      pypi_0    pypi
toyplot                   1.0.3                    pypi_0    pypi
toytree                   2.0.1                    pypi_0    pypi
tqdm                      4.64.1                   pypi_0    pypi
traitlets                 5.9.0                    pypi_0    pypi
tspex                     0.6.2                    pypi_0    pypi
typing                    3.7.4.3                  pypi_0    pypi
typing-extensions         4.4.0                    pypi_0    pypi
typing-inspect            0.8.0                    pypi_0    pypi
tzdata                    2022g                h191b570_0    conda-forge
umap-learn                0.5.3                    pypi_0    pypi
upsetplot                 0.8.0                    pypi_0    pypi
url-normalize             1.4.3                    pypi_0    pypi
urllib3                   1.26.14                  pypi_0    pypi
virtualenv                20.21.0                  pypi_0    pypi
wcwidth                   0.2.6                    pypi_0    pypi
webencodings              0.5.1                    pypi_0    pypi
wheel                     0.38.4             pyhd8ed1ab_0    conda-forge
widgetsnbextension        4.0.5                    pypi_0    pypi
wrapt                     1.15.0                   pypi_0    pypi
xarray                    2023.1.0                 pypi_0    pypi
xarray-einstats           0.5.1                    pypi_0    pypi
xlrd                      2.0.1                    pypi_0    pypi
xmltodict                 0.13.0                   pypi_0    pypi
xz                        5.2.6                h775f41a_0    conda-forge
yarl                      1.8.2                    pypi_0    pypi
zict                      2.2.0                    pypi_0    pypi
zipp                      3.12.0                   pypi_0    pypi
zlib                      1.2.13               hfd90126_4    conda-forge
zope-event                4.6                      pypi_0    pypi
zope-interface            5.5.2                    pypi_0    pypi
zstd                      1.5.2                hbc0c0cd_6    conda-forge

Additional context Add any other context about the problem here.

SeppeDeWinter commented 1 year ago

Hi @midichlorianrich

There seems to be an issue reading the blacklist bed file.

Can you try reading it like this to see if you still have the same error?


import pyranges as pr
path_to_blacklist = '/Users/M258140/scenicplus/notebooks/Kylie_tutorial/data/mm10-blacklist.v2.bed'
blacklist = pr.read_bed(path_to_blacklist)

If you still have an error try reading it with pandas (and please report back the output).


import pandas as pd
blacklist = pd.read_csv(path_to_blacklist, sep = '\t')

If that fails, can you please show


head /Users/M258140/scenicplus/notebooks/Kylie_tutorial/data/mm10-blacklist.v2.bed

Best,

Seppe