GIoperator | R Documentation |
GInteractions operations (add, aubtract, multiply, divide)
GIoperator(gi_list, col = "score", operator = c("+", "-", "*", "/"))
gi_list |
a list of GInteractions objects |
col |
colname of metadata to be calculated |
operator |
operator, "+" means A + B, and so on. User-defined function also could be used. |
an object of GInteractions
library(InteractionSet)
gr2 <- GRanges(seqnames=c("chr1", "chr1"),
ranges=IRanges(c(7,13), width=3))
gr3 <- GRanges(seqnames=c("chr1", "chr1"),
ranges=IRanges(c(1, 4), c(3, 9)))
gi <- GInteractions(gr2, gr3, score=c(1, 2))
gi2 <- GInteractions(gr2, gr3, score=c(3, 4))
GIoperator(list(gi, gi2), col="score", operator="+")
GIoperator(list(gi, gi2), col="score", operator="-")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.