PolyGenius
Contents

RunPrscsRule

PRS-CS model rule

RunPrscsRule resolves one polygenius.model output for PRS-CS.

Details

Reactive rule for model outputs generated by algorithm PRScs.

The rule requests GWAS input, binds an ld.blocks storage resource for the matched panel/build, writes neutral PRS-CS summary statistics and BIM inputs, runs the package Python wrapper, and converts posterior effects back into a PGS.

PRS-CS itself performs the GWAS/reference/validation intersection. The ld.blocks resource is therefore built on the full effective reference panel and not on a GWAS-specific subset. The LD resource identity contains only the concrete PRS-CS reference panel, genome build, and PRS-CS block size; fixed LD semantics such as signed correlation blocks are implied by the ld.blocks resource type.

Super class

PolyGenius::Rule -> RunPrscsRule

Methods

Public methods

  • RunPrscsRule$new()
  • RunPrscsRule$matches()
  • RunPrscsRule$inputs()
  • RunPrscsRule$bind()
  • RunPrscsRule$requirements()
  • RunPrscsRule$run()
  • RunPrscsRule$clone()

Method new()

Create the PRS-CS rule.

Usage

RunPrscsRule$new()

Method matches()

Check whether this rule can produce the requested output.

Usage

RunPrscsRule$matches(output.spec)

Arguments

output.spec — Output resource specification.

Returns

TRUE for PRScs model outputs.

Method inputs()

Build input specifications for this output.

Usage

RunPrscsRule$inputs(output.spec)

Arguments

output.spec — Output resource specification.

Returns

Named list with gwas and deferred ld input.

Method bind()

Bind PRS-CS LD storage input after GWAS build is known.

Usage

RunPrscsRule$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

RunPrscsRule$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 PRS-CS model construction.

Usage

RunPrscsRule$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

RunPrscsRule$clone(deep = FALSE)

Arguments

deep — Whether to make a deep clone.

See Also