R/io.R

Defines functions read_star

Documented in read_star

#' read_star
#'
#' Reads out.tab files generated by STAR aligner.
#'
#' @param file name of STAR out.tab file.
#'
#' @export
#'
read_star <- function(file = NULL) {
  d <- read_tsv(file, col_names = FALSE, skip = 4,
    col_types = c(
      X1 = col_character(),
      X2 = col_double(),
      X3 = col_double(),
      X4 = col_double()
    )
  )
  d %>% rename(
    id = 1,
    unstranded = 2,
    fr_strand = 3,
    sr_strand = 4
  )
}
ddiez/omisc documentation built on Aug. 14, 2024, 1:19 p.m.