R/indexIfNoneFound.R

Defines functions indexIfNoneFound

Documented in indexIfNoneFound

#' helper function for findDupes
#' 
#' @param fastaFile   the name of the FASTA file
#' @importFrom Rsamtools indexFa
#' @return   the index invisibly
#' 
#' @export
indexIfNoneFound <- function(fastaFile) {
  if (!file.exists(paste0(fastaFile, ".fai"))) {
    message("Indexing ", fastaFile, " to extract sequence names...")
    invisible(indexFa(fastaFile))
  }
}
RamsinghLab/TxDbLite documentation built on March 14, 2021, 10:49 a.m.