library(GenomicRanges)
txdf <- data.frame(TXCHROM=c("1","1","2"),
GENEID=c("101","102","102"))
ebg <- GRangesList(GRanges("1",IRanges(c(100,200),width=50)),
GRanges(c("1","2"),IRanges(c(400,100),width=50)))
names(ebg) <- c("101","102")
splitGenesAcrossChroms(ebg, txdf)
Run the code above in your browser using DataLab