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))
  }
}
arcolombo/TxDbLite documentation built on July 10, 2020, 12:27 a.m.