TADbit icon indicating copy to clipboard operation
TADbit copied to clipboard

Raw matrix from TADbit API and TADbit tools are different.

Open pollicipes opened this issue 3 years ago • 2 comments

Hi again, David:

This might (probably) be related to this previous issue https://github.com/3DGenomes/TADbit/issues/377#issue-1294458520

When I get raw matrices for a same chromosome using the TADbit Python API and using TADbit tools bin the matrices that I get are quite different. You can also see that the matrix obtained with the TADbit API is more dense.

MATRIX FROM TADBIT TOOLS: Matrix from TADbit tools MATRIX FROM API: Matrix from API

You can also see the first 10x10 entries for both matrices: Some cells contain the same values, but others just don't. Some are different by orders of magnitude:

Screenshot 2022-07-18 at 13 10 47

Thank you! :)

pollicipes avatar Jul 18 '22 11:07 pollicipes

Hi Juan,

My bet is that it comes from the same issue. Can you paste the code that you use for the api so I can confirm it's the same problem?

Thanks

David

david-castillo avatar Jul 18 '22 11:07 david-castillo

Hi David!

Yes, this is basically it: I just load a bam containing only the valid pairs on the bam variable.

hic_data1 = load_hic_data_from_bam(bam,
                                   resolution=reso,
                                   region=region,
                                   ncpus=6)

hic_map(hic_data1,
        normalized=False, 
        resolution=reso,
        savedata="outfile.mat")

pollicipes avatar Jul 18 '22 11:07 pollicipes