nloyfer / wgbs_tools

tools for working with Bisulfite Sequencing data while preserving reads intrinsic dependencies
Other
134 stars 37 forks source link

Issue when collapsing beta files to the blocks #33

Closed avielmiluz closed 1 year ago

avielmiluz commented 1 year ago

Hi, I am practicing again with the tutorial data step by step, and I get an error below when I run the following:

wgbstools beta_to_table blocks.small.bed.gz --betas *beta | column -t

Pyhton is: Python 3.7.3 (default, Jan 22 2021, 20:04:44) Runing on HURCS cluster terminal 8CPUs, 32GB

It was OK a few weeks ago, Very strange. I have downloaded again the master version, and ran the setup steps, but nothing changed.

The process references Python3, but when I run Python3 (3.7.3 ) separately, the imported NumPy package version is 1.21.6, which does not support Int64. On the other hand the NumPy package version under Python 2 (2.7.16) is 1.16.2 which seem to support Int64.

In both version I run: import numpy as np np.version.version arr = np.array([1, 2, 3, 4], dtype='Int64')

What could be the issue?

The error:

Traceback (most recent call last): File "/sci/home/aviel_iluz/wdir_fb/software/wgbs_tools/wgbstools", line 96, in main() File "/sci/home/aviel_iluz/wdir_fb/software/wgbs_tools/wgbstools", line 63, in main importlib.import_module(args.command).main() File "/sci/backup/iris.lavon/aviel_iluz/software/wgbs_tools/src/python/beta_to_table.py", line 154, in main for chunk in chunks: File "/sci/backup/iris.lavon/aviel_iluz/software/wgbs_tools/src/python/beta_to_table.py", line 132, in beta2table_generator blocks_df = load_blocks_file(blocks) File "/sci/backup/iris.lavon/aviel_iluz/software/wgbs_tools/src/python/beta_to_blocks.py", line 82, in load_blocks_file header=header, names=names, nrows=nrows, comment='#') File "/usr/lib/python3/dist-packages/pandas/io/parsers.py", line 678, in parser_f return _read(filepath_or_buffer, kwds) File "/usr/lib/python3/dist-packages/pandas/io/parsers.py", line 440, in _read parser = TextFileReader(filepath_or_buffer, kwds) File "/usr/lib/python3/dist-packages/pandas/io/parsers.py", line 787, in init self._make_engine(self.engine) File "/usr/lib/python3/dist-packages/pandas/io/parsers.py", line 1014, in _make_engine self._engine = CParserWrapper(self.f, self.options) File "/usr/lib/python3/dist-packages/pandas/io/parsers.py", line 1708, in init self._reader = parsers.TextReader(src, kwds) File "pandas/_libs/parsers.pyx", line 487, in pandas._libs.parsers.TextReader.cinit File "/usr/lib/python3/dist-packages/pandas/core/dtypes/common.py", line 2013, in pandas_dtype npdtype = np.dtype(dtype) TypeError: data type 'Int64' not understood**

avielmiluz commented 1 year ago

Hi, I solved the problem by upgrading pandas.