XiaoTaoWang / HiC_pipeline

An easy-to-use Hi-C data processing software supporting distributed computation.
http://xiaotaowang.github.io/HiC_pipeline/index.html
GNU General Public License v3.0
55 stars 20 forks source link

WARNING:pairtools:Pairs file appears not to be sorted, dedup might produce wrong results. #14

Closed mdozmorov closed 1 year ago

mdozmorov commented 1 year ago

Hi, I installed runHiC with Python 3.10 and pairtools v.1.0.2. The pipeline runs and produces the .mcool files. The log looks good. But on screen, I noticed the not sorted warning, the full output below. It appears for each sample. Is it something to be concerned? Or, pairtools must be pairtools==0.3, which require Python 3.9?

WARNING:pairtools:Pairs file appears not to be sorted, dedup might produce wrong results.
Traceback (most recent call last):
  File "/mount/home/user0516/miniconda3/envs/runHiC/bin/pairtools", line 11, in <module>
    sys.exit(cli())
  File "/mount/home/user0516/miniconda3/envs/runHiC/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/mount/home/user0516/miniconda3/envs/runHiC/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/mount/home/user0516/miniconda3/envs/runHiC/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/mount/home/user0516/miniconda3/envs/runHiC/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/mount/home/user0516/miniconda3/envs/runHiC/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/mount/home/user0516/miniconda3/envs/runHiC/lib/python3.10/site-packages/pairtools/cli/__init__.py", line 183, in wrapper
    return func(*args, **kwargs)
  File "/mount/home/user0516/miniconda3/envs/runHiC/lib/python3.10/site-packages/pairtools/cli/stats.py", line 122, in stats
    stats_py(
  File "/mount/home/user0516/miniconda3/envs/runHiC/lib/python3.10/site-packages/pairtools/cli/stats.py", line 183, in stats_py
    stats = PairCounter(
  File "/mount/home/user0516/miniconda3/envs/runHiC/lib/python3.10/site-packages/pairtools/lib/stats.py", line 61, in __init__
    ).astype(np.int),
  File "/mount/home/user0516/miniconda3/envs/runHiC/lib/python3.10/site-packages/numpy/__init__.py", line 313, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'int'.
`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'inf'?
XiaoTaoWang commented 1 year ago

Hi Mikhail,

Sorry for the late response.

runHiC actually does not require pairtools==0.3 as a mandatory dependency. However, I've received feedback from some users stating that upgrading pairtools to v1.0 resulted in unexpected outcomes - they obtained different results in various runs when they used pairtools v1.0, even with identical parameters on the same dataset. That's why I decided to include pairtools==0.3 in the installation guide to ensure consistent and accurate results.

Regarding your pull request #13, I have conducted tests on different machines, but I couldn't replicate the problems you described. All the dependencies could be installed successfully using the current command mamba create -n runHiC matplotlib biopython cooler sra-tools bwa minimap2 samtools pigz chromap "pairtools==0.3" "numpy<=1.23".

Xiaotao

mdozmorov commented 1 year ago

Hi Xiaotao,

You are correct, now I can install runHiC following the docs, without errors. Not sure why the problem existed. I'm still struggling with making it run, it seems runHiC is sensitive to paths. But that's a separate problem that I hope to solve.

Thanks for your help and all the tools you created! Mikhail