#' Intron Tracker
#'
#' Determines the region of a single chromosome that contains introns
#' @param chr the chromosome whose exonic and in turn intronic regions we are determining
#' @return a dataframe with the loction of the introns for the given chromosome
#' @import TxDb.Hsapiens.UCSC.hg19.knownGene
#' @import ggbio
#' @import GenomeInfoDb
#' @import GenomicFeatures
#' @export
intron_tracker <- function(chr) {
genome = TxDb.Hsapiens.UCSC.hg19.knownGene
#to test use "chr17"
seqlevels(genome) <- chr
ex <- exons(genome)
ex <- as.data.frame(ex)
temp1 <- head(ex["end"], -1)
temp2 <- tail(ex["start"], -1)
return(data.frame("start" = temp1, "end" = temp2))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.