View source: R/import_magma_files.r
import_magma_files | R Documentation |
Import preprocessed MAGMA SNPs-to-genes mapping files for many GWAS. These files were generated using map_snps_to_genes and are publicly available via the MAGMA_Files_Public GitHub repository. Metadata for each dataset (including trait descriptions) can be found here here.
import_magma_files(
save_dir = tempdir(),
ids = NULL,
file_types = c(".genes.out", ".genes.raw"),
overwrite = FALSE,
return_dir = TRUE,
return_tables = FALSE,
nested = FALSE,
nThread = 1,
verbose = TRUE
)
save_dir |
Parent folder where you want to save the MAGMA files. |
ids |
[Optional] OpenGWAS dataset IDs. You see metadata for the GWAS here. |
file_types |
MAGMA file types to import. Both ".genes.out" and ".genes.raw" are needed to run MAGMA.Celltyping cell-type enrichment functions |
overwrite |
If the files have already been downloaded in
the specified directory,
these downloads will be skipped. Set |
return_dir |
Return a list of unique directory names instead of the
full file paths (Default: |
return_tables |
Returns the files imported as tables ( |
nested |
Return files as a list nested by |
nThread |
Number of threads to parallelise downloads across. |
verbose |
Print messages. |
Named vector of paths to downloaded MAGMA files (or directories), or a data.table.
MAGMA_Files_Public GitHub repository
magma_dirs <- MAGMA.Celltyping::import_magma_files(ids = c("ieu-a-298"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.