This function takes a linkSet object and counts the number of interactions for each bait and other end.
Usage
countInteractions(x, baitRegions = TRUE)
# S4 method for class 'linkSet'
countInteractions(x, baitRegions = TRUE)
Examples
data(linkExample)
linkSet = c(linkExample,linkExample)
linkSet = countInteractions(linkSet)
linkSet
#> linkSet object with 5 interactions and 2 metadata columns:
#> bait seqnames_oe ranges_oe | anchor1.symbol count
#> <character> <Rle> <IRanges> | <character> <integer>
#> [1] Gene1 --- chr1 50-59 | Gene1 2
#> [2] Gene1 --- chr2 150-159 | Gene1 2
#> [3] Gene2 --- chr2 250-259 | Gene2 2
#> [4] Gene3 --- chr4 350-359 | Gene3 2
#> [5] Gene3 --- chr4 450-459 | Gene3 2
#> -------
#> regions: 10 ranges and 0 metadata columns
#> seqinfo: 4 sequences from an unspecified genome; no seqlengths