addMotifScore {sevenC} | R Documentation

## Add motif score of anchors.

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

    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

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

[Package sevenC version 1.12.0 Index]