Closed dpolychr closed 8 years ago
library(GenomicRanges) firstGRange <- GRanges(seqnames=c("chr1", "chr1", "chr2", "chr2", "chr5"), ranges=IRanges(start=c(1, 20, 2, 3, 1), end=c(10, 25, 10, 10, 10)), strand="+") lastGRange <- GRanges(seqnames=c("chr15", "chr10", "chr10", "chr10", "chr15"), ranges=IRanges(start=c(1, 25, 50, 51, 5), end=c(8, 40, 55, 60, 10)), strand="+") cne12 <- GRangePairs(firstGRange[1:3], lastGRange[1:3]) cne21 <- GRangePairs(lastGRange[4:5], firstGRange[4:5])
cneMerge(cne12, cne21)
fix by 5f9494beedd9fd5cf6c64221a06b0fa5381ccfbc
library(GenomicRanges) firstGRange <- GRanges(seqnames=c("chr1", "chr1", "chr2", "chr2", "chr5"), ranges=IRanges(start=c(1, 20, 2, 3, 1), end=c(10, 25, 10, 10, 10)), strand="+") lastGRange <- GRanges(seqnames=c("chr15", "chr10", "chr10", "chr10", "chr15"), ranges=IRanges(start=c(1, 25, 50, 51, 5), end=c(8, 40, 55, 60, 10)), strand="+") cne12 <- GRangePairs(firstGRange[1:3], lastGRange[1:3]) cne21 <- GRangePairs(lastGRange[4:5], firstGRange[4:5])
GRangePairs, GRangePairs
cneMerge(cne12, cne21)