R/loadChromFile.R

Defines functions loadChromFile

Documented in loadChromFile

#' @title Load chromosomes sizes file
#' @author Zacharie Menetrier
#' @description Load preloaded chromosome sizes files.
#'
#' @param genome The name of the species to import the chromosomes from.
#'
#' @return The path to a file that contains the chromosome lengths.
#'
#' @usage loadChromFile <- function(genome)
#'
#' @examples
#' hg19ChromFile <- loadChromFile("hg19")
#'
#' @export
loadChromFile <- function(genome) {
  file <- system.file("inst/extdata", paste(genome, ".genome", sep = ""),
                      package = "forkedTF")
  if(file == "")
    stop("No chromosome sizes found for ", genome)
  return(file)
}
rtmag/forkedTF documentation built on Nov. 5, 2021, 10 a.m.