or.segSet {GeneR} | R Documentation |
Makes union of 2 segments sets
or.segSet(a, b = NULL,simplify=TRUE,...) unionSeg(a, b = NULL,simplify=TRUE,...)
a,b |
Elements of class segSet |
simplify |
TRUE of FALSE. If TRUE, segments are sorted, and duplicated are removed. |
... |
Unused |
an element of class segment.
Antoine Lucas
from <- c(100,75, 1 ,25,150) to <- c(110,120,30,50,170) or(as.segSet(data.frame(from,to))) ## return: ## from, to ## 1, 50 ## 75,120 ## 150,170 or.segSet(data.frame(from,to),simplify=FALSE) ## Tip to compute intergenic region ## (imagine: from = genes$start, to=genes$stop x <- or.segSet(data.frame(from,to)) start <- x[,1] stop <- x[,2] n <- length(start) intergenes <-cbind(stop[1:n-1],start[2:n]) intergenes