RunLassosum2Rule
lassosum2 model rule
Description
RunLassosum2Rule resolves one polygenius.model output for lassosum2.
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 deterministic model.
User-facing LD construction controls map onto ld.bigsnpr storage fields:
-
ld.size->window -
ld.thr->threshold
These controls affect how the upstream bigsnpr LD storage is built. They are separate from lassosum2 fitting hyperparameters such as delta and lambda.
The lassosum2 workflow fixes bigsnpr LD fields statistic = “r”, signed = TRUE, and phased = FALSE.
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
Inherited methods
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)
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.