diff --git a/LICENSE b/LICENSE index 37a50ff..32027c8 100644 --- a/LICENSE +++ b/LICENSE @@ -1,3 +1,2 @@ YEAR: 2025 -COPYRIGHT HOLDER: Xuewei Cao, Haochen Sun, Ru Feng, Daniel Nachun, Kushal Dey, Gao Wang -ORGANIZATION: StatFunGen Lab, Columbia University \ No newline at end of file +COPYRIGHT HOLDER: Xuewei Cao, Haochen Sun, Ru Feng, Daniel Nachun, Kushal Dey, Gao Wang \ No newline at end of file diff --git a/R/colocboost_inference.R b/R/colocboost_inference.R index 567d43d..bc709b5 100644 --- a/R/colocboost_inference.R +++ b/R/colocboost_inference.R @@ -537,7 +537,12 @@ get_cos_evidence <- function(cb_obj, coloc_out, data_info) { get_npuc <- function(npc_outcome) { max_idx <- which.max(npc_outcome) - npc_outcome[max_idx] * prod(1 - npc_outcome[-max_idx]) + npc_max <- npc_outcome[max_idx] + if (npc_max == 0) { + return(0) + } else { + return(npc_outcome[max_idx] * prod(1 - npc_outcome[-max_idx])) + } } avWeight <- coloc_out$avWeight diff --git a/vignettes/FineBoost_Special_Case.Rmd b/vignettes/FineBoost_Special_Case.Rmd index af081be..547d136 100644 --- a/vignettes/FineBoost_Special_Case.Rmd +++ b/vignettes/FineBoost_Special_Case.Rmd @@ -16,8 +16,9 @@ knitr::opts_chunk$set( ``` -This vignette demonstrates how to perform single-trait fine-mapping analysis using FineBoost, a specialized single-trait version of ColocBoost, with both individual-level data and summary statistics. Specifically focusing on the 2nd trait with 2 causal variants (644 and 2289) from the `Ind_5traits` and `Sumstat_5traits` datasets included in the package. - +This vignette demonstrates how to perform single-trait fine-mapping analysis using FineBoost, a specialized single-trait version of ColocBoost, +with both individual-level data and summary statistics. Specifically focusing on the 2nd trait with 2 causal variants (194 and 589) from the +`Ind_5traits` and `Sumstat_5traits` datasets included in the package. ```{r setup} library(colocboost) @@ -65,4 +66,10 @@ This approach is less computationally intensive but assumes that only one varian # Load example data res <- colocboost(sumstat = sumstat) colocboost_plot(res) -``` \ No newline at end of file +``` + + +**Note**: Weak learners SEL in FineBoost may capture noise as putative signals, potentially introducing false positives to our findings. +To identify and filter spurious signals, we discard fine-tunned the threshold of $\Delta L_l$ using extensive simulations to balance sensitivity and specificity. +This threshold is set to 0.025 by default for ColocBoost when detect the colocalization, but we suggested a less conservative threshold of 0.015 for FineBoost +when performing single-trait fine-mapping analysis (`check_null_max = 0.015` as we suggested). \ No newline at end of file diff --git a/vignettes/LD_Free_Colocalization.Rmd b/vignettes/LD_Free_Colocalization.Rmd index 6011eee..7ed10b9 100644 --- a/vignettes/LD_Free_Colocalization.Rmd +++ b/vignettes/LD_Free_Colocalization.Rmd @@ -45,8 +45,8 @@ ColocBoost provides diagnostic warnings for assessing the consistency of the sum - Estimated residual variance of the model is negative or greater than phenotypic variance (`rtr < 0` or `rtr > var_y`; see details in Supplementary Note S3.5.2). -- Change in trait-specific profile log-likelihood according to a CoS is negative (see details in Supplementary Note S3.5.3). - The trait-specific gradient boosting model fails to converge. +- Change in trait-specific profile log-likelihood according to a CoS is negative (see details in Supplementary Note S3.5.3). ### Example of including LD mismatch @@ -79,11 +79,30 @@ However, the results may be less reliable due to the mismatch, and the computati ```{r LD-mismatch-runcode} res <- colocboost(sumstat = sumstat, LD = LD) +res$cos_details$cos$cos_index ``` These warnings serve as diagnostic tools to alert users about potential inconsistencies in the input data. +```{r LD-mismatch-mpc_0} +res$cos_details$cos_outcomes_npc +``` + +**Note**: In the above example, the normalized probability of trait 2 is 0, indicating that colocalization with trait 2 may be less reliable due to the LD mismatch. +This is a warning, not an error, and the colocalization analysis will still proceed. Therefore, in this case, we suggest treating the colocalization of trait 2 with caution. + +Potential solutions include: + +- Using a more accurate LD matrix for trait 2. +- Excluding trait 2 from the analysis or colocalization results. +- Using the LD-mismatch or LD-free approach for colocalization analysis (below). +- Check the visualization of colocalization results including trait 2 using `colocboost_plot(res)`. Remove the potential spurious signals when LD mismatch is detected using + - `get_robust_colocalization(res, cos_npc_cutoff = 0.5, npc_outcome_cutoff = 0.2)` to exclude the trait 2 in the above example if the signals are not reasonable. + - `get_robust_colocalization(res, pvalue_cutoff = 1e-5, cos_npc_cutoff = 0, npc_outcome_cutoff = 0)` to include all colocalized traits with the larger marginal evidence, + but the mismatch is detected. + + # 2. LD-free and LD-mismatch colocalization analysis When there is substantial discordance between the LD matrix and summary statistics,