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)
}
neurogenomics/MAGMA_Celltyping documentation built on Oct. 12, 2024, 12:36 a.m.