See overlap methods in InteractionSet package for more details on the overlap calculations: ?overlapsAny

addInteractionSupport(gi, subject, colname = "loop", ...)

Arguments

gi

GInteractions object

subject

another GInteractions object

colname

name of the new annotation column in gi.

...

additional arguments passed to overlapsAny.

Value

InteractionSet gi as input but with additional annotation column colname indicating whether each interaction is supported by subject or not.

Examples

# 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")