library(GenomicRanges)
library(IRanges)
set.seed(1)
chr_len = 100
gr = GRanges(rep(1:3, each = 10),
IRanges(start = sample.int(chr_len, 30, replace = FALSE), width = 1),
mutation = sample(c("A", "C", "G", "T"), 30, replace = TRUE))
seqlengths(gr) = rep(chr_len, 3)
p = plotRainfall(gr)
print(p)
Run the code above in your browser using DataLab