PolyGenius
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

ArgumentDescription
pvalNumeric 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.panelCharacter scalar. Reference panel used for clumping, named as in workspace$catalogs$referencePanels$view().
variant.spaceCharacter 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.thresholdNumeric 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.p1Numeric scalar, default 1e-4. PLINK --clump-p1 index-variant p-value threshold.
clump.r2Numeric scalar, default 0.5. PLINK --clump-r2 LD threshold.
clump.kbNumeric 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

Aliases: generate-clumping-thresholding, generate.algorithm.ClumpingThresholding, generate$algorithms$ClumpingThresholding