
Configure MRcare Environment
configure_mrcare.RdSets up the environment for MRcare by checking for and installing PLINK, downloading reference panels from Hugging Face if needed, and saving configuration for future use. This function only needs to be run once, after which the configuration will be used automatically in subsequent MRcare analyses.
Usage
configure_mrcare(
plink_path = NULL,
ref_panel_path = NULL,
cache_dir = NULL,
force_download = FALSE,
ancestry = "EUR",
verbose = TRUE,
test_run = TRUE
)Arguments
- plink_path
Optional path to existing plink 1.9 executable. If NULL, will attempt to find plink or download if not found.
- ref_panel_path
Optional path to existing reference panel directory. If NULL, will download the reference panel from Hugging Face.
- cache_dir
Directory to store downloaded files and configuration. If NULL, will use a standard location based on the operating system.
- force_download
Whether to force re-download of resources even if they already exist. Default is FALSE.
- ancestry
Ancestry for reference panel. Options include "EUR" (European), "AFR" (African), "EAS" (East Asian), "SAS" (South Asian), and "AMR" (Admixed American).
- verbose
Whether to print detailed progress information. Default is TRUE.
- test_run
Whether to run a test to verify the configuration. Default is TRUE.
Examples
if (FALSE) { # \dontrun{
# Default configuration with European ancestry
configure_mrcare()
# Using African ancestry reference panel
configure_mrcare(ancestry = "AFR")
# Using custom plink and reference panel
configure_mrcare(
plink_path = "/path/to/your/plink",
ref_panel_path = "/path/to/your/reference/panel"
)
} # }