GeneSuite
Documentation / Technical reference

Source-package repository

The public distribution unit consists of exactly seven R source packages: gbase, gbayes, gcorr, glma, gmap, gscore, and gsea. The root gsuite package, gshare, and the complete gsolve and greml libraries are not part of this repository. The standalone mixed-model application is offered only to licensed users through separate delivery. Public package licences remain unchanged; see the distribution policy.

Users install from the conventional R repository:

options(repos = c(
  gsuite = "https://psoerensen.github.io/gtools/gsuite/repository",
  CRAN = "https://cloud.r-project.org"
))

install.packages("gbase")
install.packages(c("gbayes", "gcorr", "glma", "gmap", "gscore", "gsea"))

The repository retains earlier archives. Downloads lists the current releases from the R package index. The publisher verifies the archive names, index, and SHA-256 checksums before including the seven packages in the public snapshot.

Installing with a shared or locked R library

Start a fresh R session before loading gact, gbase, or another gsuite package. Put a personal library first, then install into that library.

lib <- path.expand("~/R/gsuite-library")
dir.create(lib, recursive = TRUE, showWarnings = FALSE)
.libPaths(c(lib, .libPaths()))

install.packages(
  "gbase",
  lib = lib,
  repos = c(
    gsuite = "https://psoerensen.github.io/gtools/gsuite/repository",
    CRAN = "https://cloud.r-project.org"
  ),
  type = "source"
)

packageVersion("gbase", lib.loc = lib)
library(gbase, lib.loc = lib)

Use a separate directory for each R environment. In later sessions, put the same library first with .libPaths(c(lib, .libPaths())) before loading packages, or configure R_LIBS_USER for the environment.

An error naming 00LOCK-gbase means the installation stopped before compilation. Another install may be active, or an earlier install may have left the lock behind. The personal-library command works with the original lock in place. If you manage the original library, remove a leftover lock only after confirming no installation is using it.

Release and development status

The installation maintenance releases of gbayes and gsea are 0.1.1.1. They preserve the numerical interfaces of the previous 0.1.1 releases. The development sources in this repository are gbayes 0.1.6 and gsea 0.1.2. Publishing documentation does not rebuild or release these source archives.

Capability Current public download Development source
gbayes::blr() from supplied cross-products Absent in gbayes 0.1.1.1 gbayes 0.1.6
gsea::blr() and gsea::set_cross_products() Absent in gsea 0.1.1.1 gsea 0.1.2, requiring gbayes 0.1.6
Direct Bayesian set preparation and new timing records Not supplied by gsea 0.1.1.1 gsea 0.1.2 with matching native libraries
MAGMA eigenvalue cutoff and revised preparation limits Not supplied by gsea 0.1.1.1 gsea 0.1.2 with matching native libraries

The native gsea changes supporting these development features are not a public release. Existing source archives are unchanged. Use packageVersion() and installed help to establish which interface is available; the ordinary public installation command above does not install these development versions.

Installing downstream workflows

For a gact installation, configure these repositories before running remotes::install_github("psoerensen/gact") (install remotes from CRAN first). gact imports gbase and provides the explicit gact::install_gsuite() helper for the full analysis installation. Loading gact never installs packages or downloads its database.

What the source packages contain

gbase builds the task-neutral gbits and gmat implementation together with bounded gsolve-core and greml-core source sets. The recipe stages gimp for native summary-statistic imputation. The gbase R interface uses ridge. The package installs the native public headers and one position-independent static archive for the task packages. The generated source manifest records the gimp revision alongside the other native sources. The cores exclude sparse direct factorization, selected inversion, CHOLMOD, oneMKL, PARDISO, and the pedigree, longitudinal, and full mixed-model surfaces.

gbayes contains its R/Rcpp layer and Bayesian native implementation. In addition to its package DLL, it installs the public headers and a second static archive needed by glma, gmap, gscore, and gsea. Those packages therefore compile only their own native implementation instead of recompiling the large Bayesian source set. gcorr needs only the gbase archive.

Every task package links the installed archives declared by its R package dependencies, so no preinstalled gsuite SDK is needed. Native files in release packages are generated from the canonical sibling repositories. They are not maintained as copied source inside this repository.

The ordinary source-build requirements are:

  • Linux or HPC: R’s configured C++17 compiler;
  • Windows: the Rtools version matching R;
  • macOS: Xcode Command Line Tools or another compiler configured for R;
  • R packages Rcpp and RcppEigen; gbase, gcorr, glma and gsea also declare BH for their Boost.Math headers.

OpenMP is used when the R toolchain supplies it and otherwise the same source build remains available without OpenMP.

gbase 0.1.9

Sparse LD reports progress per completed chromosome by default, with an update at the next completed block after 10 minutes without a message. Use progress = FALSE to silence the messages. See sparse LD progress.

gbase 0.1.8

Sparse LD for a single-BED Glist uses the BED stem in the same directory by default. Use out_prefix or ldfiles for a custom prefix and for multi-BED Glist objects. See the sparse LD file layout.

gbase 0.1.7

Full-panel gprep() creates or reopens same-stem .ext files by default. gprep(task = "subset") writes a matching .ext with each output triplet. See extended marker metadata.

Installation maintenance releases

gbase 0.1.6.1 fixes a source compilation error in the bundled gbits transpose workspace calculation. The code uses std::uint64_t for the scratch size on platforms where uint64_t and unsigned long long are distinct types. The .ext companion format and R interfaces are unchanged.

The maintenance archives and development sources read OpenMP flags directly from R’s Makeconf, including the empty setting for a serial build. Both the source-package generator and Linux binary-bundle builder avoid querying the internal flag through R CMD config. The generator preserves package-owned LinkingTo dependencies, including BH. Native gbayes uses an explicit std::uint64_t multiplier in its Gram-cache byte calculation, avoiding the Linux integer-type mismatch. The glma bridge constructs its 34 LOCO diagnostics in smaller steps so that Rcpp 1.0.12 can compile it without changing the returned fields.

The maintenance archives apply these bounded build fixes to the previous public source releases, without adding development methods. Earlier archives and frozen qualification records are retained. The reproducible maintenance recipe is tools/build/repair_public_source_repository.py; it records the bounded glma compatibility patch alongside the recipe. Run the focused generator regression checks from the gsuite root with:

Rscript --vanilla tools/validation/test_source_package_build.R

To include compilation of the complete glma bridge against an archived Rcpp header tree, set SOURCE_BUILD_TEST_RCPP_INCLUDE to its inst/include folder, SOURCE_BUILD_TEST_CXX to the C++ compiler, and SOURCE_BUILD_TEST_NATIVE_INCLUDE to the installed native public-header folder. The focused check used the official Rcpp 1.0.12 archive with SHA-256 0c7359cc43beee02761aa3df2baccede1182d29d28c9cd49964b609305062bd0; the test does not install or upgrade Rcpp.

The existing native test_variational_prediction target checks the Gram-cache caps, and the glma LOCO test checks diagnostic names and order. Compilation against pinned Rcpp headers is separate from a complete Linux/conda package installation check. Local Windows installation evidence does not establish Linux/conda or macOS qualification.

Build and qualification

From the gsuite checkout, with the canonical native repositories beside it:

Rscript --vanilla tools/build/build_source_repository.R

The command stages generated package sources, extracts source lists from the owners’ CMake declarations, builds and checks packages in dependency order, installs them into an isolated library, and writes the seven archives plus PACKAGES, PACKAGES.gz, PACKAGES.rds, and SHA256SUMS under repository/src/contrib. Release assembly requires the R package openssl to calculate SHA-256 checksums; end users do not need it unless another dependency requires it.

Use --stage-only to inspect generated source, --build-only to assemble the archives without compiling them, and --skip-check for an installation smoke build. --from=<package> resumes an interrupted ordered run. Those modes are partial validation. --only=<package> builds and checks one package using already installed compatible prerequisites in the isolated library; it leaves other release archives unchanged.

Approved contents under repository/ are tracked as release artifacts. All staging, check, object, and installation outputs remain generated and ignored. The build command itself never deploys, pushes, or changes GitHub Pages.

Release gate

Before each publication, review package versions, source-check results on release platforms, licence notices, archive contents and checksums, absence of private source, and the website wording. Running the documented website publisher copies the approved release into site/gsuite/repository in the public gtools checkout. Pushing that reviewed snapshot activates the gtools GitHub Pages deployment workflow.

For local development qualification without changing public archives or their index, use --local-only, optionally --library=ABSOLUTE_PATH and --only=gbase or --only=gcorr. The latter must follow installation of its matching gbase dependency. Generated package staging replaces only the selected package. The gcorr development source adds canonical greml GENIE source while retaining the explicitly bounded gbase native closure.

The individual-level RHE development interface requires gbase 0.1.4 and gcorr 0.1.10. These development versions bind the source-built numerical contracts; they do not change the existing downloadable releases or public index.

Compiled-code symbol evidence

The generated custom installer preserves R’s unfiltered object symbol tables as libs/<arch>/symbols.rds. Static archive producers also install their native object tables beside the archive (libgsuite_core.a.symbols.rds in gbase and libgbayes_core.a.symbols.rds in gbayes). Consumers include every table from their linked project archives, with owner-qualified names, so compiled-code checks cover archive code as well as the package’s own objects.

Ordinary source installations generate the tables through R’s own object-symbol reader when the normal check-generated file is absent and nm is available. Missing or incomplete evidence leaves the conservative DLL-level check in place; a partial table is never installed. No symbols are removed or whitelisted, no termination calls are intercepted, and compiled-code checking remains enabled. tools/validation/check_compiled_symbol_metadata.R checks complete metadata, positive detection of a direct termination reference, and the missing-dependency fallback. This build evidence does not change numerical or statistical code.