RunLdPred2Rule

LDpred2 model rule

Description

RunLdPred2Rule resolves one polygenius.model output for LDpred2.

Details

Reactive rule for model outputs generated by algorithm LDpred2.

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, and then runs LDpred2 in auto, grid, or inf mode.

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 LDpred2 fitting hyperparameters such as mode, h2.est, p.causal, alpha, use.MLE, and shrink.corr.

The LDpred2 workflow fixes bigsnpr LD fields statistic = “r”, signed = TRUE, and phased = FALSE.

Super class

PolyGenius::Rule -> RunLdPred2Rule

Methods

Public methods

Inherited methods

Method new()

Create the LDpred2 rule.

Usage
RunLdPred2Rule$new()

Method matches()

Check whether this rule can produce the requested output.

Usage
RunLdPred2Rule$matches(output.spec)
Arguments
output.spec

Output resource specification.

Returns

TRUE for LDpred2 model outputs.


Method inputs()

Build input specifications for this output.

Usage
RunLdPred2Rule$inputs(output.spec)
Arguments
output.spec

Output resource specification.

Returns

Named list with gwas and deferred ld input.


Method bind()

Bind LD storage input after GWAS build is known.

Usage
RunLdPred2Rule$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
RunLdPred2Rule$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 LDpred2 model construction.

Usage
RunLdPred2Rule$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 with data, meta, and logs.


Method clone()

The objects of this class are cloneable with this method.

Usage
RunLdPred2Rule$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.