Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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
COPYRIGHT HOLDER: Xuewei Cao, Haochen Sun, Ru Feng, Daniel Nachun, Kushal Dey, Gao Wang
7 changes: 6 additions & 1 deletion R/colocboost_inference.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 10 additions & 3 deletions vignettes/FineBoost_Special_Case.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
```
```


**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).
21 changes: 20 additions & 1 deletion vignettes/LD_Free_Colocalization.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down