@@ -36,11 +36,10 @@ test_that(".constrict", {
3636 expect_equal(start(gr ), c(1 , 16571 ))
3737})
3838
39-
39+ justHits <- function (df ) {
40+ return (data.frame (queryHits = df $ queryHits , subjectHits = df $ subjectHits ))
41+ }
4042test_that(" findBreakpointOverlaps" , {
41- justHits <- function (df ) {
42- return (data.frame (queryHits = df $ queryHits , subjectHits = df $ subjectHits ))
43- }
4443 expect_equal(justHits(findBreakpointOverlaps(breakpointRanges(.testrecord(c(
4544 " chr1 100000 a N N[chr1:100100[ . . SVTYPE=BND;PARID=b" ,
4645 " chr1 100100 b N ]chr1:100000]N . . SVTYPE=BND;PARID=a" ,
@@ -84,6 +83,13 @@ test_that("findBreakpointOverlaps", {
8483 maxgap = 1 )),
8584 data.frame (queryHits = c(1 ,2 ), subjectHits = c(2 ,1 )))
8685})
86+ test_that(" findBreakpointOverlaps_match_both_sides" , {
87+ gr1 = GRanges(seqnames = " 1" , ranges = IRanges(start = c(1 , 100 ), width = 1 ), strand = " +" , partner = c(" 2" , " 1" ))
88+ names(gr1 ) = c(" 1" , " 2" )
89+ gr2 = GRanges(seqnames = " 1" , ranges = IRanges(start = c(100 , 100 ), width = 1 ), strand = " +" , partner = c(" 2" , " 1" ))
90+ names(gr2 ) = c(" 1" , " 2" )
91+ expect_equal(nrow(findBreakpointOverlaps(gr1 , gr2 , sizemargin = NULL )), 0 )
92+ })
8793
8894test_that(" findBreakpointOverlaps: delly vs truth" , {
8995 grdelly <- breakpointRanges(.testrecord(c(
0 commit comments