library(biovizBase)
# Create a missense mutations dataset in TP53
set.seed(1)
N = 25
locations = sample(7571720:7590863, size = N)
mut.df <- data.frame(chrom = "chr17",
start = locations,
end = locations,
str = "-",
fill = 1:N)
# Create a truncated plotting interval
plot.int = GRanges(seqnames = "chr17",
IRanges(start = 7576000, end = 7579000),
strand = "-")
# Obtain hg19 seqlengths data
data(hg19Ideogram, package = "biovizBase")
seqs.hg19 <- seqlengths(hg19Ideogram)
makeGR(dataFrame = mut.df, chr.col = "chrom", s.p.col = "start",
e.p.col = "end", str.col = "str", id.col = "fill",
plot.int = plot.int, show.legend = TRUE,
des.seqs = seqs.hg19)
Run the code above in your browser using DataLab