prepareCisPairs: Prepares motif pairs as 'GInteractions' and add genomic...

Description Usage Arguments Value Examples

View source: R/interaction.R

Description

Prepares motif pairs as GInteractions and add genomic features.

Usage

1
prepareCisPairs(motifs, maxDist = 1e+06, scoreColname = "score")

Arguments

motifs

GRanges object with motif locations.

maxDist

maximal distance in base-pairs between pairs of ranges as single numeric value.

scoreColname

Character as name the metadata column in with motif score.

Value

An GInteractions object with motif pairs and annotations of distance, strand orientation, and motif scores.

Examples

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



# prepare candidates
gi <- prepareCisPairs(anchorGR)


# prepare candidates using a mimial distance of 10 bp
gi <- prepareCisPairs(anchorGR, maxDist = 10)

# prepare candidates using an alternative score value in anchors
anchorGR$myScore <- rnorm(length(anchorGR))
gi <- prepareCisPairs(anchorGR, scoreColname = "myScore")

sevenC documentation built on Nov. 8, 2020, 5:35 p.m.