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

about the 'NaN' #4

Closed RuiqinZheng closed 6 years ago

RuiqinZheng commented 6 years ago

sorry。。。。 But I met another problem。。。。 here is my orders: a=read.table("2X_50kb_all_observed_KR_hiccompare.matrix") b=read.table("4X_new_50kb_all_hiccompare.matrix") a1=a[,1] a2=a[,2] a3=a[,3] b1=b[,1] b2=b[,2] b3=b[,3] x2=data.frame(region1=a1,region2=a2,IF=a3) x4=data.frame(region1=b1,region2=b2,IF=b3)

head(x2) region1 region2 IF 1 50000 50000 1482.3206 2 50000 100000 1096.5582 3 50000 150000 452.9819 4 50000 200000 302.6811 5 50000 250000 167.7573 6 50000 300000 151.8279 head(x4) region1 region2 IF 1 50000 50000 1283.230 2 50000 100000 867.405 3 50000 150000 368.178 4 50000 200000 208.869 5 50000 250000 143.785 6 50000 300000 108.892

all.table=create.hic.table(x2,x4,chr='chr1') head(all.table) chr1 start1 end1 chr2 start2 end2 IF1 IF2 D M 1: chr1 50000 100000 chr1 50000 100000 1283.230 NaN 0 NaN 2: chr1 50000 100000 chr1 100000 150000 867.405 NaN 1 NaN 3: chr1 50000 100000 chr1 150000 200000 368.178 NaN 2 NaN 4: chr1 50000 100000 chr1 200000 250000 208.869 NaN 3 NaN 5: chr1 50000 100000 chr1 250000 300000 143.785 NaN 4 NaN 6: chr1 50000 100000 chr1 300000 350000 108.892 NaN 5 NaN

all.table=create.hic.table(x2,x4,chr='chr1') head(all.table) chr1 start1 end1 chr2 start2 end2 IF1 IF2 D M 1: chr1 50000 100000 chr1 50000 100000 1482.3206 NaN 0 NaN 2: chr1 50000 100000 chr1 100000 150000 1096.5582 NaN 1 NaN 3: chr1 50000 100000 chr1 150000 200000 452.9819 NaN 2 NaN 4: chr1 50000 100000 chr1 200000 250000 302.6811 NaN 3 NaN 5: chr1 50000 100000 chr1 250000 300000 167.7573 NaN 4 NaN 6: chr1 50000 100000 chr1 300000 350000 151.8279 NaN 5 NaN

why the second IF2 is NaN?

Thanks a lot! Best wishes!

jstansfield0 commented 6 years ago

I see that you are using KR normalized data as your input. You should be using un-normalized data with HiCcompare. It's possible the NaNs are already in your input data, can you check for any there? Try it again with the raw IFs and see if you get any NaNs. If you keep getting NaNs can you post your data so I can try to repeat the error?