addInteractionSupport: Add column to 'GInteractions' with overlap support.

Description Usage Arguments Value Examples

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# 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")

ibn-salem/sevenC documentation built on May 17, 2019, 11:16 p.m.