staar: ld-prune subcommand for LD pruning on conditional p-values#129
Merged
staar: ld-prune subcommand for LD pruning on conditional p-values#129
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.