Skip to content

staar: ld-prune subcommand for LD pruning on conditional p-values#129

Merged
vineetver merged 1 commit intomasterfrom
staar/103-ld-prune
Apr 16, 2026
Merged

staar: ld-prune subcommand for LD pruning on conditional p-values#129
vineetver merged 1 commit intomasterfrom
staar/103-ld-prune

Conversation

@vineetver
Copy link
Copy Markdown
Owner

Forward-selection LD pruning over a candidate variant list using score-test p-values conditional on the growing known-loci set. Follows STAARpipeline R/LD_pruning.R:146-185. Each iteration refits the null via augment_covariates, rescores the remaining candidates under the refit, and stops when the best conditional p falls above --cond-p-thresh.

Single-trait gaussian unrelated path only. Binary and kinship-aware nulls are out of scope here; those land with the broader kinship-in-conditional work.

src/staar/ld_prune.rs holds the core loop and four unit tests (trivial, perfectly collinear partner drops out, orthogonal signals both survive, empty input). src/commands/ld_prune.rs wires the CLI surface, parses the candidates file (tab- or colon-delimited CHR POS REF ALT), and writes a TSV with an entry_log10p column recording the p-value at which each variant entered the pruned set.

Closes #103.

Forward selection over a candidate variant list using score-test p-values
conditional on the growing known-loci set, mirroring STAARpipeline
R/LD_pruning.R:146-185. Each iteration refits the null via
augment_covariates at src/staar/pipeline.rs:581-588, rescores remaining
candidates under the refit null, and stops when the best conditional p
falls above --cond-p-thresh.

Single-trait gaussian unrelated path only; binary and kinship-aware
nulls reject at callsite. Adds src/staar/ld_prune.rs (core loop, four
unit tests over synthetic carrier lists covering trivial, collinear,
orthogonal, and empty cases) and src/commands/ld_prune.rs (CLI surface,
candidates-file parser for tab or colon delimited rows, TSV output).
@vineetver vineetver merged commit d77e957 into master Apr 16, 2026
3 checks passed
@vineetver vineetver deleted the staar/103-ld-prune branch April 16, 2026 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LD pruning step for known-loci selection (pre-conditional)

1 participant