| prepareCisPairs {sevenC} | R Documentation |
GInteractions and add
genomic features.Prepares motif pairs as GInteractions and add
genomic features.
prepareCisPairs(motifs, maxDist = 1e+06, scoreColname = "score")
motifs |
|
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. |
An GInteractions object with motif
pairs and annotations of distance, strand orientation, and motif scores.
# 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")