open2c / coolpuppy

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

I got different results from the example with test data #79

Closed hanshanmengqi closed 2 years ago

hanshanmengqi commented 2 years ago

Dear developer,

Many thank for developed an interesting tools.

Now, I met a problem. My coolpup.py version is 0.9.7, and I have used test data(coolpuppy/tests/Scc1-control.10000.cool, coolpuppy/tests/CH12_loops_Rao.bed) got a plot. My command are:

coolpup.py coolpuppy/tests/Scc1-control.10000.cool coolpuppy/tests/CH12_loops_Rao.bed --nshifts 10 --clr_weight_name "" --coverage_norm --mindist 100000 --outname Ctrl_loop.txt --log WARNING

plotpup.py --input_pups Ctrl_loop.txt -o Ctrl_loop.png --center 3

This is what I got from the test data.

Ctrl_loop

This is your example(from https://coolpuppy.readthedocs.io/en/stable/Examples/snHi-C_Examples.html)

example

Probable my parameter are not right and please help me.

Best, Xiaoning

efriman commented 2 years ago

Hi Xiaoning,

Thanks for your interest in coolpup.py! The reason for this difference is quite simple, but thanks for bringing it to our attention. The new version of coolpup.py you're using is running the feature file as a "bed" file, because it ends in .bed (this is a change from before). That means all regions in columns 1,2, and 3 are compared against each other (if within max/mindist etc.). However, the file is actually a bedpe file with 6 columns that are supposed to be compared pairwise. So if you want to make the same plot, either rename the file to end in ".bedpe" or add "--format bedpe" to your run command. You'll notice this will be much faster because there are many fewer combinations of regions.

You may want to look at the tutorial for the latest release version instead which are more up to date: https://coolpuppy.readthedocs.io/en/latest/

hanshanmengqi commented 2 years ago

Dear Efriman,

Thank you very much for your swift reply.

I added --features_format bedpe as you say, it's very fast and I got same plot as your example page.

Thank you again.

Best, Xiaoning