See overlap methods in InteractionSet
package for more details
on the overlap calculations: ?overlapsAny
addInteractionSupport(gi, subject, colname = "loop", ...)
gi |
|
---|---|
subject | another |
colname | name of the new annotation column in |
... | additional arguments passed to |
InteractionSet
gi
as input but with additional
annotation column colname
indicating whether each interaction
is supported by subject
or not.
# build example GRanges as anchors anchorGR <- GRanges( rep("chr1", 4), IRanges( c(1, 5, 20, 14), c(4, 8, 23, 17) ), strand = c("+", "+", "+", "-"), score = c(5, 4, 6, 7) ) # build example GIntreaction object gi <- GInteractions( c(1, 2, 2), c(4, 3, 4), anchorGR, mode = "strict" ) # build exapple support GInteractions object exampleSupport <- GInteractions( GRanges("chr1", IRanges(1, 4)), GRanges("chr1", IRanges(15, 20)) ) # add support gi <- addInteractionSupport(gi, subject = exampleSupport) # Use colname argument to add support to differnt metadata column name gi <- addInteractionSupport(gi, subject = exampleSupport, colname = "example")