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

No chromosomes are in common #110

Closed Jason-Qiuhai closed 1 year ago

Jason-Qiuhai commented 1 year ago

Hi,

I had clr chromnames as 0D3D98D9-03C6-4386-9ADB-3648D504F66C

and stripe dataframe

image

When I ran pup = coolpup.pileup(clr, stripes, features_format='bedpe', local=True, rescale=True, clr_weight_name=False)

I got the error message

image

I got confused why I got the error.

Phlya commented 1 year ago

The error is indeed confusing, but can you try running it with local=False? You can't really use bedpe data for local pileups...

Jason-Qiuhai commented 1 year ago

Thanks for the quick reply. I tried running it with local=False, but got the same error message. I checked the source code. If I changed the 934 line code 'self.CC.final_chroms' into 'self.CC.chroms', it might help. I still got warning messages saying 'No regions in features (maybe all below mindist?)'.

Phlya commented 1 year ago

Ah yes, that's a good hint - your features are indeed all very close to the main diagonal, so you need to set mindist=0.

Jason-Qiuhai commented 1 year ago

Ah yes, that's a good hint - your features are indeed all very close to the main diagonal, so you need to set mindist=0.

Thanks so much for the instant reply. I set mindist=0 and successfully ran the code. However, I did not get any meaningful output. I summarized my questions as follows.

  1. I want to do pileup plot for stripes, which are lines extending from the diagonal. Is my stripe location format correct as input for coolpup?

    image
  2. Is my code running coolpup.pileup correct?

    image
  3. My aim is to create a plot like this (copied from stripenn paper, in which they said 'pileup plot of all stripes detected by each method was generated using coolpup.py program where ‘--local –rescale --unbalanced’ options were used.')

    image

I don't know how to run the coopup.py file in my command line. I tried to run it but got errors

image

I really appreciate any suggestions.

Please let me know If I need to create a new issue talking about this.

Phlya commented 1 year ago

Have you installed the package? Or did you just download the code? You need to run pip install https://github.com/open2c/coolpuppy/archive/master.zip, then you should have a coolpup.py command available in your terminal.

For the stripenn paper, this description is really not enough. As you experienced, just running coolpup.py with the stripe annotation directly with those arguments won't work at all. From the plot it looks like perhaps they preprocessed the stripe annotation and were looking at pairs of neighbouring stripes?

Jason-Qiuhai commented 1 year ago

Have you installed the package? Or did you just download the code? You need to run pip install https://github.com/open2c/coolpuppy/archive/master.zip, then you should have a coolpup.py command available in your terminal.

For the stripenn paper, this description is really not enough. As you experienced, just running coolpup.py with the stripe annotation directly with those arguments won't work at all. From the plot it looks like perhaps they preprocessed the stripe annotation and were looking at pairs of neighbouring stripes?

Thanks very much. I will take a try.

Jason-Qiuhai commented 1 year ago

Have you installed the package? Or did you just download the code? You need to run pip install https://github.com/open2c/coolpuppy/archive/master.zip, then you should have a coolpup.py command available in your terminal.

For the stripenn paper, this description is really not enough. As you experienced, just running coolpup.py with the stripe annotation directly with those arguments won't work at all. From the plot it looks like perhaps they preprocessed the stripe annotation and were looking at pairs of neighbouring stripes?

Hi Phyla,

My data looks like this

image

When I run the code coolpup.py --features_format bedpe 4DNFI2TK7L2F.cool result_filtered.bedpe.tsv

I got the error message

image

Is my code correct? I want to get the pileup plot for my stripe regions.

Phlya commented 1 year ago

You need to either balance your cooler, or give an argument --clr-weight-name to not use balanced data.

Phlya commented 1 year ago

I assume this is solved, feel free to reopen!