Arguments
- object
An
hsquared_fitorhs_gwasobject.- type
Which figure to draw (see Details).
- ...
Figure-specific options passed through:
low_h2(the genetic-correlation heatmap flags off-diagonal cells involving a trait withh^2 < low_h2as imprecise; default0.1),at/n(the reaction-norm covariate evaluation points), andcorrelation(rr_surface: draw the genetic-correlation surface instead of the covariance surface).
Details
autoplot() methods render the quantitative-genetic results an
hsquared_fit (or a gwas() scan) carries as ggplot2 objects, in the
style of the brms/bayesplot ecosystem and consistent with the sister
packages drmTMB/gllvmTMB. They are uncertainty-first: where the fit
carries the experimental standard errors / reliabilities, the figures show
them (clearly labelled experimental and asymptotic).
Available types for autoplot.hsquared_fit():
"variance"(default) – a horizontal forest of the variance components and per-traith^2, each with approximate 95% intervals (+/- 1.96 * SE) when the fit carries the experimental standard errors."breeding_values"– a sorted caterpillar of the estimated breeding values, with+/- 1.96 * sqrt(PEV)bands when prediction error variances are available, faceted by trait for multivariate fits."g_matrix"– a rotation-invariant genetic-correlation heatmap of the estimatedGfor multivariate fits (correlations are invariant to the factor rotation; raw loadings are never plotted – the ratified cross-lane convention). Off-diagonal cells involving a low-h^2trait are flagged as imprecise (thresholdlow_h2, default0.1)."g_geometry"– a scree of the rotation-invariant genetic eigenstructure (eigenvalues = variance per genetic axis, with percent variance explained) for multivariate fits. Axis directions / loadings are never drawn (rotation-arbitrary; span-ambiguous under repeated eigenvalues)."reaction_norm"– for random-regression fits, the genetic-variance and heritability trajectories across the covariate (faceted). The heritability trajectory carries the same caveat asrr_heritability(): with a homogeneous residual and no permanent-environment term it can overstateh^2(t)for repeated-records designs."rr_eigenfunctions"– for random-regression fits, the rotation-invariant eigenfunctionspsi_j(t)ofK_gas covariate functions (faceted by axis, labelled by percent genetic variance). Signs are arbitrary and the curves are span-ambiguous under repeated eigenvalues (do not over-read)."rr_surface"– for random-regression fits, the genetic covariance surfaceS(s, t) = phi(s)' K_g phi(t)over the covariate grid as a heatmap (passcorrelation = TRUEfor the genetic-correlation surface). Supplied-K_gdescriptive.
autoplot() on a gwas() scan (hs_gwas) draws type = "manhattan"
(default) or type = "qq" (observed vs expected -log10(p) with a y = x
null and the genomic-inflation lambda_GC as a diagnostic). Both carry the
EXPERIMENTAL, NOT-genome-wide-calibrated caveat. The Julia lane has a
fixed-panel calibration smoke harness, but R significance thresholds are not
activated.
The figure helpers are deliberately modular (each takes a tidy data frame and
returns a ggplot) so they can be factored into a shared visualization
package later.