## constructing a Genome_intervals object
G <- GenomeIntervals(start=c(1,3,4,5,8,10), end=c(5,5,6,8,9,11),
chromosome=rep(c("chr2","chrX","chr1"), each=2),
leftOpen=rep(c(FALSE, FALSE, TRUE), 2))
show(G)
## constructing a Genome_intervals_stranded object with
## additional interval annotation
GS <- GenomeIntervals(start=c(1,3,4,5,8,10), end=c(5,5,6,8,9,11),
chromosome=rep(c("chr2","chrX","chr1"), each=2),
strand=c("-","-","+","+","+","+"),
GC.content=round(runif(6), digits=2))
show(GS)
Run the code above in your browser using DataLab