#construct data.frame object
AA <- c("A", "C", "D", "E", "F", "G", "H", "I", "K", "L", "M", "N", "P",
"Q","R", "S", "T", "V", "W", "Y")
starts <- seq(1, 30, 3)
ends <- starts + 14
peptides <- sapply(1:10, function(x) {
paste0(AA[floor(runif(15, 1, 20))], collapse = "")
})
data <- data.frame(start = starts, end = ends, peptide = peptides)
#from data.frame
new_pep <- create_db(data)
#from GRanges
new_pep <- create_db(new_pep)
Run the code above in your browser using DataLab