#' Read a \emph{.genes.out} file
#'
#' Read a \emph{.genes.out} file generated by
#' \link[MAGMA.Celltyping]{map_snps_to_genes}
#' as a \link[data.table]{data.table}.
#' @param path Path to a MAGMA \emph{.genes.out} file.
#' @param verbose Print messages.
#' @returns \link[data.table]{data.table}
#'
#' @keywords internal
#' @importFrom data.table fread setnames :=
read_magma_genes_out <- function(path,
verbose = TRUE){
entrez <- NULL;
messager("Importing genes.out file.",v=verbose)
magma <- data.table::fread(path)
data.table::setnames(magma,"GENE","entrez")
magma[,entrez:=as.character(entrez)]
magma <- merge(
x = magma,
y = MAGMA.Celltyping::hgnc2entrez_orthogene,
by = "entrez"
)
return(magma)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.