#' @export
tibble_makeGenomicRanges <- function(tbl) {
tbl %>%
GenomicRanges::makeGRangesFromDataFrame(start.field = "pos", end.field = "pos", keep.extra.columns = TRUE)
}
#' @export
tibble_subsetByOverlaps <- function(range_1, range_2) {
IRanges::subsetByOverlaps(range_1, range_2) %>%
tibble::as_tibble() %>%
dplyr::rename("chr" = "seqnames", "pos" = "start") %>%
dplyr::select(chr, pos, end)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.