open2c / coolpuppy

A versatile tool to perform pile-up analysis on Hi-C data in .cool format.
MIT License
77 stars 11 forks source link

[Q]installing problem #118

Closed jiangshan529 closed 1 year ago

jiangshan529 commented 1 year ago

Hi, I created a conda environment with python=3.8 and install coolpuppy using "pip install coolpuppy".

However, there's an error:

Collecting coolpuppy Using cached coolpuppy-1.0.0-py3-none-any.whl (44 kB) Collecting numpy>=1.16.5 Using cached numpy-1.23.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB) Collecting cooler Using cached cooler-0.8.11-py2.py3-none-any.whl (100 kB) Collecting pyyaml Using cached PyYAML-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (701 kB) Collecting scipy Using cached scipy-1.9.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (33.8 MB) Requirement already satisfied: Cython in /home/jib79/miniconda2/envs/coolpuppy/lib/python3.8/site-packages (from coolpuppy) (0.29.32) Collecting cooltools>=0.5.2 Using cached cooltools-0.5.2.tar.gz (8.1 MB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [6 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/tmp/pip-install-47zixv6p/cooltools_24b1e652c68c40b79a3e70d99c3f8f79/setup.py", line 10, in import numpy as np ModuleNotFoundError: No module named 'numpy' [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

Phlya commented 1 year ago

Try installing numpy before installing coolpuppy? You might also have to do the same for cython. It's actually for cooltools, which is a dependency.

jiangshan529 commented 1 year ago

pip install coolpuppy

Hi, I have succeeded in installing it. However, when I try to run "plotpup.py --enrichment", there's no argument "--enrichment".

Phlya commented 1 year ago

Where did you find this argument? Indeed it doesn't exist, perhaps we had it in an old version, I don't even remember anymore though.

jiangshan529 commented 1 year ago

Where did you find this argument? Indeed it doesn't exist, perhaps we had it in an old version, I don't even remember anymore though.

from some other github issues or papers(one example is https://github.com/open2c/coolpuppy/issues/9). By the way, when I try to plot the figure by using other's published data, I got a result like this: image

here's the code that I used: coolpup.py DN3EV.cool CTCF.bed --outname test.txt --pad 250 --local --coverage_norm --clr_weight_name "" plotpup.py --input_pups test.txt --rownames WT --colnames CTCF --output Figure4C.pdf

Phlya commented 1 year ago

Please check the docs, there have been very big updates recently. E.g. in this case the problem is from the --pad argument - now it should be specified in bp, while it used to be in kb. So try changing it to 250000.

jiangshan529 commented 1 year ago

Please check the docs, there have been very big updates recently. E.g. in this case the problem is from the --pad argument - now it should be specified in bp, while it used to be in kb. So try changing it to 250000.

Hello, thanks, it works out this time. But the diagnol has a white line. image

Phlya commented 1 year ago

That's because of the ignore-diags argument. In some datasets the first two diagonals are very noisy and weird things happen in pileups, but feel free to set the argument to 0 and check how it is with your data.