R/run_bgzip_rsamtools.R

Defines functions run_bgzip_rsamtools

Documented in run_bgzip_rsamtools

#' Run bgzip: Rsamtools
#' 
#' Support function for \link[echotabix]{run_bgzip}.
#' @inheritParams run_bgzip
#' @keywords internal 
run_bgzip_rsamtools <- function(target_path,
                                bgz_file,
                                force_new=TRUE,
                                verbose=TRUE){ 
    requireNamespace("Rsamtools")
    messager("bgzipping file with Rsamtools.", v = verbose) 
    bgz_file <- Rsamtools::bgzip(file = target_path, 
                                 dest = bgz_file,
                                 overwrite = force_new)
    return(bgz_file)
}
RajLabMSSM/echotabix documentation built on Nov. 21, 2023, 8:02 a.m.