Hi: I ran into bug when merging different peak overlap hit table, couldn't locate the issue efficiently. However, I used three bed files for finding overlap, so I implement function that return different index table. The point is, pattern of each index table is different from one to another. I come up solution to solve this issues, certainly it works for further meta process that I am gonna proceed, but when validating the output of my implementation with existing software tools, and final output for first bed files is perfectly matched while second, third bed files' result remain some difference (where each GRanges object will yield multiple output through several filtering process, and three bed files must be processed by parallel). How can I efficiently merge hit index table as I expected ? Any way to debug the issue?
Here is reproducible example:
idxTb_1 <- list( foo = IntegerList(1,2,3,4,5,6,7,8,9,10), bar = IntegerList(1,2,3,4,5,6,integer(0),7,integer(0),8), cat = IntegerList(1,2,3,4,5,6,integer(0),7,8,10) ) idxTb_2 <- list( bar = IntegerList(1,2,3,4,5,6,7,8,9,10,11), foo = IntegerList(1,2,3,4,5,6,8,10,11,integer(0),13), cat = IntegerList(1,2,3,4,5,6,7,10,13,14, integer(0)) ) idxTb_3 <- list( cat = IntegerList(1,2,3,4,5,6,7,8,9,10), foo = IntegerList(1,2,3,4,5,6,8,9,integer(0),10), bar = IntegerList(1,2,3,4,5,6,7,integer(0),integer(0),8) )
So I come up with this solution:
t1 <- as.matrix(DataFrame(idxTb_1)) t2 <- as.matrix(DataFrame(idxTb_2[names(idxTb_1)])) t3 <- as.matrix(DataFrame(idxTb_3[names(idxTb_1)])) idxTb_final <- unique(DataFrame(rbind(t1, t2, t3)))
My approach is not desired, but this at least gives me perfect match result for only first bed files, so I need to figure out the where is issue come from. I suspect issue might come from merging index table. Can anyone give me idea how to address this issues ? what's the efficient way for merging index hit table? Any idea ?