Skip to contents

Experimental · opt-in · not the default fit. This page is a roadmap. Production genomics, QTL/eQTL, broad GLLVM/omics, and CPU/GPU acceleration remain gated — it does not flip public_covered_count.

This page is a roadmap and status map. Some genomic building blocks now exist as opt-in experimental paths, while production genomics, QTL/eQTL, broad GLLVM/omics, and CPU/GPU acceleration remain gated roadmap work.

hsquared is designed to grow from a simple animal-model interface into a coherent modelling language for phenotypes, pedigrees, genotypes, QTL/eQTL, G matrices, inheritance systems, and high-dimensional traits.

The full technical plan lives in docs/design/07-genomics-qtl-gpu-plan.md. This article is the user-facing map.

Design principle

phenotype =
  fixed effects
  + pedigree/genetic effects
  + genomic marker effects
  + maternal/paternal effects
  + environment/common effects
  + latent multivariate factors
  + residual variation

The R package should keep this easy to say. The Julia package should provide the performance-oriented engine, with speed and scale treated as benchmarked claims rather than slogans.

Genomic syntax

The basic genomic GREML effect above remains an explicit route. Today it fits through an opt-in, experimental control (engine = "julia", target = "genomic"; a raw markers = M matrix and a SNP-BLUP target = "snp_blup" path are also available) — see the “Fitting models” article. The default engine = "fit" call shown here is the planned future surface.

fit <- hsquared(
  y ~ sex + batch + genomic(1 | id, Ginv = Ginv),
  data = pheno,
  family = gaussian()
)

Marker and scan syntax is planned later:

fit <- hsquared(
  y ~ sex + age +
    genomic(1 | id, Ginv = Ginv) +
    marker_scan(M, map = marker_map, leave_one_chr_out = TRUE),
  data = pheno,
  genotypes = geno,
  family = gaussian()
)

Planned backend strategy

CPU is the trusted default. GPU is an accelerator path that must be benchmarkable and numerically checked.

Planned Julia backends:

  • CPU and threaded CPU;
  • CUDA for NVIDIA GPUs;
  • Metal for Mac/Apple Silicon testing;
  • AMDGPU for ROCm systems;
  • oneAPI for Intel accelerators;
  • portable kernels where appropriate.

Planned QTL and eQTL path

The intended scan grammar is:

fit <- hsquared(
  y ~ sex + age +
    genomic(1 | id, Ginv = Ginv) +
    marker_scan(M, map = marker_map, leave_one_chr_out = TRUE),
  data = pheno,
  genotypes = geno,
  family = gaussian()
)

gwas_table(fit)
plot_manhattan(fit)
plot_qq(fit)

For expression and high-dimensional omics, the long-run plan is to combine marker scans, sample factors, and genomic relatedness:

fit <- hsquared(
  expr_matrix ~ batch + sex +
    marker_scan(M, map = marker_map) +
    sample_factors(K = 5) +
    genomic(1 | id, Ginv = Ginv),
  data = expr_data,
  genotypes = geno,
  family = gaussian()
)

The marker-scan, multi-term, and high-dimensional multivariate examples above are syntax targets only and do not fit models today. The single genomic, single-step, SNP-BLUP, and simple cbind() multivariate animal-model paths fit only opt-in and experimentally (see “Fitting models”).

Planned multivariate and GLLVM path

Classical multivariate animal models and GLLVM-style models should sit on one ladder:

fit <- hsquared(
  y ~ trait + trait:sex +
    animal(trait | id, pedigree = ped, cov = fa(K = 2)) +
    residual(trait | unit, cov = fa(K = 1)),
  data = long_dat,
  family = gaussian()
)

The same idea should later extend to response matrices, count families, ordination, latent breeding values, and high-dimensional G matrices.

Evidence gate

The package will not claim ASReml-level performance, GPU speedup, production genomic support, QTL/eQTL support, or broad GLLVM support until code, tests, docs, and validation evidence exist. Current genomic and marker-scan paths are experimental and opt-in. A separate, bounded Poisson genetic GLLVM fit is partial and opt-in.