Description Usage Arguments Value Examples
View source: R/genomicPairAply.R
This function returns a vector with the resulting functin call for each pair..
1 | applyToCisPairs(gp, rangesGR, datamat, fun = cor)
|
gp |
data.frame of pairs of genomic ranges. First two columns hold
indices of the range in |
rangesGR |
GenomicRanges object with all ranges used in |
datamat |
a matrix of with data values associated to each rang in
|
fun |
A function that takes two numeric vectors as imput to compute a
summary statsitic. Default is |
A Numeric vector
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | rangesGR <- GRanges(
rep(c("chr1", "chr2"), c(3,2)),
IRanges(
c(100, 200, 300, 100, 200),
c(150, 250, 350, 150, 250)
))
gp <- data.frame(
g1=c(1,4,2,1,4),
g2=c(2,4,3,3,5)
)
datamat <- rbind(
c(10, 20, 30),
c(15, 26, 40),
c(100, 2, 0),
c(10, 20, 30),
c(15, 26, 40)
)
applyToCisPairs(gp, rangesGR, datamat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.