[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EBN6CAWB83R045E018RGZC":3,"skill-same:01M7EBN6CAWB83R045E018RGZC":80},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":14,"repositoryHtmlUrl":33,"repositoryHomepageUrl":33,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":49},"01M7EBN6CAWB83R045E018RGZC","bio-causal-genomics-fine-mapping",null,"Resolves GWAS associations to candidate causal variants and credible sets via SuSiE, susie_rss, FINEMAP, CAVIAR, DAP-G, PAINTOR, PolyFun, SuSiEx, MultiSuSiE, and FOCUS. Use when narrowing a GWAS lead SNP to a 95 percent credible set, choosing between in-sample and reference LD, calibrating non-sparse loci with SuSiE-inf or FINEMAP-inf, integrating functional priors via PolyFun, fine-mapping across ancestries with SuSiEx, diagnosing LD mismatch via estimate_s_rss and kriging_rss, handling HLA or long-range LD, or feeding credible sets into coloc.susie for colocalization.","Mr-Nobody-Anonymous\u002FAll-skills","Mr-Nobody-Anonymous","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F184253119?v=4","01M7AEXFJHKTYQW5R0ZCQQTWFV","anonymous","01M7C00M3GQR4QKP9GZA42GFAK",0,"MIT","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-causal-genomics-fine-mapping\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bio-causal-genomics-fine-mapping\ndescription: Resolves GWAS associations to candidate causal variants and credible sets via SuSiE, susie_rss, FINEMAP, CAVIAR, DAP-G, PAINTOR, PolyFun, SuSiEx, MultiSuSiE, and FOCUS. Use when narrowing a GWAS lead SNP to a 95 percent credible set, choosing between in-sample and reference LD, calibrating non-sparse loci with SuSiE-inf or FINEMAP-inf, integrating functional priors via PolyFun, fine-mapping across ancestries with SuSiEx, diagnosing LD mismatch via estimate_s_rss and kriging_rss, handling HLA or long-range LD, or feeding credible sets into coloc.susie for colocalization.\ntool_type: r\nprimary_tool: susieR\nsource: \"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills\"\nsource_repository: \"GPTomics\u002FbioSkills\"\nsource_path: \"causal-genomics\u002Ffine-mapping\u002FSKILL.md\"\nlicense: \"MIT\"\nimported_at: \"2026-09-20\"\n---\n\n## Version Compatibility\n\nReference examples tested with: susieR 0.12.27+, coloc 5.2.3+, FINEMAP 1.4.2+, PolyFun (head of `omerwe\u002Fpolyfun` 2024), PAINTOR V3.0, SuSiEx (head of `getian107\u002FSuSiEx`), DAP-G (head of `xqwen\u002Fdap`), pyfocus 0.8+, R 4.3+, PLINK 1.9 \u002F 2.0.\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- R: `packageVersion('susieR')` then `?susie_rss` to confirm argument names (e.g., `prior_weights` vs `prior_variance` semantics)\n- CLI: `finemap --help`, `SuSiEx --help`, `PAINTOR --help`, `dap-g --help` to confirm flags\n- Python: `polyfun.py --help`\n\nIf a call throws an error about an argument that no longer exists, introspect the installed function and adapt rather than retrying.\n\n# Fine-Mapping\n\n**\"Narrow my GWAS locus to the variants likely to be causal\"** -> Fit a sparse Bayesian regression that propagates LD into posterior inclusion probabilities (PIPs) and credible sets, then validate that credible sets correspond to physically reasonable haplotypes given the LD reference.\n\n- R (summary statistics + LD): `susieR::susie_rss(z, R, n, L=10)` + `estimate_s_rss` LD diagnostic\n- R (individual-level genotypes): `susieR::susie(X, y, L=10)`\n- CLI (shotgun stochastic search): `finemap --sss --in-files master.z --n-causal-snps 5 --prob-tol 0.001`\n- CLI (cross-ancestry joint): `SuSiEx --sst_file=eur.sst,eas.sst --n_gwas=N1,N2 --ref_file=eur.bim,eas.bim --ld_file=eur_ld,eas_ld --chr_col=1,1 --snp_col=2,2 --bp_col=3,3 --a1_col=4,4 --a2_col=5,5 --eff_col=6,6 --se_col=7,7 --pval_col=8,8 --chr=\u003Cchr> --bp=\u003Cstart,end> --out_dir=\u003Cdir> --out_name=\u003Cname>` (column-number flags and `--ld_file` are required; populations are assigned by the ORDER of the comma-separated `--sst_file`\u002F`--n_gwas`\u002F`--ref_file`\u002F`--ld_file` lists, not a `--pop` flag; see `SuSiEx --help`)\n- Python (functional priors): `polyfun.py --compute-h2-L2` -> per-SNP priors -> susie_rss with `prior_weights=`\n- Python (TWAS fine-mapping): `focus finemap` on gene-level Z-scores\n\nFine-mapping is a Bayesian model selection problem; LD is not noise but structured prior information. Most failure modes trace back to one of three issues: (a) LD reference mismatched to the GWAS sample; (b) the sparse-effects prior being wrong for the locus (polygenic background); or (c) too small an L cap. The `estimate_s_rss()` lambda and `kriging_rss()` per-SNP diagnostic catch (a) before downstream credible sets are reported.\n\n## Algorithmic Taxonomy\n\n| Tool | Model | Input | Strength | Fails when |\n|------|-------|-------|----------|------------|\n| SuSiE \u002F susie_rss (Wang 2020 JRSSB 82:1273; Zou 2022 PLoS Genet) | Iterative Bayesian sum-of-single-effects (IBSS), variational | Individual-level (X, y) or (z, R, n) | Fast; native PIP + credible sets; pluggable priors; default in modern pipelines | Reference LD mismatched to GWAS sample; locus dominated by polygenic background; >L true effects |\n| SuSiE-inf \u002F FINEMAP-inf (Cui 2024 Nat Genet 56:162) | SuSiE + infinitesimal random-effect component | (z, R, n) | Calibrated credible sets when locus is non-sparse (polygenic shoulder around a sparse causal); recommended for biobank-scale GWAS | Very small loci with truly sparse architecture (over-conservative); slower convergence |\n| FINEMAP (Benner 2016 Bioinformatics 32:1493) | Shotgun stochastic search over causal configurations | .z + .ld + .master files | Exact Bayes factors at small k; widely cited | Slow at L > 5; binary install only (christianbenner.com); same LD-mismatch fragility as SuSiE |\n| CAVIAR (Hormozdiari 2014 Genetics 198:497) | Exhaustive enumeration up to k causals | (z, R) | Exact posterior at small k | Combinatorial explosion beyond k=6; legacy method largely superseded by SuSiE |\n| DAP-G (Wen 2016 AJHG 98:1114) | Deterministic posterior approximation with adaptive scan | SBAMS format; TORUS for enrichment priors | Fast at QTL scale (whole-transcriptome); pairs with TORUS hierarchical priors | SBAMS format is awkward; less ubiquitous tooling |\n| PAINTOR (Kichaev 2014 PLoS Genet 10:e1004722) | EM with binary functional annotations | (z, R, A) per locus | Locus-level functional priors; multi-trait variant | Single-trait mode often matched by PolyFun + SuSiE; slower than SuSiE |\n| PolyFun + SuSiE\u002FFINEMAP (Weissbrod 2020 Nat Genet 52:1355) | Stratified LDSC genome-wide -> per-SNP prior_weights | GWAS sumstats + pre-baked baseline-LF | Most powerful single-trait functional prior; >20% more high-PIP (PIP>0.95) variants in simulations, >32% in real UK Biobank traits (Weissbrod 2020) | Requires matched-ancestry baseline-LF; runs in two stages |\n| SuSiEx (Yuan 2024 Nat Genet 56:1841) | Joint cross-ancestry SuSiE; shared causal, population-specific LD | Per-pop sumstats + per-pop LD reference | Smaller credible sets than per-ancestry meta or marginal fine-mapping; principled when causal variants are shared | Trans-ethnic heterogeneity violated (population-specific causals); ancestry must be cleanly assigned |\n| MultiSuSiE (Rossen 2025 Nat Genet) | Cross-ancestry SuSiE variant; flexible heterogeneity | Per-pop sumstats + per-pop LD | Similar to SuSiEx; alternative implementation | Same as SuSiEx; newer, less battle-tested |\n| FOCUS \u002F MA-FOCUS (Mancuso 2019 Nat Genet 51:675) | Probabilistic TWAS fine-mapping over gene models | TWAS Z-scores + gene LD (predicted expression) | Identifies likely causal gene among co-regulated TWAS hits; cross-ancestry MA-FOCUS variant | Requires pre-computed expression weights (e.g., FUSION\u002FPrediXcan); gene-level rather than variant-level inference |\n\nMethodology evolves; verify the latest susieR vignette and the SuSiE-inf paper before locking on a single method. Wang Lab maintains susieR; the IBSS algorithm is stable but argument semantics (e.g., `prior_weights` vs `prior_variance`) have changed across versions.\n\n## Decision Tree by Experimental Scenario\n\n| Scenario | Recommended workflow | Why |\n|----------|---------------------|-----|\n| Individual-level genotypes available (UKB, in-house cohort) | `susie(X, y, L=10)` | In-sample LD is exact; no mismatch fragility |\n| Summary statistics only, ancestry matches reference panel | `susie_rss(z, R, n, L=10)` + `estimate_s_rss` diagnostic | Standard external-LD pattern; verify lambda \u003C 0.05 |\n| Single-locus EUR GWAS, sparse architecture | susie_rss with L=10, baseline functional priors optional | Most-common setting; SuSiE default works |\n| Locus with strong polygenic shoulder (biobank scale) | SuSiE-inf (Cui 2024) | Adds infinitesimal component; calibrates non-sparse PIPs |\n| Multi-ancestry GWAS (EUR + EAS + AFR) | SuSiEx with per-pop sumstats and LD | Joint inference shrinks credible sets; per-ancestry meta loses LD information |\n| Locus with > 5 expected independent signals (HLA, lipid loci) | susie_rss with L=20-30 | Default L=10 caps signal count; HLA needs extension |\n| TWAS hits with co-regulated genes | FOCUS \u002F MA-FOCUS | Variant-level fine-mapping cannot distinguish co-regulated gene candidates |\n| Want functional priors (coding, conserved, regulatory) | PolyFun -> susie_rss with `prior_weights` | Genome-wide SLDSC priors sharpen PIPs more than locus-level annotations |\n| QTL fine-mapping (eQTL, sQTL, caQTL) at transcriptome scale | DAP-G + TORUS OR susie_rss per gene | DAP-G is built for QTL throughput; SuSiE works per gene |\n| Low-N QTL (GTEx tissue panel, N \u003C 1000) | susie_rss with `coverage = 0.9` (or 0.8); document choice | Default 0.95 returns very wide credible sets at low power; report the relaxed coverage explicitly in methods |\n| HLA region (chr6:28-34 Mb) or chr8 inversion | Specialized workflow: stratify haplotypes; consider HLA-specific imputation; or exclude | LD structure is too complex; standard methods unreliable |\n| Cross-feed into colocalization | susie_rss -> coloc.susie() | Modern coloc operates on credible sets, not single SNPs |\n\n## Critical LD Diagnostic Block (susie_rss)\n\n**Goal:** Detect LD reference mismatch before reporting credible sets.\n\n**Approach:** `estimate_s_rss()` quantifies the global Z-score \u002F LD inconsistency as a scalar; `kriging_rss()` identifies individual SNPs whose Z-scores are inconsistent with the LD reference (typically genotyping errors, strand flips, or wrong reference panel).\n\n```r\nlibrary(susieR)\ns_hat \u003C- estimate_s_rss(z = z_scores, R = ld_matrix, n = N)\n# s_hat is the inferred scale of LD inconsistency.\n# Source: susieR vignette \"Diagnostic for summary statistic\"; Zou 2022 PLoS Genet.\n# Rule of thumb: s_hat \u003C 0.05 acceptable; 0.05-0.10 marginal; > 0.10 refit or change LD reference.\n\ncond_z \u003C- kriging_rss(z = z_scores, R = ld_matrix, n = N)\n# cond_z$conditional_dist returns per-SNP expected vs observed z; flag |z_obs - z_exp| > 3\n# Common cause: strand flip, allele coding mismatch, or single-SNP imputation error.\n\n# If diagnostic fails: refit with explicit scale parameter to absorb LD mismatch\nfit \u003C- susie_rss(z = z_scores, R = ld_matrix, n = N, L = 10, estimate_residual_variance = TRUE)\n```\n\nSkipping this block is the dominant cause of irreproducible fine-mapping. Always run before reporting credible sets.\n\n## Per-Tool Failure Modes\n\n### LD reference mismatch (most common)\n\n**Trigger:** External LD matrix from 1000 Genomes \u002F UK Biobank reference used for a GWAS conducted on a different cohort or ancestry mix.\n\n**Mechanism:** Z-scores reflect the GWAS sample's LD; the reference R does not. The susie_rss likelihood depends on `z' R^{-1} z` being consistent with the modeled effects, and inconsistency manifests as spurious credible sets containing tag SNPs from the reference but not from the discovery cohort.\n\n**Symptom:** `estimate_s_rss()` lambda > 0.05; `kriging_rss()` flags many SNPs with `|z_obs - z_exp| > 3`; credible sets contain physically distant SNPs (anti-correlated in LD with the lead) or include all SNPs at the locus.\n\n**Fix:** Use in-sample LD whenever the cohort genotypes are accessible (compute with `plink --r2 square` on the GWAS samples themselves). When only summary statistics are available, ancestry-stratify the LD reference exactly (e.g., 1000G EUR FIN+CEU+GBR+IBS+TSI for a Northern European GWAS, not full EUR). For mixed-ancestry GWAS, fine-map per ancestry then meta-analyze, or move to SuSiEx.\n\n### Non-sparse architecture (biobank scale)\n\n**Trigger:** Locus with one strong signal plus hundreds of weakly associated SNPs (polygenic shoulder); typical at biobank scale.\n\n**Mechanism:** Vanilla SuSiE assumes a sparse sum-of-single-effects prior. With polygenic background, the model misallocates effects, producing inflated credible sets or many small spurious ones. Cui 2024 (Nat Genet 56:162) showed PIPs from SuSiE in this regime are systematically miscalibrated.\n\n**Symptom:** Many small credible sets (5-15 per locus); replication in independent cohorts fails for non-lead credible sets; PIP distribution has a heavy tail.\n\n**Fix:** Use SuSiE-inf or FINEMAP-inf (Cui 2024). These augment the sum-of-single-effects with an infinitesimal random-effect component that absorbs polygenic background. Source: github.com\u002FFinucaneLab\u002Ffine-mapping-inf.\n\n### L too small\n\n**Trigger:** Locus with > 5 independent signals (HLA region, APOC1\u002FAPOE, LPA, IL6R region for some traits).\n\n**Mechanism:** SuSiE assumes at most L independent effects. When the true number exceeds L, some signals are absorbed into existing components, distorting PIPs and credible sets for the captured signals.\n\n**Symptom:** `length(fit$sets$cs)` equals L (all L slots used); credible set purity for higher-indexed sets is low (`fit$sets$purity[,'min.abs.corr'] \u003C 0.5`); fits with larger L change top-PIP variants.\n\n**Fix:** Increase L iteratively (L=10 -> 20 -> 30) until `length(fit$sets$cs)` \u003C L (susieR auto-prunes unsupported effects so the returned CS count is the effective L). For HLA, start at L=30. The cost is mostly computational, not statistical: SuSiE prunes unused slots, so L=30 is safe when L=10 was right.\n\n### prior_weights vs prior_variance confusion (PolyFun integration)\n\n**Trigger:** Passing PolyFun output to susie_rss with `prior_variance=polyfun_priors` (wrong argument).\n\n**Mechanism:** `prior_variance` in susie_rss is a single scalar (or vector of length L) for the per-effect variance, NOT a per-SNP probability. `prior_weights` is the per-SNP causal probability vector (sums to ~1). Passing PolyFun's per-SNP prior to `prior_variance` is silently accepted but applies a numerically nonsensical per-effect variance.\n\n**Symptom:** PIPs nearly identical to the uniform-prior fit; functional annotations appear to have no effect.\n\n**Fix:** Use `prior_weights = polyfun_priors$SNPVAR` (the PolyFun output column is uppercase `SNPVAR`; R is case-sensitive). Verify with `?susie_rss` in the installed version. Reference: github.com\u002Fomerwe\u002Fpolyfun README, Weissbrod 2020 supplementary methods.\n\n### Credible-set misinterpretation\n\n**Trigger:** Reporting per-variant PIP without distinguishing \"in credible set\" from \"high PIP\".\n\n**Mechanism:** The 95 percent credible-set guarantee is `P(causal variant in set) >= 0.95`. Per-variant PIPs within a set do not necessarily sum to 1 across all variants, and PIPs across overlapping sets can double-count posterior mass.\n\n**Symptom:** Reporting \"the top PIP variant\" when the credible set is wide (size > 50); claiming a single variant is causal when the set contains 30 high-LD SNPs.\n\n**Fix:** Always report (a) number of credible sets, (b) size of each set, (c) purity (`fit$sets$purity[,'min.abs.corr']`), (d) the top PIP variant within the set as the candidate lead. The credible set is the unit of inference; the top PIP variant is a candidate, not a conclusion.\n\n### Cross-ancestry with single-ancestry LD\n\n**Trigger:** Multi-ancestry meta-analyzed GWAS, then susie_rss with EUR LD.\n\n**Mechanism:** Meta-analysis z-scores reflect a weighted mix of population LD structures; no single-population LD matrix matches.\n\n**Fix:** Move to SuSiEx (joint cross-ancestry SuSiE; Yuan 2024). Per-ancestry fine-mapping followed by manual merging loses the shared-causal-variant information that SuSiEx exploits.\n\n### Case-control GWAS passing Ntotal instead of Neff\n\n**Trigger:** Passing `n = N_total` to `susie_rss()` for case-control GWAS derived from logistic regression.\n\n**Mechanism:** susie_rss expects the effective sample size that determined the standard errors. For case-control logistic regression, `Neff = 4 \u002F (1\u002FNcase + 1\u002FNcontrol)`; when cases are rare, total N can exceed Neff by 25x or more. Passing Ntotal rescales z-scores into a regime SuSiE never sees and makes the implied prior variance wrong.\n\n**Symptom:** PIPs systematically biased; credible sets either too narrow (PIPs collapse to a single SNP that is not robust) or too wide (PIPs flatten); replication poor; sometimes z-score scale warnings from susieR.\n\n**Fix:** `Neff = 4 \u002F (1\u002FNcase + 1\u002FNcontrol)`. Example: Ncase=5000, Ncontrol=495000 -> Neff ~= 19,800 (NOT 500,000). For quantitative traits from linear regression, `n = N_total` is correct. Reference: Privé F et al 2022 HGG Adv 3:100136 (`bigsnpr` documents Neff handling); Willer 2010 Bioinformatics (METAL Neff convention).\n\n### Allele Harmonization with the LD Reference\n\n**Trigger:** Effect allele in GWAS sumstats differs from the coding\u002FA1 allele in the LD reference panel; or palindromic SNPs (A\u002FT, C\u002FG) carried without strand resolution.\n\n**Mechanism:** susie_rss treats `z` and `R` as defined on the same allele coding. If the effect allele is swapped relative to the LD-reference A1, the sign of z is wrong and the LD row\u002Fcolumn for that SNP is implicitly flipped. SNPs matching by rsID can silently swap alleles between sumstats and reference, breaking the `z' R z` consistency the model relies on.\n\n**Symptom:** `estimate_s_rss` lambda inflated despite ancestry-matched panel; `kriging_rss` flags many SNPs with `|z_obs - z_exp| > 3` clustered at SNPs where reference A1 != GWAS effect allele; credible sets pick up tag-only SNPs anti-correlated with the lead.\n\n**Fix:** Harmonize before fitting:\n\n```r\nharmonize_z_to_ref \u003C- function(z, gwas_a1, gwas_a2, ref_a1, ref_a2) {\n    palindromic \u003C- (gwas_a1 == 'A' & gwas_a2 == 'T') | (gwas_a1 == 'T' & gwas_a2 == 'A') |\n                   (gwas_a1 == 'C' & gwas_a2 == 'G') | (gwas_a1 == 'G' & gwas_a2 == 'C')\n    flip \u003C- (gwas_a1 == ref_a2) & (gwas_a2 == ref_a1)\n    z[flip] \u003C- -z[flip]\n    drop \u003C- palindromic | !((gwas_a1 == ref_a1 & gwas_a2 == ref_a2) | flip)\n    list(z = z, keep = !drop)\n}\n```\n\nDrop palindromic SNPs at MAF > 0.42 (ambiguous strand); or resolve via external strand info (TopMed, 1000G strand files). `TwoSampleMR::harmonise_data()` offers an alternative implementation. See causal-genomics\u002Fcolocalization-analysis for an equivalent harmonize helper used downstream.\n\n## Reconciliation: When Methods Disagree\n\n| Pattern | Likely cause | Action |\n|---------|--------------|--------|\n| SuSiE finds 3 credible sets, FINEMAP finds 1 | FINEMAP's stochastic search did not converge OR SuSiE absorbed background into spurious sets | Increase FINEMAP `--n-iterations`; check SuSiE purity (sets with purity \u003C 0.5 are spurious) |\n| SuSiE PIPs much sharper than FINEMAP | susie_rss assumes single residual variance; FINEMAP marginalizes over noise | Both can be correct; report the intersection of high-PIP variants from both as primary candidates |\n| PolyFun + SuSiE collapses 10-variant credible set to 1 | Functional priors are doing real work (coding variant in set) | Verify with `prior_weights` plot; if priors are coding-specific the result is interpretable |\n| SuSiEx credible set excludes the EUR top-PIP variant | EUR signal is tag, true causal shared across ancestries lies elsewhere | Trust SuSiEx if both populations have well-powered GWAS; verify with conditional analysis |\n| HLA gives 50-variant credible set in every method | HLA LD structure cannot be fine-mapped by linear methods | Use HLA-specific imputation (HIBAG, SNP2HLA) and haplotype-level analysis |\n\n**Operational rule:** For high-confidence reporting, require that (a) `estimate_s_rss()` lambda \u003C 0.05; (b) at least one credible set has purity > 0.5 (`min_abs_corr >= 0.5`, equivalent to r2 >= 0.25); (c) the lead PIP variant within that set is reproduced by an independent method (FINEMAP, SuSiEx, or in-sample SuSiE if reference-LD was used). Anything failing these three is exploratory.\n\n## Quantitative Thresholds\n\n| Quantity | Threshold | Source \u002F Rationale |\n|----------|-----------|-------------------|\n| Credible set coverage (well-powered GWAS) | 0.95 (default) | Wang 2020 JRSSB; standard convention |\n| Credible set coverage (low-N eQTL, GTEx tissue) | 0.9 or 0.8 | At N \u003C 1000, default 0.95 returns very wide CS; document choice in methods |\n| Credible set purity (rare-variant fine-mapping) | min_abs_corr >= 0.1 | LD genuinely sparse; relax to retain signal |\n| Credible set purity (default common-variant) | min_abs_corr >= 0.5 (r2 >= 0.25) | susieR default; below this the set is LD-confounded |\n| Credible set purity (publication-strict) | min_abs_corr >= 0.7 | Stringent claim; rare in practice |\n| PIP suggestive | > 0.5 | Convention; \"more likely than not causal among set\" |\n| PIP strong | > 0.9 | Convention; high-confidence single candidate |\n| PIP very strong | > 0.95 | Convention; near-certain candidate within credible set |\n| L (default cap) | 10 | susieR default; sufficient for most non-HLA loci |\n| L (HLA \u002F complex loci) | 20-30 | Empirical; HLA hosts > 10 independent signals for many traits |\n| `n` for case-control susie_rss | Neff = 4\u002F(1\u002FNcase + 1\u002FNcontrol), NOT Ntotal | Privé F et al 2022 HGG Adv 3:100136; matches the SE scale of logistic-regression sumstats |\n| `estimate_s_rss` lambda acceptable | \u003C 0.05 | susieR vignette; > 0.10 indicates serious LD mismatch |\n| `kriging_rss` per-SNP flag | |z_obs - z_exp| > 3 | susieR vignette; flag for manual review |\n| Locus window (default) | +\u002F- 500 kb from sentinel | Conventional; covers most LD blocks |\n| Locus window (conditional-p floor) | Extend until conditional -log10(p) \u003C 4 | Avoids truncating a secondary signal whose conditional evidence leaks into the window edge |\n| Locus window (long-range LD) | 5+ Mb or stratify | HLA chr6:25-35Mb, chr8 inversion chr8:8.1-11.9Mb hg38, chr17 H1\u002FH2 inversion |\n| FINEMAP `--n-causal-snps` | 5 | Default; raise for HLA |\n| FINEMAP `--prob-tol` | 0.001 | Convergence tolerance; rarely needs change |\n\n## Functional Priors with PolyFun\n\n**Goal:** Use genome-wide stratified LDSC heritability to weight per-SNP causal priors, sharpening PIPs at coding, conserved, and regulatory variants.\n\n**Approach:** Run PolyFun once genome-wide to estimate per-SNP h2 from the baseline-LF annotation set; extract per-SNP causal prior; pass to susie_rss as `prior_weights`.\n\n```bash\n# Parametric route: L2-regularized S-LDSC writes per-SNP priors directly (--no-partitions)\npolyfun.py --compute-h2-L2 --no-partitions \\\n    --output-prefix polyfun_h2 \\\n    --sumstats gwas_munged.sumstats \\\n    --ref-ld-chr UKB_baseline_LF\u002FbaselineLF2.2.UKB. \\\n    --w-ld-chr UKB_baseline_LF\u002Fweights.UKB.\n# Per-SNP priors written to polyfun_h2.\u003CCHR>.snpvar_ridge_constrained.gz\n\n# Non-parametric route (finer, optional): drop --no-partitions above, then add an\n# intermediate LD-score step before re-estimating binned per-SNP h2:\n#   polyfun.py --compute-ldscores --output-prefix polyfun_h2 ...\n#   polyfun.py --compute-h2-bins --output-prefix polyfun_h2 --sumstats gwas_munged.sumstats --w-ld-chr UKB_baseline_LF\u002Fweights.UKB.\n```\n\n```r\nlibrary(susieR)\npriors \u003C- read.table('polyfun_h2.6.snpvar_ridge_constrained.gz', header = TRUE)\npriors \u003C- priors[match(gwas_df$SNP, priors$SNP), ]\nprior_w \u003C- priors$SNPVAR \u002F sum(priors$SNPVAR, na.rm = TRUE)\n\nfit \u003C- susie_rss(z = z_scores, R = ld_matrix, n = N, L = 10,\n                 prior_weights = prior_w)\n```\n\nUKB baseline-LF priors are pre-computed EUR-only at `data.broadinstitute.org\u002Falkesgroup\u002FUKBB_LD\u002F` for hg19 and hg38. For EAS, AFR, or SAS GWAS, the EUR weights are NOT valid: functional-prior fine-mapping in a non-EUR ancestry requires baseline-LF annotations matched to that ancestry. For ancestries lacking matched baseline-LF (admixed, under-represented), accept reduced power and run uniform-prior susie_rss; applying EUR weights to non-EUR sumstats produces miscalibrated PIPs that look sharper than reality.\n\n### Manual Coding-Variant Priors Without PolyFun\n\nFor postdocs without PolyFun infrastructure or with single-locus inputs, manual annotation-based priors are a reasonable approximation (Hutchinson 2020 Hum Mol Genet 29:R81). As a stated convention, coding variants get ~10x uniform weight; broadly conserved variants ~5x (binned by CADD-PHRED quantile).\n\n```r\nbuild_manual_priors \u003C- function(vep_df, cadd) {\n    w \u003C- rep(1, nrow(vep_df))\n    w[vep_df$Consequence %in% c('missense_variant', 'stop_gained', 'splice_donor_variant',\n                                'splice_acceptor_variant', 'frameshift_variant')] \u003C- 10\n    w[cadd >= quantile(cadd, 0.95, na.rm = TRUE)] \u003C- pmax(w[cadd >= quantile(cadd, 0.95, na.rm = TRUE)], 5)\n    w \u002F sum(w)\n}\nfit \u003C- susie_rss(z = z_scores, R = ld_matrix, n = Neff, L = 10, prior_weights = build_manual_priors(vep, cadd))\n```\n\nReport the prior construction explicitly; reviewers will ask whether the prior was tuned post hoc.\n\n## Cross-Ancestry Fine-Mapping with SuSiEx\n\n**Goal:** Jointly fine-map a locus across multiple ancestries assuming shared causal variants but population-specific LD.\n\n**Approach:** Per-ancestry summary statistics + per-ancestry LD reference; SuSiEx runs a joint SuSiE model with population-specific R matrices. SuSiEx assigns populations by the ORDER of the comma-separated `--sst_file`\u002F`--n_gwas`\u002F`--ref_file`\u002F`--ld_file` lists (there is no `--pop` flag); keep all four lists in the same population order.\n\n```bash\nSuSiEx \\\n    --sst_file=eur_sumstats.txt,eas_sumstats.txt,afr_sumstats.txt \\\n    --n_gwas=500000,200000,80000 \\\n    --ref_file=1000G_EUR,1000G_EAS,1000G_AFR \\\n    --ld_file=eur_ld,eas_ld,afr_ld \\\n    --out_dir=susiex_out \\\n    --out_name=locus1 \\\n    --chr=6 --bp=30000000,31000000 \\\n    --chr_col=1,1,1 --snp_col=2,2,2 --bp_col=3,3,3 \\\n    --a1_col=4,4,4 --a2_col=5,5,5 --eff_col=6,6,6 \\\n    --se_col=7,7,7 --pval_col=8,8,8 \\\n    --level=0.95\n```\n\nThe output includes per-population PIPs and a joint credible set. Credible sets from SuSiEx are typically 2-5x smaller than EUR-only susie_rss when AFR is included, because AFR shorter LD blocks resolve EUR-tagged regions.\n\n## FINEMAP CLI Pattern\n\n**Goal:** Independent confirmation via shotgun stochastic search.\n\n**Approach:** Build .z, .ld, and master files; run FINEMAP with `--sss` and parse the .snp and .cred outputs.\n\n```bash\n# .z file format: snp chromosome position allele1 allele2 maf beta se\n# .ld file: square LD matrix, space-separated, no header\n\ncat > locus.master \u003C\u003C'EOF'\nz;ld;snp;config;cred;log;n_samples\nlocus.z;locus.ld;locus.snp;locus.config;locus.cred;locus.log;500000\nEOF\n\nfinemap --sss \\\n    --in-files locus.master \\\n    --n-causal-snps 5 \\\n    --prob-tol 0.001 \\\n    --n-iterations 100000 \\\n    --n-convergence 5000\n\n# Parse:\n# locus.snp -> per-variant prob (PIP), log10bf\n# locus.cred -> credible sets at increasing causal counts\n# locus.config -> top configurations\n```\n\nFINEMAP and SuSiE agree when sparsity holds; disagreement often reveals non-sparse loci that need SuSiE-inf.\n\n## Coloc.susie Integration\n\n**Goal:** Test colocalization between two traits using credible sets, not single SNPs.\n\n**Approach:** Fit susie_rss separately per trait; pass both `susie` objects to `coloc.susie`; per-credible-set colocalization probabilities are returned.\n\n```r\nlibrary(coloc)\n\nfit_trait1 \u003C- susie_rss(z = z1, R = ld_matrix, n = N1, L = 10)\nfit_trait2 \u003C- susie_rss(z = z2, R = ld_matrix, n = N2, L = 10)\n\ncoloc_res \u003C- coloc.susie(fit_trait1, fit_trait2)\n# coloc_res$summary: per-credible-set PP.H4 (shared causal probability)\nprint(coloc_res$summary)\n```\n\nPP.H4 > 0.8 per credible set is the conventional shared-causal threshold; weaker thresholds suggest distinct or conditional signals. See causal-genomics\u002Fcolocalization-analysis.\n\n## HLA and Long-Range LD: When to Stop\n\nThe HLA region (chr6:28-34 Mb), chromosome 8 inversion (chr8:8-12 Mb), and a handful of other extended LD blocks violate the assumptions of every fine-mapping method.\n\n**Symptoms of irrecoverable LD structure:** Credible sets contain 30+ SNPs at low purity even with L=30; SuSiE-inf credible sets remain wide; `kriging_rss` flags hundreds of SNPs.\n\n**Options:**\n- Stratify by classical HLA allele (HIBAG, SNP2HLA imputation) and test allelic series\n- Conditional analysis on the lead variant before fine-mapping the residual\n- Exclude the region from genome-wide fine-mapping summaries and report separately\n- For chr8 inversion: stratify by inversion genotype if known\n\nDocument the caveat in any methods section; standard PIPs at HLA are not interpretable as causality estimates.\n\n## TWAS Fine-Mapping (FOCUS) -- delegated\n\nVariant-level fine-mapping cannot distinguish causal genes among co-regulated TWAS hits. FOCUS \u002F MA-FOCUS extend fine-mapping to the predicted-expression level; see causal-genomics\u002Ftranscriptome-wide-association for the full FOCUS workflow and reconciliation with variant-level credible sets.\n\n## Required Reporting Schema for Fine-Mapping\n\nEvery locus reported should carry these columns; missing fields are the most common reviewer complaint.\n\n| Column | Description |\n|--------|-------------|\n| locus_id | Locus identifier (chr:start-end or sentinel rsID) |\n| method | susie_rss \u002F FINEMAP \u002F PAINTOR \u002F SuSiEx \u002F SuSiE-inf |\n| L_used | `sum(!fit$sets$pruned)` (effective L; not just the cap passed in) |\n| n_credible_sets | Number of returned credible sets at the chosen coverage |\n| cs_size | Variants per credible set |\n| cs_purity_min \u002F cs_purity_mean | min and mean `fit$sets$purity[,'min.abs.corr']` per set |\n| top_pip_snp | Lead variant in each credible set |\n| top_pip | Posterior inclusion probability of top_pip_snp |\n| lambda_s | `estimate_s_rss` diagnostic for the locus |\n| kriging_outlier_count | Count of SNPs with `|z_obs - z_exp| > 3` |\n| ld_panel | 1KG-EUR \u002F UKB-EUR \u002F in-sample \u002F TopMed |\n| prior_source | uniform \u002F PolyFun-EUR \u002F PolyFun matched-ancestry baseline-LF \u002F manual coding-variant |\n| coverage | 0.95 default; 0.9 or 0.8 documented for low-N |\n| n_effective | Sample size passed to susie_rss (Neff for case-control) |\n\n## Anticipated Reviewer Pushback\n\n| Pushback | Standard response |\n|----------|-------------------|\n| \"In-sample vs reference LD?\" | In-sample preferred when cohort genotypes available; if reference, report `estimate_s_rss` lambda \u003C 0.05 plus `kriging_rss` outlier count |\n| \"Credible-set purity?\" | `min_abs_corr >= 0.5` (r2 >= 0.25) default; reported per set; relaxed only with explicit rationale for rare-variant fine-mapping |\n| \"Is L set high enough?\" | If returned CS count \u003C L cap: OK (susieR auto-prunes); otherwise raise L. HLA needs L=20-30 |\n| \"Why not SuSiE-inf?\" | Polygenic-shoulder test: count SNPs with marginal -log10(p) > 4 outside the lead credible set; > 50 indicates a polygenic shoulder and SuSiE-inf (Cui 2024) should be used |\n| \"Why no functional priors?\" | PolyFun applied (or manual coding-variant prior used) and reported; if uniform, justify (low-N, mismatched-ancestry baseline-LF) |\n| \"Credible set has 50 SNPs -- is that fine-mapping?\" | Acknowledged as imprecise; reported alongside diagnostics; cross-trait colocalization or functional fine-mapping (PolyFun, MPRA, allelic series) recommended for resolution |\n| \"Was Neff used for case-control?\" | Yes: `Neff = 4\u002F(1\u002FNcase + 1\u002FNcontrol)`; report the value used |\n| \"Allele harmonization?\" | Yes: flipped z when GWAS effect allele differs from reference A1; palindromic SNPs at MAF > 0.42 dropped |\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|-----------------|-------|----------|\n| `IBSS algorithm did not converge` warning | L too small OR LD mismatch | Increase L; run `estimate_s_rss`; check ancestry match |\n| Credible set contains all SNPs at locus | LD reference matches discovery poorly; `s_hat` > 0.1 | Switch to in-sample LD or stratify reference ancestry |\n| PIPs identical to GWAS p-value rank | Effectively no LD information used; check LD matrix orientation | Verify SNP order in z and R match exactly; check for transposed R |\n| Negative eigenvalues in LD matrix | Numerical PSD violation from finite-precision storage | Add small ridge: `R \u003C- R + diag(1e-4, nrow(R))`; or use `Matrix::nearPD` |\n| `pip` all ~ 1\u002Fp (uniform) | Convergence failure OR all effects pruned | Check `fit$converged`; raise L; check Z scale |\n| FINEMAP `Error: SNP names do not match` | .z and .ld SNP order differ | Ensure both are sorted identically; pass matched .snp file |\n| Coloc.susie returns NULL | One trait has zero credible sets | Verify both fits succeeded; lower coverage to 0.9 if signal is weak |\n| SuSiEx output empty | Per-population lists misaligned with reference panels | Verify `--sst_file`\u002F`--ref_file`\u002F`--ld_file` are in the same population order; check `--bp` window |\n| PolyFun priors do not change PIPs | Passed to `prior_variance` instead of `prior_weights` | Read susieR docs; use `prior_weights=` |\n\n## References\n\n- Wang G, Sarkar A, Carbonetto P, Stephens M 2020 J R Stat Soc B 82:1273 (SuSiE \u002F IBSS)\n- Zou Y, Carbonetto P, Wang G, Stephens M 2022 PLoS Genet 18:e1010299 (susie_rss for summary statistics)\n- Cui R, Elzur RA, Kanai M, Ulirsch JC, Weissbrod O et al 2024 Nat Genet 56:162 (SuSiE-inf \u002F FINEMAP-inf for non-sparse loci)\n- Benner C, Spencer CC, Havulinna AS, Salomaa V, Ripatti S, Pirinen M 2016 Bioinformatics 32:1493 (FINEMAP)\n- Hormozdiari F, Kostem E, Kang EY, Pasaniuc B, Eskin E 2014 Genetics 198:497 (CAVIAR)\n- Wen X, Lee Y, Luca F, Pique-Regi R 2016 AJHG 98:1114 (DAP-G)\n- Kichaev G, Yang WY, Lindstrom S, Hormozdiari F, Eskin E et al 2014 PLoS Genet 10:e1004722 (PAINTOR)\n- Weissbrod O, Hormozdiari F, Benner C, Cui R, Ulirsch J et al 2020 Nat Genet 52:1355 (PolyFun + functional priors)\n- Yuan K, Longchamps RJ, Pardinas AF, Yu M, Chen TT et al 2024 Nat Genet 56:1841 (SuSiEx cross-ancestry)\n- Rossen J, Shi H, Strober BJ, Zhang MJ, Kanai M, McCaw ZR, Liang L, Weissbrod O, Price AL 2025 Nat Genet 58:67 (MultiSuSiE; doi:10.1038\u002Fs41588-025-02450-5)\n- Mancuso N, Freund MK, Johnson R, Shi H, Kichaev G et al 2019 Nat Genet 51:675 (FOCUS for TWAS fine-mapping)\n- Wallace C 2021 PLoS Genet 17:e1009440 (coloc.susie integration)\n- Schaid DJ, Chen W, Larson NB 2018 Nat Rev Genet 19:491 (fine-mapping review)\n- Hutchinson A, Asimit J, Wallace C 2020 Hum Mol Genet 29:R81 (fine-mapping review)\n\n## Related Skills\n\n- causal-genomics\u002Fcolocalization-analysis - coloc.susie consumes susie_rss credible sets; equivalent harmonize helper\n- causal-genomics\u002Feffector-gene-prioritization - Downstream gene-assignment from credible-set variants\n- causal-genomics\u002Ftranscriptome-wide-association - FOCUS \u002F MA-FOCUS for gene-level fine-mapping\n- causal-genomics\u002Fgenomic-sem - Joint multi-trait fine-mapping when credible sets are shared across traits\n- causal-genomics\u002Fmendelian-randomization - Fine-mapped variants as cis-instruments\n- causal-genomics\u002Fpleiotropy-detection - Per-credible-set pleiotropy testing\n- atac-seq\u002Fenhancer-gene-linking - ABC \u002F ENCODE-rE2G linking credible-set variants to target genes\n- population-genetics\u002Flinkage-disequilibrium - Constructing LD matrices for susie_rss\n- population-genetics\u002Fassociation-testing - Upstream GWAS summary statistic generation\n- workflows\u002Fgwas-pipeline - End-to-end GWAS pipeline producing fine-mapping input\n- variant-calling\u002Fvariant-annotation - Annotating credible-set variants with VEP \u002F coding consequence\n- pathway-analysis\u002Fgo-enrichment - Downstream gene-level interpretation of credible-set targets\n","## Version Compatibility\n\nReference examples tested with: susieR 0.12.27+, coloc 5.2.3+, FINEMAP 1.4.2+, PolyFun (head of `omerwe\u002Fpolyfun` 2024), PAINTOR V3.0, SuSiEx (head of `getian107\u002FSuSiEx`), DAP-G (head of `xqwen\u002Fdap`), pyfocus 0.8+, R 4.3+, PLINK 1.9 \u002F 2.0.\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- R: `packageVersion('susieR')` then `?susie_rss` to confirm argument names (e.g., `prior_weights` vs `prior_variance` semantics)\n- CLI: `finemap --help`, `SuSiEx --help`, `PAINTOR --help`, `dap-g --help` to confirm flags\n- Python: `polyfun.py --help`\n\nIf a call throws an error about an argument that no longer exists, introspect the installed function and adapt rather than retrying.\n\n# Fine-Mapping\n\n**\"Narrow my GWAS locus to the variants likely to be causal\"** -> Fit a sparse Bayesian regression that propagates LD into posterior inclusion probabilities (PIPs) and credible sets, then validate that credible sets correspond to physically reasonable haplotypes given the LD reference.\n\n- R (summary statistics + LD): `susieR::susie_rss(z, R, n, L=10)` + `estimate_s_rss` LD diagnostic\n- R (individual-level genotypes): `susieR::susie(X, y, L=10)`\n- CLI (shotgun stochastic search): `finemap --sss --in-files master.z --n-causal-snps 5 --prob-tol 0.001`\n- CLI (cross-ancestry joint): `SuSiEx --sst_file=eur.sst,eas.sst --n_gwas=N1,N2 --ref_file=eur.bim,eas.bim --ld_file=eur_ld,eas_ld --chr_col=1,1 --snp_col=2,2 --bp_col=3,3 --a1_col=4,4 --a2_col=5,5 --eff_col=6,6 --se_col=7,7 --pval_col=8,8 --chr=\u003Cchr> --bp=\u003Cstart,end> --out_dir=\u003Cdir> --out_name=\u003Cname>` (column-number flags and `--ld_file` are required; populations are assigned by the ORDER of the comma-separated `--sst_file`\u002F`--n_gwas`\u002F`--ref_file`\u002F`--ld_file` lists, not a `--pop` flag; see `SuSiEx --help`)\n- Python (functional priors): `polyfun.py --compute-h2-L2` -> per-SNP priors -> susie_rss with `prior_weights=`\n- Python (TWAS fine-mapping): `focus finemap` on gene-level Z-scores\n\nFine-mapping is a Bayesian model selection problem; LD is not noise but structured prior information. Most failure modes trace back to one of three issues: (a) LD reference mismatched to the GWAS sample; (b) the sparse-effects prior being wrong for the locus (polygenic background); or (c) too small an L cap. The `estimate_s_rss()` lambda and `kriging_rss()` per-SNP diagnostic catch (a) before downstream credible sets are reported.\n\n## Algorithmic Taxonomy\n\n| Tool | Model | Input | Strength | Fails when |\n|------|-------|-------|----------|------------|\n| SuSiE \u002F susie_rss (Wang 2020 JRSSB 82:1273; Zou 2022 PLoS Genet) | Iterative Bayesian sum-of-single-effects (IBSS), variational | Individual-level (X, y) or (z, R, n) | Fast; native PIP + credible sets; pluggable priors; default in modern pipelines | Reference LD mismatched to GWAS sample; locus dominated by polygenic background; >L true effects |\n| SuSiE-inf \u002F FINEMAP-inf (Cui 2024 Nat Genet 56:162) | SuSiE + infinitesimal random-effect component | (z, R, n) | Calibrated credible sets when locus is non-sparse (polygenic shoulder around a sparse causal); recommended for biobank-scale GWAS | Very small loci with truly sparse architecture (over-conservative); slower convergence |\n| FINEMAP (Benner 2016 Bioinformatics 32:1493) | Shotgun stochastic search over causal configurations | .z + .ld + .master files | Exact Bayes factors at small k; widely cited | Slow at L > 5; binary install only (christianbenner.com); same LD-mismatch fragility as SuSiE |\n| CAVIAR (Hormozdiari 2014 Genetics 198:497) | Exhaustive enumeration up to k causals | (z, R) | Exact posterior at small k | Combinatorial explosion beyond k=6; legacy method largely superseded by SuSiE |\n| DAP-G (Wen 2016 AJHG 98:1114) | Deterministic posterior approximation with adaptive scan | SBAMS format; TORUS for enrichment priors | Fast at QTL scale (whole-transcriptome); pairs with TORUS hierarchical priors | SBAMS format is awkward; less ubiquitous tooling |\n| PAINTOR (Kichaev 2014 PLoS Genet 10:e1004722) | EM with binary functional annotations | (z, R, A) per locus | Locus-level functional priors; multi-trait variant | Single-trait mode often matched by PolyFun + SuSiE; slower than SuSiE |\n| PolyFun + SuSiE\u002FFINEMAP (Weissbrod 2020 Nat Genet 52:1355) | Stratified LDSC genome-wide -> per-SNP prior_weights | GWAS sumstats + pre-baked baseline-LF | Most powerful single-trait functional prior; >20% more high-PIP (PIP>0.95) variants in simulations, >32% in real UK Biobank traits (Weissbrod 2020) | Requires matched-ancestry baseline-LF; runs in two stages |\n| SuSiEx (Yuan 2024 Nat Genet 56:1841) | Joint cross-ancestry SuSiE; shared causal, population-specific LD | Per-pop sumstats + per-pop LD reference | Smaller credible sets than per-ancestry meta or marginal fine-mapping; principled when causal variants are shared | Trans-ethnic heterogeneity violated (population-specific causals); ancestry must be cleanly assigned |\n| MultiSuSiE (Rossen 2025 Nat Genet) | Cross-ancestry SuSiE variant; flexible heterogeneity | Per-pop sumstats + per-pop LD | Similar to SuSiEx; alternative implementation | Same as SuSiEx; newer, less battle-tested |\n| FOCUS \u002F MA-FOCUS (Mancuso 2019 Nat Genet 51:675) | Probabilistic TWAS fine-mapping over gene models | TWAS Z-scores + gene LD (predicted expression) | Identifies likely causal gene among co-regulated TWAS hits; cross-ancestry MA-FOCUS variant | Requires pre-computed expression weights (e.g., FUSION\u002FPrediXcan); gene-level rather than variant-level inference |\n\nMethodology evolves; verify the latest susieR vignette and the SuSiE-inf paper before locking on a single method. Wang Lab maintains susieR; the IBSS algorithm is stable but argument semantics (e.g., `prior_weights` vs `prior_variance`) have changed across versions.\n\n## Decision Tree by Experimental Scenario\n\n| Scenario | Recommended workflow | Why |\n|----------|---------------------|-----|\n| Individual-level genotypes available (UKB, in-house cohort) | `susie(X, y, L=10)` | In-sample LD is exact; no mismatch fragility |\n| Summary statistics only, ancestry matches reference panel | `susie_rss(z, R, n, L=10)` + `estimate_s_rss` diagnostic | Standard external-LD pattern; verify lambda \u003C 0.05 |\n| Single-locus EUR GWAS, sparse architecture | susie_rss with L=10, baseline functional priors optional | Most-common setting; SuSiE default works |\n| Locus with strong polygenic shoulder (biobank scale) | SuSiE-inf (Cui 2024) | Adds infinitesimal component; calibrates non-sparse PIPs |\n| Multi-ancestry GWAS (EUR + EAS + AFR) | SuSiEx with per-pop sumstats and LD | Joint inference shrinks credible sets; per-ancestry meta loses LD information |\n| Locus with > 5 expected independent signals (HLA, lipid loci) | susie_rss with L=20-30 | Default L=10 caps signal count; HLA needs extension |\n| TWAS hits with co-regulated genes | FOCUS \u002F MA-FOCUS | Variant-level fine-mapping cannot distinguish co-regulated gene candidates |\n| Want functional priors (coding, conserved, regulatory) | PolyFun -> susie_rss with `prior_weights` | Genome-wide SLDSC priors sharpen PIPs more than locus-level annotations |\n| QTL fine-mapping (eQTL, sQTL, caQTL) at transcriptome scale | DAP-G + TORUS OR susie_rss per gene | DAP-G is built for QTL throughput; SuSiE works per gene |\n| Low-N QTL (GTEx tissue panel, N \u003C 1000) | susie_rss with `coverage = 0.9` (or 0.8); document choice | Default 0.95 returns very wide credible sets at low power; report the relaxed coverage explicitly in methods |\n| HLA region (chr6:28-34 Mb) or chr8 inversion | Specialized workflow: stratify haplotypes; consider HLA-specific imputation; or exclude | LD structure is too complex; standard methods unreliable |\n| Cross-feed into colocalization | susie_rss -> coloc.susie() | Modern coloc operates on credible sets, not single SNPs |\n\n## Critical LD Diagnostic Block (susie_rss)\n\n**Goal:** Detect LD reference mismatch before reporting credible sets.\n\n**Approach:** `estimate_s_rss()` quantifies the global Z-score \u002F LD inconsistency as a scalar; `kriging_rss()` identifies individual SNPs whose Z-scores are inconsistent with the LD reference (typically genotyping errors, strand flips, or wrong reference panel).\n\n```r\nlibrary(susieR)\ns_hat \u003C- estimate_s_rss(z = z_scores, R = ld_matrix, n = N)\n# s_hat is the inferred scale of LD inconsistency.\n# Source: susieR vignette \"Diagnostic for summary statistic\"; Zou 2022 PLoS Genet.\n# Rule of thumb: s_hat \u003C 0.05 acceptable; 0.05-0.10 marginal; > 0.10 refit or change LD reference.\n\ncond_z \u003C- kriging_rss(z = z_scores, R = ld_matrix, n = N)\n# cond_z$conditional_dist returns per-SNP expected vs observed z; flag |z_obs - z_exp| > 3\n# Common cause: strand flip, allele coding mismatch, or single-SNP imputation error.\n\n# If diagnostic fails: refit with explicit scale parameter to absorb LD mismatch\nfit \u003C- susie_rss(z = z_scores, R = ld_matrix, n = N, L = 10, estimate_residual_variance = TRUE)\n```\n\nSkipping this block is the dominant cause of irreproducible fine-mapping. Always run before reporting credible sets.\n\n## Per-Tool Failure Modes\n\n### LD reference mismatch (most common)\n\n**Trigger:** External LD matrix from 1000 Genomes \u002F UK Biobank reference used for a GWAS conducted on a different cohort or ancestry mix.\n\n**Mechanism:** Z-scores reflect the GWAS sample's LD; the reference R does not. The susie_rss likelihood depends on `z' R^{-1} z` being consistent with the modeled effects, and inconsistency manifests as spurious credible sets containing tag SNPs from the reference but not from the discovery cohort.\n\n**Symptom:** `estimate_s_rss()` lambda > 0.05; `kriging_rss()` flags many SNPs with `|z_obs - z_exp| > 3`; credible sets contain physically distant SNPs (anti-correlated in LD with the lead) or include all SNPs at the locus.\n\n**Fix:** Use in-sample LD whenever the cohort genotypes are accessible (compute with `plink --r2 square` on the GWAS samples themselves). When only summary statistics are available, ancestry-stratify the LD reference exactly (e.g., 1000G EUR FIN+CEU+GBR+IBS+TSI for a Northern European GWAS, not full EUR). For mixed-ancestry GWAS, fine-map per ancestry then meta-analyze, or move to SuSiEx.\n\n### Non-sparse architecture (biobank scale)\n\n**Trigger:** Locus with one strong signal plus hundreds of weakly associated SNPs (polygenic shoulder); typical at biobank scale.\n\n**Mechanism:** Vanilla SuSiE assumes a sparse sum-of-single-effects prior. With polygenic background, the model misallocates effects, producing inflated credible sets or many small spurious ones. Cui 2024 (Nat Genet 56:162) showed PIPs from SuSiE in this regime are systematically miscalibrated.\n\n**Symptom:** Many small credible sets (5-15 per locus); replication in independent cohorts fails for non-lead credible sets; PIP distribution has a heavy tail.\n\n**Fix:** Use SuSiE-inf or FINEMAP-inf (Cui 2024). These augment the sum-of-single-effects with an infinitesimal random-effect component that absorbs polygenic background. Source: github.com\u002FFinucaneLab\u002Ffine-mapping-inf.\n\n### L too small\n\n**Trigger:** Locus with > 5 independent signals (HLA region, APOC1\u002FAPOE, LPA, IL6R region for some traits).\n\n**Mechanism:** SuSiE assumes at most L independent effects. When the true number exceeds L, some signals are absorbed into existing components, distorting PIPs and credible sets for the captured signals.\n\n**Symptom:** `length(fit$sets$cs)` equals L (all L slots used); credible set purity for higher-indexed sets is low (`fit$sets$purity[,'min.abs.corr'] \u003C 0.5`); fits with larger L change top-PIP variants.\n\n**Fix:** Increase L iteratively (L=10 -> 20 -> 30) until `length(fit$sets$cs)` \u003C L (susieR auto-prunes unsupported effects so the returned CS count is the effective L). For HLA, start at L=30. The cost is mostly computational, not statistical: SuSiE prunes unused slots, so L=30 is safe when L=10 was right.\n\n### prior_weights vs prior_variance confusion (PolyFun integration)\n\n**Trigger:** Passing PolyFun output to susie_rss with `prior_variance=polyfun_priors` (wrong argument).\n\n**Mechanism:** `prior_variance` in susie_rss is a single scalar (or vector of length L) for the per-effect variance, NOT a per-SNP probability. `prior_weights` is the per-SNP causal probability vector (sums to ~1). Passing PolyFun's per-SNP prior to `prior_variance` is silently accepted but applies a numerically nonsensical per-effect variance.\n\n**Symptom:** PIPs nearly identical to the uniform-prior fit; functional annotations appear to have no effect.\n\n**Fix:** Use `prior_weights = polyfun_priors$SNPVAR` (the PolyFun output column is uppercase `SNPVAR`; R is case-sensitive). Verify with `?susie_rss` in the installed version. Reference: github.com\u002Fomerwe\u002Fpolyfun README, Weissbrod 2020 supplementary methods.\n\n### Credible-set misinterpretation\n\n**Trigger:** Reporting per-variant PIP without distinguishing \"in credible set\" from \"high PIP\".\n\n**Mechanism:** The 95 percent credible-set guarantee is `P(causal variant in set) >= 0.95`. Per-variant PIPs within a set do not necessarily sum to 1 across all variants, and PIPs across overlapping sets can double-count posterior mass.\n\n**Symptom:** Reporting \"the top PIP variant\" when the credible set is wide (size > 50); claiming a single variant is causal when the set contains 30 high-LD SNPs.\n\n**Fix:** Always report (a) number of credible sets, (b) size of each set, (c) purity (`fit$sets$purity[,'min.abs.corr']`), (d) the top PIP variant within the set as the candidate lead. The credible set is the unit of inference; the top PIP variant is a candidate, not a conclusion.\n\n### Cross-ancestry with single-ancestry LD\n\n**Trigger:** Multi-ancestry meta-analyzed GWAS, then susie_rss with EUR LD.\n\n**Mechanism:** Meta-analysis z-scores reflect a weighted mix of population LD structures; no single-population LD matrix matches.\n\n**Fix:** Move to SuSiEx (joint cross-ancestry SuSiE; Yuan 2024). Per-ancestry fine-mapping followed by manual merging loses the shared-causal-variant information that SuSiEx exploits.\n\n### Case-control GWAS passing Ntotal instead of Neff\n\n**Trigger:** Passing `n = N_total` to `susie_rss()` for case-control GWAS derived from logistic regression.\n\n**Mechanism:** susie_rss expects the effective sample size that determined the standard errors. For case-control logistic regression, `Neff = 4 \u002F (1\u002FNcase + 1\u002FNcontrol)`; when cases are rare, total N can exceed Neff by 25x or more. Passing Ntotal rescales z-scores into a regime SuSiE never sees and makes the implied prior variance wrong.\n\n**Symptom:** PIPs systematically biased; credible sets either too narrow (PIPs collapse to a single SNP that is not robust) or too wide (PIPs flatten); replication poor; sometimes z-score scale warnings from susieR.\n\n**Fix:** `Neff = 4 \u002F (1\u002FNcase + 1\u002FNcontrol)`. Example: Ncase=5000, Ncontrol=495000 -> Neff ~= 19,800 (NOT 500,000). For quantitative traits from linear regression, `n = N_total` is correct. Reference: Privé F et al 2022 HGG Adv 3:100136 (`bigsnpr` documents Neff handling); Willer 2010 Bioinformatics (METAL Neff convention).\n\n### Allele Harmonization with the LD Reference\n\n**Trigger:** Effect allele in GWAS sumstats differs from the coding\u002FA1 allele in the LD reference panel; or palindromic SNPs (A\u002FT, C\u002FG) carried without strand resolution.\n\n**Mechanism:** susie_rss treats `z` and `R` as defined on the same allele coding. If the effect allele is swapped relative to the LD-reference A1, the sign of z is wrong and the LD row\u002Fcolumn for that SNP is implicitly flipped. SNPs matching by rsID can silently swap alleles between sumstats and reference, breaking the `z' R z` consistency the model relies on.\n\n**Symptom:** `estimate_s_rss` lambda inflated despite ancestry-matched panel; `kriging_rss` flags many SNPs with `|z_obs - z_exp| > 3` clustered at SNPs where reference A1 != GWAS effect allele; credible sets pick up tag-only SNPs anti-correlated with the lead.\n\n**Fix:** Harmonize before fitting:\n\n```r\nharmonize_z_to_ref \u003C- function(z, gwas_a1, gwas_a2, ref_a1, ref_a2) {\n    palindromic \u003C- (gwas_a1 == 'A' & gwas_a2 == 'T') | (gwas_a1 == 'T' & gwas_a2 == 'A') |\n                   (gwas_a1 == 'C' & gwas_a2 == 'G') | (gwas_a1 == 'G' & gwas_a2 == 'C')\n    flip \u003C- (gwas_a1 == ref_a2) & (gwas_a2 == ref_a1)\n    z[flip] \u003C- -z[flip]\n    drop \u003C- palindromic | !((gwas_a1 == ref_a1 & gwas_a2 == ref_a2) | flip)\n    list(z = z, keep = !drop)\n}\n```\n\nDrop palindromic SNPs at MAF > 0.42 (ambiguous strand); or resolve via external strand info (TopMed, 1000G strand files). `TwoSampleMR::harmonise_data()` offers an alternative implementation. See causal-genomics\u002Fcolocalization-analysis for an equivalent harmonize helper used downstream.\n\n## Reconciliation: When Methods Disagree\n\n| Pattern | Likely cause | Action |\n|---------|--------------|--------|\n| SuSiE finds 3 credible sets, FINEMAP finds 1 | FINEMAP's stochastic search did not converge OR SuSiE absorbed background into spurious sets | Increase FINEMAP `--n-iterations`; check SuSiE purity (sets with purity \u003C 0.5 are spurious) |\n| SuSiE PIPs much sharper than FINEMAP | susie_rss assumes single residual variance; FINEMAP marginalizes over noise | Both can be correct; report the intersection of high-PIP variants from both as primary candidates |\n| PolyFun + SuSiE collapses 10-variant credible set to 1 | Functional priors are doing real work (coding variant in set) | Verify with `prior_weights` plot; if priors are coding-specific the result is interpretable |\n| SuSiEx credible set excludes the EUR top-PIP variant | EUR signal is tag, true causal shared across ancestries lies elsewhere | Trust SuSiEx if both populations have well-powered GWAS; verify with conditional analysis |\n| HLA gives 50-variant credible set in every method | HLA LD structure cannot be fine-mapped by linear methods | Use HLA-specific imputation (HIBAG, SNP2HLA) and haplotype-level analysis |\n\n**Operational rule:** For high-confidence reporting, require that (a) `estimate_s_rss()` lambda \u003C 0.05; (b) at least one credible set has purity > 0.5 (`min_abs_corr >= 0.5`, equivalent to r2 >= 0.25); (c) the lead PIP variant within that set is reproduced by an independent method (FINEMAP, SuSiEx, or in-sample SuSiE if reference-LD was used). Anything failing these three is exploratory.\n\n## Quantitative Thresholds\n\n| Quantity | Threshold | Source \u002F Rationale |\n|----------|-----------|-------------------|\n| Credible set coverage (well-powered GWAS) | 0.95 (default) | Wang 2020 JRSSB; standard convention |\n| Credible set coverage (low-N eQTL, GTEx tissue) | 0.9 or 0.8 | At N \u003C 1000, default 0.95 returns very wide CS; document choice in methods |\n| Credible set purity (rare-variant fine-mapping) | min_abs_corr >= 0.1 | LD genuinely sparse; relax to retain signal |\n| Credible set purity (default common-variant) | min_abs_corr >= 0.5 (r2 >= 0.25) | susieR default; below this the set is LD-confounded |\n| Credible set purity (publication-strict) | min_abs_corr >= 0.7 | Stringent claim; rare in practice |\n| PIP suggestive | > 0.5 | Convention; \"more likely than not causal among set\" |\n| PIP strong | > 0.9 | Convention; high-confidence single candidate |\n| PIP very strong | > 0.95 | Convention; near-certain candidate within credible set |\n| L (default cap) | 10 | susieR default; sufficient for most non-HLA loci |\n| L (HLA \u002F complex loci) | 20-30 | Empirical; HLA hosts > 10 independent signals for many traits |\n| `n` for case-control susie_rss | Neff = 4\u002F(1\u002FNcase + 1\u002FNcontrol), NOT Ntotal | Privé F et al 2022 HGG Adv 3:100136; matches the SE scale of logistic-regression sumstats |\n| `estimate_s_rss` lambda acceptable | \u003C 0.05 | susieR vignette; > 0.10 indicates serious LD mismatch |\n| `kriging_rss` per-SNP flag | |z_obs - z_exp| > 3 | susieR vignette; flag for manual review |\n| Locus window (default) | +\u002F- 500 kb from sentinel | Conventional; covers most LD blocks |\n| Locus window (conditional-p floor) | Extend until conditional -log10(p) \u003C 4 | Avoids truncating a secondary signal whose conditional evidence leaks into the window edge |\n| Locus window (long-range LD) | 5+ Mb or stratify | HLA chr6:25-35Mb, chr8 inversion chr8:8.1-11.9Mb hg38, chr17 H1\u002FH2 inversion |\n| FINEMAP `--n-causal-snps` | 5 | Default; raise for HLA |\n| FINEMAP `--prob-tol` | 0.001 | Convergence tolerance; rarely needs change |\n\n## Functional Priors with PolyFun\n\n**Goal:** Use genome-wide stratified LDSC heritability to weight per-SNP causal priors, sharpening PIPs at coding, conserved, and regulatory variants.\n\n**Approach:** Run PolyFun once genome-wide to estimate per-SNP h2 from the baseline-LF annotation set; extract per-SNP causal prior; pass to susie_rss as `prior_weights`.\n\n```bash\n# Parametric route: L2-regularized S-LDSC writes per-SNP priors directly (--no-partitions)\npolyfun.py --compute-h2-L2 --no-partitions \\\n    --output-prefix polyfun_h2 \\\n    --sumstats gwas_munged.sumstats \\\n    --ref-ld-chr UKB_baseline_LF\u002FbaselineLF2.2.UKB. \\\n    --w-ld-chr UKB_baseline_LF\u002Fweights.UKB.\n# Per-SNP priors written to polyfun_h2.\u003CCHR>.snpvar_ridge_constrained.gz\n\n# Non-parametric route (finer, optional): drop --no-partitions above, then add an\n# intermediate LD-score step before re-estimating binned per-SNP h2:\n#   polyfun.py --compute-ldscores --output-prefix polyfun_h2 ...\n#   polyfun.py --compute-h2-bins --output-prefix polyfun_h2 --sumstats gwas_munged.sumstats --w-ld-chr UKB_baseline_LF\u002Fweights.UKB.\n```\n\n```r\nlibrary(susieR)\npriors \u003C- read.table('polyfun_h2.6.snpvar_ridge_constrained.gz', header = TRUE)\npriors \u003C- priors[match(gwas_df$SNP, priors$SNP), ]\nprior_w \u003C- priors$SNPVAR \u002F sum(priors$SNPVAR, na.rm = TRUE)\n\nfit \u003C- susie_rss(z = z_scores, R = ld_matrix, n = N, L = 10,\n                 prior_weights = prior_w)\n```\n\nUKB baseline-LF priors are pre-computed EUR-only at `data.broadinstitute.org\u002Falkesgroup\u002FUKBB_LD\u002F` for hg19 and hg38. For EAS, AFR, or SAS GWAS, the EUR weights are NOT valid: functional-prior fine-mapping in a non-EUR ancestry requires baseline-LF annotations matched to that ancestry. For ancestries lacking matched baseline-LF (admixed, under-represented), accept reduced power and run uniform-prior susie_rss; applying EUR weights to non-EUR sumstats produces miscalibrated PIPs that look sharper than reality.\n\n### Manual Coding-Variant Priors Without PolyFun\n\nFor postdocs without PolyFun infrastructure or with single-locus inputs, manual annotation-based priors are a reasonable approximation (Hutchinson 2020 Hum Mol Genet 29:R81). As a stated convention, coding variants get ~10x uniform weight; broadly conserved variants ~5x (binned by CADD-PHRED quantile).\n\n```r\nbuild_manual_priors \u003C- function(vep_df, cadd) {\n    w \u003C- rep(1, nrow(vep_df))\n    w[vep_df$Consequence %in% c('missense_variant', 'stop_gained', 'splice_donor_variant',\n                                'splice_acceptor_variant', 'frameshift_variant')] \u003C- 10\n    w[cadd >= quantile(cadd, 0.95, na.rm = TRUE)] \u003C- pmax(w[cadd >= quantile(cadd, 0.95, na.rm = TRUE)], 5)\n    w \u002F sum(w)\n}\nfit \u003C- susie_rss(z = z_scores, R = ld_matrix, n = Neff, L = 10, prior_weights = build_manual_priors(vep, cadd))\n```\n\nReport the prior construction explicitly; reviewers will ask whether the prior was tuned post hoc.\n\n## Cross-Ancestry Fine-Mapping with SuSiEx\n\n**Goal:** Jointly fine-map a locus across multiple ancestries assuming shared causal variants but population-specific LD.\n\n**Approach:** Per-ancestry summary statistics + per-ancestry LD reference; SuSiEx runs a joint SuSiE model with population-specific R matrices. SuSiEx assigns populations by the ORDER of the comma-separated `--sst_file`\u002F`--n_gwas`\u002F`--ref_file`\u002F`--ld_file` lists (there is no `--pop` flag); keep all four lists in the same population order.\n\n```bash\nSuSiEx \\\n    --sst_file=eur_sumstats.txt,eas_sumstats.txt,afr_sumstats.txt \\\n    --n_gwas=500000,200000,80000 \\\n    --ref_file=1000G_EUR,1000G_EAS,1000G_AFR \\\n    --ld_file=eur_ld,eas_ld,afr_ld \\\n    --out_dir=susiex_out \\\n    --out_name=locus1 \\\n    --chr=6 --bp=30000000,31000000 \\\n    --chr_col=1,1,1 --snp_col=2,2,2 --bp_col=3,3,3 \\\n    --a1_col=4,4,4 --a2_col=5,5,5 --eff_col=6,6,6 \\\n    --se_col=7,7,7 --pval_col=8,8,8 \\\n    --level=0.95\n```\n\nThe output includes per-population PIPs and a joint credible set. Credible sets from SuSiEx are typically 2-5x smaller than EUR-only susie_rss when AFR is included, because AFR shorter LD blocks resolve EUR-tagged regions.\n\n## FINEMAP CLI Pattern\n\n**Goal:** Independent confirmation via shotgun stochastic search.\n\n**Approach:** Build .z, .ld, and master files; run FINEMAP with `--sss` and parse the .snp and .cred outputs.\n\n```bash\n# .z file format: snp chromosome position allele1 allele2 maf beta se\n# .ld file: square LD matrix, space-separated, no header\n\ncat > locus.master \u003C\u003C'EOF'\nz;ld;snp;config;cred;log;n_samples\nlocus.z;locus.ld;locus.snp;locus.config;locus.cred;locus.log;500000\nEOF\n\nfinemap --sss \\\n    --in-files locus.master \\\n    --n-causal-snps 5 \\\n    --prob-tol 0.001 \\\n    --n-iterations 100000 \\\n    --n-convergence 5000\n\n# Parse:\n# locus.snp -> per-variant prob (PIP), log10bf\n# locus.cred -> credible sets at increasing causal counts\n# locus.config -> top configurations\n```\n\nFINEMAP and SuSiE agree when sparsity holds; disagreement often reveals non-sparse loci that need SuSiE-inf.\n\n## Coloc.susie Integration\n\n**Goal:** Test colocalization between two traits using credible sets, not single SNPs.\n\n**Approach:** Fit susie_rss separately per trait; pass both `susie` objects to `coloc.susie`; per-credible-set colocalization probabilities are returned.\n\n```r\nlibrary(coloc)\n\nfit_trait1 \u003C- susie_rss(z = z1, R = ld_matrix, n = N1, L = 10)\nfit_trait2 \u003C- susie_rss(z = z2, R = ld_matrix, n = N2, L = 10)\n\ncoloc_res \u003C- coloc.susie(fit_trait1, fit_trait2)\n# coloc_res$summary: per-credible-set PP.H4 (shared causal probability)\nprint(coloc_res$summary)\n```\n\nPP.H4 > 0.8 per credible set is the conventional shared-causal threshold; weaker thresholds suggest distinct or conditional signals. See causal-genomics\u002Fcolocalization-analysis.\n\n## HLA and Long-Range LD: When to Stop\n\nThe HLA region (chr6:28-34 Mb), chromosome 8 inversion (chr8:8-12 Mb), and a handful of other extended LD blocks violate the assumptions of every fine-mapping method.\n\n**Symptoms of irrecoverable LD structure:** Credible sets contain 30+ SNPs at low purity even with L=30; SuSiE-inf credible sets remain wide; `kriging_rss` flags hundreds of SNPs.\n\n**Options:**\n- Stratify by classical HLA allele (HIBAG, SNP2HLA imputation) and test allelic series\n- Conditional analysis on the lead variant before fine-mapping the residual\n- Exclude the region from genome-wide fine-mapping summaries and report separately\n- For chr8 inversion: stratify by inversion genotype if known\n\nDocument the caveat in any methods section; standard PIPs at HLA are not interpretable as causality estimates.\n\n## TWAS Fine-Mapping (FOCUS) -- delegated\n\nVariant-level fine-mapping cannot distinguish causal genes among co-regulated TWAS hits. FOCUS \u002F MA-FOCUS extend fine-mapping to the predicted-expression level; see causal-genomics\u002Ftranscriptome-wide-association for the full FOCUS workflow and reconciliation with variant-level credible sets.\n\n## Required Reporting Schema for Fine-Mapping\n\nEvery locus reported should carry these columns; missing fields are the most common reviewer complaint.\n\n| Column | Description |\n|--------|-------------|\n| locus_id | Locus identifier (chr:start-end or sentinel rsID) |\n| method | susie_rss \u002F FINEMAP \u002F PAINTOR \u002F SuSiEx \u002F SuSiE-inf |\n| L_used | `sum(!fit$sets$pruned)` (effective L; not just the cap passed in) |\n| n_credible_sets | Number of returned credible sets at the chosen coverage |\n| cs_size | Variants per credible set |\n| cs_purity_min \u002F cs_purity_mean | min and mean `fit$sets$purity[,'min.abs.corr']` per set |\n| top_pip_snp | Lead variant in each credible set |\n| top_pip | Posterior inclusion probability of top_pip_snp |\n| lambda_s | `estimate_s_rss` diagnostic for the locus |\n| kriging_outlier_count | Count of SNPs with `|z_obs - z_exp| > 3` |\n| ld_panel | 1KG-EUR \u002F UKB-EUR \u002F in-sample \u002F TopMed |\n| prior_source | uniform \u002F PolyFun-EUR \u002F PolyFun matched-ancestry baseline-LF \u002F manual coding-variant |\n| coverage | 0.95 default; 0.9 or 0.8 documented for low-N |\n| n_effective | Sample size passed to susie_rss (Neff for case-control) |\n\n## Anticipated Reviewer Pushback\n\n| Pushback | Standard response |\n|----------|-------------------|\n| \"In-sample vs reference LD?\" | In-sample preferred when cohort genotypes available; if reference, report `estimate_s_rss` lambda \u003C 0.05 plus `kriging_rss` outlier count |\n| \"Credible-set purity?\" | `min_abs_corr >= 0.5` (r2 >= 0.25) default; reported per set; relaxed only with explicit rationale for rare-variant fine-mapping |\n| \"Is L set high enough?\" | If returned CS count \u003C L cap: OK (susieR auto-prunes); otherwise raise L. HLA needs L=20-30 |\n| \"Why not SuSiE-inf?\" | Polygenic-shoulder test: count SNPs with marginal -log10(p) > 4 outside the lead credible set; > 50 indicates a polygenic shoulder and SuSiE-inf (Cui 2024) should be used |\n| \"Why no functional priors?\" | PolyFun applied (or manual coding-variant prior used) and reported; if uniform, justify (low-N, mismatched-ancestry baseline-LF) |\n| \"Credible set has 50 SNPs -- is that fine-mapping?\" | Acknowledged as imprecise; reported alongside diagnostics; cross-trait colocalization or functional fine-mapping (PolyFun, MPRA, allelic series) recommended for resolution |\n| \"Was Neff used for case-control?\" | Yes: `Neff = 4\u002F(1\u002FNcase + 1\u002FNcontrol)`; report the value used |\n| \"Allele harmonization?\" | Yes: flipped z when GWAS effect allele differs from reference A1; palindromic SNPs at MAF > 0.42 dropped |\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|-----------------|-------|----------|\n| `IBSS algorithm did not converge` warning | L too small OR LD mismatch | Increase L; run `estimate_s_rss`; check ancestry match |\n| Credible set contains all SNPs at locus | LD reference matches discovery poorly; `s_hat` > 0.1 | Switch to in-sample LD or stratify reference ancestry |\n| PIPs identical to GWAS p-value rank | Effectively no LD information used; check LD matrix orientation | Verify SNP order in z and R match exactly; check for transposed R |\n| Negative eigenvalues in LD matrix | Numerical PSD violation from finite-precision storage | Add small ridge: `R \u003C- R + diag(1e-4, nrow(R))`; or use `Matrix::nearPD` |\n| `pip` all ~ 1\u002Fp (uniform) | Convergence failure OR all effects pruned | Check `fit$converged`; raise L; check Z scale |\n| FINEMAP `Error: SNP names do not match` | .z and .ld SNP order differ | Ensure both are sorted identically; pass matched .snp file |\n| Coloc.susie returns NULL | One trait has zero credible sets | Verify both fits succeeded; lower coverage to 0.9 if signal is weak |\n| SuSiEx output empty | Per-population lists misaligned with reference panels | Verify `--sst_file`\u002F`--ref_file`\u002F`--ld_file` are in the same population order; check `--bp` window |\n| PolyFun priors do not change PIPs | Passed to `prior_variance` instead of `prior_weights` | Read susieR docs; use `prior_weights=` |\n\n## References\n\n- Wang G, Sarkar A, Carbonetto P, Stephens M 2020 J R Stat Soc B 82:1273 (SuSiE \u002F IBSS)\n- Zou Y, Carbonetto P, Wang G, Stephens M 2022 PLoS Genet 18:e1010299 (susie_rss for summary statistics)\n- Cui R, Elzur RA, Kanai M, Ulirsch JC, Weissbrod O et al 2024 Nat Genet 56:162 (SuSiE-inf \u002F FINEMAP-inf for non-sparse loci)\n- Benner C, Spencer CC, Havulinna AS, Salomaa V, Ripatti S, Pirinen M 2016 Bioinformatics 32:1493 (FINEMAP)\n- Hormozdiari F, Kostem E, Kang EY, Pasaniuc B, Eskin E 2014 Genetics 198:497 (CAVIAR)\n- Wen X, Lee Y, Luca F, Pique-Regi R 2016 AJHG 98:1114 (DAP-G)\n- Kichaev G, Yang WY, Lindstrom S, Hormozdiari F, Eskin E et al 2014 PLoS Genet 10:e1004722 (PAINTOR)\n- Weissbrod O, Hormozdiari F, Benner C, Cui R, Ulirsch J et al 2020 Nat Genet 52:1355 (PolyFun + functional priors)\n- Yuan K, Longchamps RJ, Pardinas AF, Yu M, Chen TT et al 2024 Nat Genet 56:1841 (SuSiEx cross-ancestry)\n- Rossen J, Shi H, Strober BJ, Zhang MJ, Kanai M, McCaw ZR, Liang L, Weissbrod O, Price AL 2025 Nat Genet 58:67 (MultiSuSiE; doi:10.1038\u002Fs41588-025-02450-5)\n- Mancuso N, Freund MK, Johnson R, Shi H, Kichaev G et al 2019 Nat Genet 51:675 (FOCUS for TWAS fine-mapping)\n- Wallace C 2021 PLoS Genet 17:e1009440 (coloc.susie integration)\n- Schaid DJ, Chen W, Larson NB 2018 Nat Rev Genet 19:491 (fine-mapping review)\n- Hutchinson A, Asimit J, Wallace C 2020 Hum Mol Genet 29:R81 (fine-mapping review)\n\n## Related Skills\n\n- causal-genomics\u002Fcolocalization-analysis - coloc.susie consumes susie_rss credible sets; equivalent harmonize helper\n- causal-genomics\u002Feffector-gene-prioritization - Downstream gene-assignment from credible-set variants\n- causal-genomics\u002Ftranscriptome-wide-association - FOCUS \u002F MA-FOCUS for gene-level fine-mapping\n- causal-genomics\u002Fgenomic-sem - Joint multi-trait fine-mapping when credible sets are shared across traits\n- causal-genomics\u002Fmendelian-randomization - Fine-mapped variants as cis-instruments\n- causal-genomics\u002Fpleiotropy-detection - Per-credible-set pleiotropy testing\n- atac-seq\u002Fenhancer-gene-linking - ABC \u002F ENCODE-rE2G linking credible-set variants to target genes\n- population-genetics\u002Flinkage-disequilibrium - Constructing LD matrices for susie_rss\n- population-genetics\u002Fassociation-testing - Upstream GWAS summary statistic generation\n- workflows\u002Fgwas-pipeline - End-to-end GWAS pipeline producing fine-mapping input\n- variant-calling\u002Fvariant-annotation - Annotating credible-set variants with VEP \u002F coding consequence\n- pathway-analysis\u002Fgo-enrichment - Downstream gene-level interpretation of credible-set targets\n",{"name":5,"source":24,"license":15,"tool_type":25,"description":7,"imported_at":26,"source_path":27,"primary_tool":28,"source_repository":29},"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills","r","2026-09-20","causal-genomics\u002Ffine-mapping\u002FSKILL.md","susieR","GPTomics\u002FbioSkills","main","2d1750717747097b602acf30bd09a7cbd4b4c6ea","awesome_skills\u002Fbiology\u002Fbio-causal-genomics-fine-mapping","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous","2026-11-09 11:45:36",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-causal-genomics-fine-mapping",{"tool":42,"command":43},"bunx","bunx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-causal-genomics-fine-mapping",{"tool":45,"command":46},"pnpm","pnpm dlx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-causal-genomics-fine-mapping","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-causal-genomics-fine-mapping\u002FSKILL.md",true,[50,56,62,66,70,74],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"examples\u002Ffinemap_pipeline.sh","SCRIPT","脚本",1976,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-causal-genomics-fine-mapping\u002Fexamples\u002Ffinemap_pipeline.sh",{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"examples\u002Fpip_visualization.R","OTHER","其他",3187,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-causal-genomics-fine-mapping\u002Fexamples\u002Fpip_visualization.R",{"path":63,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":64,"sourceHtmlUrl":65},"examples\u002Fsusie_finemapping.R",2330,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-causal-genomics-fine-mapping\u002Fexamples\u002Fsusie_finemapping.R",{"path":67,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":68,"sourceHtmlUrl":69},"examples\u002Fsusie_rss_finemap.R",6281,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-causal-genomics-fine-mapping\u002Fexamples\u002Fsusie_rss_finemap.R",{"path":71,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":72,"sourceHtmlUrl":73},"examples\u002Fsusiex_multiancestry.sh",2478,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-causal-genomics-fine-mapping\u002Fexamples\u002Fsusiex_multiancestry.sh",{"path":75,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":78,"sourceHtmlUrl":79},"usage-guide.md","REFERENCE","参考文档",6721,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-causal-genomics-fine-mapping\u002Fusage-guide.md",[81,89,96,103,110,117],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":88},"01M7FFFZPC2025JQQHPHDX154J","dei-assessment","Assess diversity, equity, and inclusion with metrics. TRIGGERS - Use when user needs help with dei-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-assessment\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":88},"01M7FFFWN8H4WA7A6Y398QKB6J","dei-action-plan","Create DEI action plans with goals and initiatives. TRIGGERS - Use when user needs help with dei-action-plan related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-action-plan\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":88},"01M7FFFSHTM0QZRVZ2NRJTJ0PY","culture-fit-assessment","Design culture add assessment processes. TRIGGERS - Use when user needs help with culture-fit-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fculture-fit-assessment\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":88},"01M7FFFMA12RKEQA38KHJSXXPS","cowork-to-code-bridge","Use an already-installed, independently verified cowork-to-code bridge to run narrowly approved actions on the user's own macOS, Linux, or WSL2 machine through a local file queue.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcowork-to-code-bridge\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":88},"01M7FFFH1F6M8YRGW5V487GH1K","counter-offer-response","Draft counter-offer responses for retention. TRIGGERS - Use when user needs help with counter-offer-response related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcounter-offer-response\u002FSKILL.md",[],[],{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":88},"01M7FFFDGEHV8Y7J9N40HZXW52","continuous-feedback-system","Design continuous feedback systems. TRIGGERS - Use when user needs help with continuous-feedback-system related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcontinuous-feedback-system\u002FSKILL.md",[],[]]