#' @import GenomicRanges
#' @import GenomeInfoDb
genomic.distance <- function(snv) {
# calculate the genetic distance of SNVs
pos <- c(0, start(snv))
length(pos) <- length(pos) - 1
imd <- start(snv) - pos
idx <- start(seqnames(snv))
imd[idx] = -1
imd
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.