R/magma_read_covar_out.R

Defines functions magma_read_covar_out

Documented in magma_read_covar_out

#' MAGMA: read gsa.out 
#' 
#' Read a gsa.out file generated by MAGMA enrichment tests.
#' 
#' @param out_prefix Out file path prefix. 
#' 
#' @keywords internal 
magma_read_covar_out <- function(out_prefix){
    path <- sprintf("%s.gsa.out", out_prefix)
    path <- get_actual_path(path)
    res <- read.table(file = fix_path(path), 
                      header = TRUE,
                      stringsAsFactors = FALSE)  
    res <- res[res$TYPE == "COVAR" & res$MODEL==1, ]
    return(res)
}
NathanSkene/MAGMA_Celltyping documentation built on Aug. 21, 2023, 8:55 a.m.