XiaoTaoWang / HiCPeaks

A Python implementation for BH-FDR and HiCCUPS
GNU General Public License v3.0
41 stars 9 forks source link

ValueError: Offset 1687 (index 1687) out of bounds #6

Open gdolsten opened 3 years ago

gdolsten commented 3 years ago

In pyHICCUPS, I get the following error:

ValueError: Offset 1687 (index 1687) out of bounds

It occurs in sparse.diags in the following code chunk (~line 135). Do you know what causes it? – H = Lib.matrix(balance=False, sparse=True).fetch(key) cHeatMap = Lib.matrix(balance=True, sparse=True).fetch(key)

Customize Sparse Matrix ...

        chromLen = H.shape[0]
        num = args.maxapart // resolution + args.maxww + 1

        Diags = [H.diagonal(i) for i in np.arange(num)]
        M = sparse.diags(Diags, np.arange(num), format='csr')