nservant / HiC-Pro

HiC-Pro: An optimized and flexible pipeline for Hi-C data processing
Other
382 stars 183 forks source link

error happened when import HI-C results to HiTC #451

Open canfeng-HUA opened 3 years ago

canfeng-HUA commented 3 years ago

I meet a problem when I used the import() function to import my Hi-C data to HiTC. The code and error are listed below. The header of these two files is also listed. Because I study the bacterial HI-C, only one chromosome was used in this study.

hic<-importC("HI-C-hrpL-KB_29000_iced.matrix",
             "HI-C-hrpL-KB_29000_abs.bed")

Loading Genomic intervals ... Reading file ... Error in Matrix::sparseMatrix(i = pos1, j = pos2, x = cdata[, 3], dims = c(length(ygi), : NA's in (i,j) are not allowed

$ head HI-C-hrpL-KB_29000_abs.bed
chr1    0       29000   1
chr1    29000   58000   2
chr1    58000   87000   3
chr1    87000   116000  4
chr1    116000  145000  5
chr1    145000  174000  6
chr1    174000  203000  7
chr1    203000  232000  8
chr1    232000  261000  9
$ head HI-C-hrpL-KB_29000_iced.matrix
0       0       23.563939
0       1       37.000796
0       2       30.250997
0       3       17.212737
0       4       18.107075
0       5       12.646009
0       6       12.242708
0       7       12.878861
0       8       6.275917
0       9       8.532502
nservant commented 3 years ago

Hi Yes, I'll check that and correct it. It seems that the last version of iced outputs 0-based coordinates, instead of one-based. Please, just add 1 to the two first columns of the .matrix file !