addMotifScore: Add motif score of anchors.

Description Usage Arguments Value Examples

Description

If each anchor region (motif) has a score as annotation column, this function adds two new columns named "score_1" and "score_2" with the scores of the first and the second anchor region, respectively. Additionally, a column named "score_min" is added with holds for each interaction the minimum of "score_1" and "score_2".

Usage

1
addMotifScore(gi, scoreColname = "score")

Arguments

gi

GInteractions.

scoreColname

Character as name the metadata column in with motif score.

Value

The same GInteractions as gi but with three additional annotation columns.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 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"
)

# add add motif score
gi <- addMotifScore(gi, scoreColname = "score")

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