R/load_annotation.R

Defines functions load_annotation

Documented in load_annotation

#' Load annotation
#'
#' @param fname (char) fname is the path for the gtf file
#'
#' @return A dataframe in which are selected only gene_id and gene_name column
#' @export
#'
#' @examples load_annotation("$params.gtf")
load_annotation <- function(fname) {
  fname |>
    rtracklayer::import() |>
    base::as.data.frame() |>
    dplyr::select(gene_id, gene_name) |>
    dplyr::distinct()
}
giusmar/tigem documentation built on Feb. 7, 2022, 8 p.m.