Contents
SetupLiftoverRule
Liftover setup rule
Reactive rule that ensures the Bioconductor packages required to lift
variants between genome builds are installed in the active R library. The
liftover machinery in liftover() depends on GenomicRanges, IRanges,
and rtracklayer, which are soft (Suggests) dependencies: they are not
installed with PolyGenius because they come from Bioconductor and liftover
is an optional step that many analyses never reach.
SetupLiftoverRule closes that gap inside the execution engine. Any rule
that performs a build conversion -- LiftoverReferencePanelRule and
LiftoverVariantSpaceRule -- declares a setup.liftover input, so the
engine schedules this rule first and the install happens once, on demand,
before the liftover worker runs. Because installs land in the shared
on-disk library (.libPaths()[1]), the downstream worker sees the packages
even though it runs in a separate process. The result is cached as a
resource, so subsequent runs short-circuit when the packages are present.
Bioconductor packages cannot be installed with a plain install.packages()
from the default CRAN repositories, so the rule routes the install through
BiocManager::install(), bootstrapping BiocManager itself from CRAN if it
is absent. BiocManager is referenced via getExportedValue() to keep it a
soft dependency, consistent with the rest of the package.
The requireNamespace() guard in liftover() is retained as a safety net
for callers that reach the util outside the engine (e.g. main-process model
liftover); it is not a substitute for this rule.
Details
Liftover setup rule
Super class
PolyGenius::Rule -> SetupLiftoverRule
Methods
Public methods
SetupLiftoverRule$new()SetupLiftoverRule$matches()SetupLiftoverRule$inputs()SetupLiftoverRule$requirements()SetupLiftoverRule$run()
Method new()
Create the rule.
Usage
SetupLiftoverRule$new()
Method matches()
Check whether this rule produces the requested output.
Usage
SetupLiftoverRule$matches(output.spec)
Arguments
output.spec — Output resource specification.
Returns
TRUE for a liftover output.
Method inputs()
Declare upstream inputs.
Usage
SetupLiftoverRule$inputs(output.spec)
Arguments
output.spec — Output resource specification.
Returns
An empty list; the rule has no inputs.
Method requirements()
Declare resource requirements.
Usage
SetupLiftoverRule$requirements(output.spec, inputs)
Arguments
output.spec — Output resource specification.
inputs — Bound input values.
Returns
Named list with cores and memory.
Method run()
Resolve the resource.
Usage
SetupLiftoverRule$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.
See Also
Other setup-rules:
ResolveGctbRule,
ResolvePlinkRule,
SetupBigsnprRule,
SetupPrscsRule