Contents
LoadLocalGWASRule
Local GWAS load rule
LoadLocalGWASRule resolves a local GWAS request into one
gwas.sumstats resource.
Details
Reactive rule that materializes gwas.sumstats resources from local GWAS
data provided in request metadata.
Execution logic:
- reads
gwas,metadata, andpval.maxfrom request metadata; - evaluates
gwaswhen provided as a function; - drops variants with no usable coordinate and records the count;
- validates presence and wraps data in
PGS; - returns normalized metadata for cache/index tracking.
Super class
PolyGenius::Rule -> LoadLocalGWASRule
Methods
Public methods
LoadLocalGWASRule$new()LoadLocalGWASRule$matches()LoadLocalGWASRule$inputs()LoadLocalGWASRule$requirements()LoadLocalGWASRule$run()LoadLocalGWASRule$clone()
Method new()
Create the local GWAS load rule.
Usage
LoadLocalGWASRule$new()
Method matches()
Check whether this rule can produce the requested output.
Usage
LoadLocalGWASRule$matches(output.spec)
Arguments
output.spec — Output resource specification.
Returns
TRUE for local gwas.sumstats outputs.
Method inputs()
Build rule input specifications.
Usage
LoadLocalGWASRule$inputs(output.spec)
Arguments
output.spec — Output resource specification.
Returns
Empty named list; local source details live on output.spec.
Method requirements()
Declare resource requirements for this rule.
Usage
LoadLocalGWASRule$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 local GWAS materialization for one request.
Usage
LoadLocalGWASRule$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 with data, meta, and logs.
Method clone()
The objects of this class are cloneable with this method.
Usage
LoadLocalGWASRule$clone(deep = FALSE)
Arguments
deep — Whether to make a deep clone.
See Also
Other source-rules:
FetchGWASCatalogRule,
FetchOpenGWASRule,
FetchPGSCatalogRule