dozmorovlab / HiCcompare

Joint normalization of two Hi-C matrices, visualization and detection of differential chromatin interactions. See multiHiCcompare for the analysis of multiple Hi-C matrices
https://dozmorovlab.github.io/HiCcompare/
Other
19 stars 3 forks source link

error in KRnorm #27

Closed jiangshan529 closed 1 year ago

jiangshan529 commented 1 year ago

Hi, when I run KRnorm, there is such an error:

> KR.full <- KRnorm(full.test)
Cols/Rows removed: 
  2  4  8  9  79  80  81  82  83  84  85  3820  3822  3823  3824  3827  3829  3832  4349  4350  4388  4389  4390  4391  4392  4393  4394  4395  4396  4542  4543  4544  4545  4546  4547  4548  4549  4550  4551  4558  4636  4639  4647  4650  4652  4669  4673  4674  4675  4678  4680  4686  4687  4688  4690  4691  4692  4694  4695  4699  4700  4714  4718  4719  4721  4725  4727  4730  4732  4733  4734  4736  4740  4745  4746  4747  4751  4756  4759  4766  4772  4778  4780  4782  4784  4790  4796  4809  4811  4814  4817  4821  4822  4825  4828  4835  4839  4843  4853  4857  4860  4862  4864  4865  4870  4871  4875  4882  4883  4893  4894  4897  4902  4903  4905  4907  4908  4909  4914  4915  4918  4921  4923  4924  4926  4927  4928  4932  4934  4936  4938  4941  4946  4950  4954  4957  4959  4961  4962  4963  4965  4970  4971  4972  4974  4977  4980  4981  4982  4983  4993  4994  5000  5002  5004  5005  5006  5008  5013  5014  5016  5021  5022  5025  5030  5032  5033  5034  5043  5047  5050  5053  5061  5073  5084  5091  5104  5106  5112  5134  5137  5140  5141  5150  5159  5163  5164  5170  5178  5185  5189  5226  5233  5246  5249  5250  5259  5261  5267  5270  5271  5286  5289  5297  5367  5368  5369  5370  5371  5372  5373  5374  5375  7238  7265  7574  7576  7586  7587  7589  7590  7591  7598  7602  7607  7610  7611  7614  7617  7618  7625  7638  8641  8646  9275  9293  9303  9319  14081  16338  16339  16340  16341  16342  16343  16344  16345  16346  16637
Error in gamma %*% ap : non-conformable arguments

full.test looks like this:

> full.test[1:5, 1:5]
      60000 65000 70000 75000 80000
60000     0     0     1     0     0
65000     0     0     0     0     0
70000     1     0    20     0     0
75000     0     0     0     0     0
80000     0     0     0     0     0
mdozmorov commented 1 year ago

It looks like the data is very sparse, mostly zeros. That's why so many columns and rows are removed. There's not enough data left for the KR algorithm to work. Please, try using data at a lower resolution, like 50kb.

jiangshan529 commented 1 year ago

It looks like the data is very sparse, mostly zeros. That's why so many columns and rows are removed. There's not enough data left for the KR algorithm to work. Please, try using data at a lower resolution, like 50kb.

I am working on a single chromosome. If I try it genome-wide will it be better? Actually I want to work at 5kb.

mdozmorov commented 1 year ago

HiCcompare operates on per chromosome basis. For 5kb, you need much deeper sequenced data. KR or any normalization cannot work if the data is mostly zeros.