Carry study-level n_sample through rss_analysis - #1395
Merged
Conversation
gwas_rss_manifest.R reads an optional n_sample column from --gwas-meta and emits it in the manifest; gwas_sumstats_construct.R adds --n-sample -> GwasSumStats(nSample=) via loadGwasSumStatsFromManifest; rss_analysis.ipynb forwards it when present. Lets a study reporting only a study-level total N (or study-level case/control) be fine-mapped without per-variant N.
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.
What
Study-level total N (
n_sample) plumbing for the RSS pipeline:gwas_rss_manifest.R— reads an optionaln_samplecolumn from--gwas-meta, carries it into the manifest.gwas_sumstats_construct.R— new--n-sampleflag → the loader manifest →GwasSumStats(nSample=).rss_analysis.ipynb— forwardsn_sampleto--n-samplewhen present (guarded liken_case/n_control).Entry construction from study scalars lives in pecotmr's
loadGwasSumStatsFromManifest, so this side is thin plumbing.Depends on
pecotmr
rss-study-n(thenSampleslot + resolution + the loader's study-scalar entry build).Testing
Against both open pecotmr PRs merged + susieR 0.16.6, real chr21 AD_Bellenguez:
construct.Rend-to-end: studyn_sample→N=study-n(487511); study c/c→effective(292500); per-variant→effective(283145); no N source→errors.generate_manifestscript.sos runwas blocked by a host r-base/r-pecotmr toolchain mismatch unrelated to this change; the generated step scripts run correctly under the r-pecotmr R.)