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.
Parent folder where you want to save the MAGMA files.
[Optional] OpenGWAS dataset IDs. You see metadata for the GWAS here.
MAGMA file types to import. Both ".genes.out" and ".genes.raw" are needed to run MAGMA.Celltyping cell-type enrichment functions
If the files have already been downloaded in
the specified directory,
these downloads will be skipped. Set overwrite=TRUE
to force
them to be re-downloaded (Default: FALSE
).
Return a list of unique directory names instead of the
full file paths (Default: TRUE
).
Returns the files imported as tables (TRUE
),
instead of as paths (default: FALSE
).
Overrides return_dir
argument.
Return files as a list nested by id
(default: FALSE
).
Number of threads to parallelise downloads across.
Print messages.
Named vector of paths to downloaded MAGMA files (or directories), or a data.table.
magma_dirs <- MAGMA.Celltyping::import_magma_files(ids = c("ieu-a-298"))
#> Using built-in example files: ieu-a-298.tsv.gz.35UP.10DOWN
#> Returning MAGMA directories.