Contents
RunLassosum2Rule
lassosum2 model rule
RunLassosum2Rule resolves lassosum2 polygenius.model outputs.
Details
Reactive rule for model outputs generated by algorithm lassosum2.
The rule requests GWAS input at required pval.max, binds an ld.bigsnpr
storage resource for the matched panel/build, matches GWAS variants to that
storage in-process, runs lassosum2, and returns one dynamic model output
for each candidate effect-size column returned by bigsnpr.
User-facing LD construction controls map onto ld.bigsnpr storage fields:
ld.size->windowld.thr->threshold
These controls affect how the upstream bigsnpr LD storage is built. They are
separate from native lassosum2 fitting arguments. Native fitting arguments are
forwarded by name to bigsnpr::snp_lassosum2() when supported by the
installed bigsnpr version. Missing arguments use the private function
defaults, which mirror bigsnpr defaults.
The bigsnpr tutorial treats the returned lassosum2 matrix as a grid of candidate models and chooses among columns using prediction performance in a validation set. This rule does not receive validation genotypes or outcomes, so validation-set choice is left to downstream evaluation workflows.
Super class
PolyGenius::Rule -> RunLassosum2Rule
Methods
Public methods
RunLassosum2Rule$new()RunLassosum2Rule$matches()RunLassosum2Rule$inputs()RunLassosum2Rule$bind()RunLassosum2Rule$requirements()RunLassosum2Rule$run()RunLassosum2Rule$clone()
Method new()
Create the lassosum2 rule.
Usage
RunLassosum2Rule$new()
Method matches()
Check whether this rule can produce the requested output.
Usage
RunLassosum2Rule$matches(output.spec)
Arguments
output.spec — Output resource specification.
Returns
TRUE for lassosum2 model outputs.
Method inputs()
Build input specifications for this output.
Usage
RunLassosum2Rule$inputs(output.spec)
Arguments
output.spec — Output resource specification.
Returns
Named list with required GWAS input and deferred LD input.
Method bind()
Bind LD storage input after GWAS build is known.
Usage
RunLassosum2Rule$bind(inputs, store, output.spec = NULL)
Arguments
inputs — Named list of input specifications.
store — Resource store.
output.spec — Output resource specification.
Returns
Updated named list of inputs.
Method requirements()
Declare resource requirements for this rule.
Usage
RunLassosum2Rule$requirements(output.spec, inputs)
Arguments
output.spec — Output resource specification.
inputs — Bound input values/specifications.
Returns
Named list with cores and memory.
Method run()
Execute lassosum2 model construction.
Usage
RunLassosum2Rule$run(output.spec, inputs, logger = pg.logger())
Arguments
output.spec — Output resource specification.
inputs — Named list of bound input values.
logger — Rule logger.
Returns
Rule result list.
Method clone()
The objects of this class are cloneable with this method.
Usage
RunLassosum2Rule$clone(deep = FALSE)
Arguments
deep — Whether to make a deep clone.
See Also
Other algorithm-rules:
BuildLDBigsnprRule,
BuildLDBlocksRule,
ClumpVariantsRule,
RunLdPred2Rule,
RunPrscsRule,
ThresholdClumpedRule