GIoperator: GInteractions operator

View source: R/GIoperator.R

GIoperatorR Documentation

GInteractions operator

Description

GInteractions operations (add, aubtract, multiply, divide)

Usage

GIoperator(gi_list, col = "score", operator = c("+", "-", "*", "/"))

Arguments

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.

Value

an object of GInteractions

Examples

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

jianhong/trackViewer documentation built on Dec. 10, 2024, 10:33 a.m.