The analysis tutorials use the standalone gsuite R packages with familiar
qgg-style arguments. gact imports gbase for shared preparation and marker-set
helpers; install_gsuite() installs the analysis packages explicitly. BLR-MAGMA in these
tutorials is
the Bayesian gene-set workflow; it is distinct from running the standalone
MAGMA executable. PoPS prioritizes genes and does not produce individual
polygenic scores. Fine-mapping and polygenic-scoring examples have different
inputs and model controls; retain the arguments and diagnostics for each run.
Successful execution alone does not establish MCMC convergence.
See the Bayesian MAGMA tutorial, PoPS tutorial, fine-mapping tutorial and polygenic-scoring tutorial for method-specific inputs and diagnostics.
See GWAS ingestion requirements, summary-statistics checking and imputation and LD resource requirements before preparing inputs.
This tutorial is designed to download and set up the gact database, which is focused on genomic associations for complex traits. The tutorial is structured into two main parts: downloading and installing the database, and then providing an overview of its contents:
Configure the source repository before installing gact. Its required gbase dependency is installed with it. Install the analysis packages with one additional call:
options(repos=c(
gsuite="https://psoerensen.github.io/gtools/gsuite/repository",
CRAN="https://cloud.r-project.org"
))
devtools::install_github("psoerensen/gact")
gact::install_gsuite()
If devtools is not installed, run
install.packages("devtools") first. The analysis packages
are gbase, gbayes, gcorr, glma, gmap, gscore and gsea. For a smaller
installation, use
gact::install_gsuite(packages=c("gbase","gcorr")). Source
packages require a C++17 toolchain; on Windows use Rtools matching your
R version. Package installation does not download the database.
The R package and database are installed separately. The default database contains annotations, markers, gene and pathway statistics, Bayesian results, ATC classifications and drug interactions. Genotype panels and LD preparation are separate workflow steps.
library(gact)
dbdir <- file.path(path.expand("~"), "gact-data")
GAlist <- gact(version = "hsa.0.0.1", dbdir = dbdir, task = "download")
# Check the existing download log before saving the database descriptor.
GAlist$downloads[, c("what", "status", "message")]
if (is.null(GAlist$downloads) || any(GAlist$downloads$status != "success")) {
stop("Some components failed; inspect the download log before proceeding.")
}
descriptor <- file.path(GAlist$dbdir, paste0("GAlist_", GAlist$version, ".rds"))
saveRDS(GAlist, descriptor)
# In a later session, load the saved descriptor without starting downloads.
GAlist <- readRDS(file.path(dbdir, "hsa.0.0.1", "GAlist_hsa.0.0.1.rds"))
Choose a new version directory for the initial download. Repeating
gact() against an existing version directory stops; it does
not resume installation. With the returned GAlist,
downloadDB(GAlist, what = "component") can retry a selected
component, which downloads that component again. Save the updated
descriptor after a successful retry. Keep the database at its original
location because the descriptor contains absolute paths.
In the recorded original setup, the basic database occupied approximately 3.04 GiB, including retained archives, and its descriptor was approximately 50 MiB. The five Zenodo components totalled approximately 2.57 GiB of transfers, with ATC and drug interactions downloaded separately. The original setup operation took 544.2 seconds (9 minutes 4 seconds) and reached a process peak working set of 2.68 GiB on Windows with an Intel Core i7-1365U, about 16 GiB RAM, and R 4.4.1. These are single-run measurements of that database snapshot, not minimum hardware requirements or guaranteed timings. Allow additional storage for the descriptor, genotype panels, LD resources and analysis outputs. Network speed and source updates can change download times and database size.
GAlist$studies
GAlist$dirs
list.dirs(GAlist$dirs, recursive = TRUE)
list.files(GAlist$dirs["marker"])
list.files(GAlist$dirs["gstat"])
list.files(GAlist$dirs["gsea"])