open2c / coolpuppy

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

[Q]why the value on heatmap is zero #119

Closed jiangshan529 closed 1 year ago

jiangshan529 commented 1 year ago

Hello, I am using the code "coolpup.py aa_1k.cool bb.bed --outname cc.txt --pad 100 --n_proc 8 --local --unbalanced" and "plotpup.py cc.txt --output dd.png" to plot the figures. However, the heatmap has a white line in the diagnal and the value in heatmap is zero. Why is this and how should I deal with it?(I used --unbalanced because if I did not use it there's an error "raise self._value ValueError: No column 'bins/weight'found. Use cooler.balance_cooler to calculate balancing weights or set [balance=False.")]

ctcf_not_j_1k_100k_local

Phlya commented 1 year ago

Hello, it looks like you are using the old version of coolpuppy, I would recommend upgrading.

Basically, the first two diagonals by default are masked, since they are often noisy. And previously the plotting would always try to just show the value of the central pixel of the pileups, which is reasonable for a pileup of loops, but not a local pileup like this one - so with the old version you can just completely ignore this number. In the new version the plotting code automatically detects what kind of pileup it is and shows the appropriate reasonable score (in this case it would show the insulation strength).

Hope this is helpful!

jiangshan529 commented 1 year ago

Hello, it looks like you are using the old version of coolpuppy, I would recommend upgrading.

Basically, the first two diagonals by default are masked, since they are often noisy. And previously the plotting would always try to just show the value of the central pixel of the pileups, which is reasonable for a pileup of loops, but not a local pileup like this one - so with the old version you can just completely ignore this number. In the new version the plotting code automatically detects what kind of pileup it is and shows the appropriate reasonable score (in this case it would show the insulation strength).

Hope this is helpful!

Hi, thanks for your reply. I have a problem installing it using "pip install https://github.com/open2c/coolpuppy/archive/master.zip". the error is "nbconvert 7.2.7 requires mistune<3,>=2.0.3, but you have mistune 0.8.4 which is incompatible.". And then I update the mistune to 2.0.4 and install coolpup again, actually the installation process uninstalled mistune 2.0.4 and reinstalled 0.8.4 and report the error again "nbconvert 7.2.7 requires mistune<3,>=2.0.3, but you have mistune 0.8.4 which is incompatible.". How should I deal with this? Thanks!

Phlya commented 1 year ago

Not sure why you are getting this error, coolpuppy doesn't depend on nbconvert... But also you don't need the latest commit from master, you can just install from pypi with pip install coolpuppy.

You can also install from bioconda instead of pip, with conda install -c bioconda coolpuppy if that helps.

jiangshan529 commented 1 year ago

Not sure why you are getting this error, coolpuppy doesn't depend on nbconvert... But also you don't need the latest commit from master, you can just install from pypi with pip install coolpuppy.

You can also install from bioconda instead of pip, with conda install -c bioconda coolpuppy if that helps.

Sorry, using Conda I met with this problem:

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versionsThe following specifications were found to be incompatible with your system:

Your installed version is: 2.27

Phlya commented 1 year ago

I am sorry, I have no clue why you are having problems like this, it's something weird with your environment. Try creating a fresh conda environment, perhaps...

jiangshan529 commented 1 year ago

I am sorry, I have no clue why you are having problems like this, it's something weird with your environment. Try creating a fresh conda environment, perhaps...

Yeah, sure, will try this. What kind of python version will be good for this tool?

Phlya commented 1 year ago

python>=3.8, but I would avoid python3.11 for now

jiangshan529 commented 1 year ago

python>=3.8, but I would avoid python3.11 for now

I recreated a conda environment with python=3.8. However, I still meet this problem: Output in format: Requested package -> Available versionsThe following specifications were found to be incompatible with your system:

Your installed version is: 2.27

jiangshan529 commented 1 year ago

python>=3.8, but I would avoid python3.11 for now

Hi, now I installed it. the version is 1.0.0.