Contents
generate$algorithms$ClumpingThresholding
Clumping and Thresholding (C+T) algorithm specification
Declares a clumping + p-value thresholding (C+T) algorithm for
generate$models(). Nothing is fetched or clumped here; the returned
specification is resolved by the execution engine.
Usage
generate$algorithms$ClumpingThresholding(
pval,
reference.panel,
variant.space = NULL,
eaf.threshold = 0,
clump.p1 = 1e-4,
clump.r2 = 0.5,
clump.kb = 250
)Arguments
| Argument | Description |
|---|---|
pval | Numeric scalar or vector in [0, 1]. GWAS p-value threshold(s); each distinct value becomes one model. Values are sorted descending and de-duplicated; an empty vector, or any value outside [0, 1], aborts. |
reference.panel | Character scalar. Reference panel used for clumping, named as in workspace$catalogs$referencePanels$view(). |
variant.space | Character scalar or NULL (default). Variant space narrowing reference.panel: PolyGenius derives a restricted panel from the two and clumps against that. Either the display name shown by workspace$catalogs$variantSpaces$view() or the catalog key selects the same space and the same cached panel; an unknown name, or a reference.panel that is already restricted, aborts. |
eaf.threshold | Numeric scalar, default 0. Effect-allele-frequency filter applied before clumping, keeping variants with eaf.threshold <= eaf <= 1 - eaf.threshold. Any value above 0 requires an eaf column on the GWAS and aborts during execution when it is absent. |
clump.p1 | Numeric scalar, default 1e-4. PLINK --clump-p1 index-variant p-value threshold. |
clump.r2 | Numeric scalar, default 0.5. PLINK --clump-r2 LD threshold. |
clump.kb | Numeric scalar, default 250. PLINK --clump-kb clumping window, in kilobases. |
Value
A ResourceSpecSet holding one unresolved generate-algorithm
specification, for generate$models(algorithms = ). A vector pval still
yields one specification, carrying the whole threshold vector.
Details
A vector pval yields a single specification carrying the whole sorted,
de-duplicated threshold vector. The C+T rule clumps once and then emits one
model per threshold from that shared clumped set, so a threshold sweep costs
one clumping pass rather than one per threshold.
Rules behind this algorithm
ClumpVariantsRule clumps the summary statistics against the reference
panel, then ThresholdClumpedRule emits one model per pval.
Prerequisites, resolved and cached on demand: a pfile reference panel and the PLINK2 binary (ResolvePlinkRule).
Examples
models <- generate$models(
sources = generate$sources$opengwas("ieu-b-2"),
algorithms = generate$algorithms$ClumpingThresholding(
pval = c(5e-8, 1e-5, 1e-3),
reference.panel = "EUR"
)
)See Also
Other generate-algorithms:
generate-algorithms,
generate-lassosum2,
generate-ldpred2,
generate-prscs