Interpret ColocBoost Output

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  dpi = 80
)

This vignette demonstrates how to interpret the output of ColocBoost, specifically to get the summary of colocalization and focusing only on strong colocalization events.

library(colocboost)

1. Summarize ColocBoost results

Causal variant structure

The dataset features two causal variants with indices 194 and 589.

# Loading the Dataset
data(Ind_5traits)
# Run colocboost 
res <- colocboost(X = Ind_5traits$X, Y = Ind_5traits$Y)
cos_summary <- res$cos_summary
names(cos_summary)

The cos_summary object contains the colocalization summary for all colocalization events, with each row representing a single colocalization event. The summary includes the following columns:

To obtain the summary of colocalization with a specific focus on traits of interest, you can use the get_cos_summary, see the detailed usage of this function in link. This function allows you to filter the colocalization summary based on a particular outcome of interest, making it easier to interpret the results for specific traits. For example, if you are interested in the colocalization events involving the traits Y1 and Y2, you can use the following code:

# Get summary table of colocalization
cos_interest_outcome <- get_cos_summary(res, interest_outcome = c("Y1", "Y2"))

2. Filter colocalization events by relative strength of evidence

In cos_summary, for each 95% CoS, the cos_npc column provides a normalized probability of colocalization and min_npc_outcome column provides the minimum normalized probability among colocalized traits. Those two metrics are measured as an empirical evidence of colocalization both in CoS-level and in trait-level. To obtain the best minimal colocalization configuration can be defined by using both cos_npc and npc_outcome. See the detailed usage of this function in link.

filter_res <- get_robust_colocalization(res, cos_npc_cutoff = 0.5, npc_outcome_cutoff = 0.2)

3. More details on ColocBoost output

The entire colocalization output from colocboost is stored in the colocboost object, which contains several components:

In this section, we will provide a detailed explanation of the components for deepening into ColocBoost result using a mixed dataset.

# Load example data
data(Ind_5traits)
data(Sumstat_5traits) 
# Create a mixed dataset
X <- Ind_5traits$X[1:4]
Y <- Ind_5traits$Y[1:4]
sumstat <- Sumstat_5traits$sumstat[5]
LD <- get_cormat(Ind_5traits$X[[1]])
# Run colocboost
res <- colocboost(X = X, Y = Y, sumstat = sumstat, LD = LD)

3.1. Variant colocalization probability (vcp)

colocboost_plot(res, y = "vcp")

Please visit our documentation portal at Visualization of ColocBoost Results for more details on the colocboost_plot function

3.2. Analyzed data information (data_info)

res$data_info$outcome_info

3.3. Colocalization details (cos_details)

cos_details provides a detailed information for colocalization events identified by colocboost. This section will provide a detailed explanation of the components in cos_details.

names(res$cos_details)

3.3.1. Colocalized variants for each CoS (cos)

res$cos_details$cos

3.3.2. Colocalized traits for each 95% CoS (cos_outcomes)

res$cos_details$cos_outcomes
res$cos_details$cos_npc
res$cos_details$cos_outcomes_npc
res$cos_details$cos_purity
res$cos_details$cos_top_variables

3.4. Model information (model_info)

# Pick arbitrary SEC updates, see entire update in advance
res$model_info$jk_star[c(5:10,36:38), ]
# Plotting joint profile log-likelihood (blue) and trait-specific profile log-likelihood (red).
par(mfrow=c(2,3),mar=c(4,4,2,1))
plot(res$model_info$profile_loglik, type="p", col="#3366CC", lwd=2, xlab="", ylab="Joint Profile")
for(i in 1:5){
plot(res$model_info$outcome_profile_loglik[[i]], type="p", col="#CC3333", lwd=2, xlab="", ylab=paste0("Profile (Trait ", i, ")"))
}
# Save to restore default options
oldpar <- par(no.readonly = TRUE)
# Plotting trait-specific proximity objective
par(mfrow=c(2,3), mar=c(4,4,2,1))
for(i in 1:5){
plot(res$model_info$outcome_proximity_obj[[i]], type="p", col="#3366CC", lwd=2, xlab="", ylab="Trait-specific Objective", main = paste0("Trait ", i))
}
par(oldpar)
# Save to restore default options
oldpar <- par(no.readonly = TRUE)
# Plotting trait-specific objective at the best update variant
par(mfrow=c(2,3), mar=c(4,4,2,1))
for(i in 1:5){ 
  plot(res$model_info$outcome_coupled_best_update_obj[[i]], type="p", col="#CC3333", lwd=2, xlab="", ylab=paste0("Objective at best update variant"), main = paste0("Trait ", i)) 
}
par(oldpar)

3.5. Trait-specific effects information (ucos_details)

There is ucos_details in ColocBoost output when setting output_level = 2, including the trait-specific (uncolocalized) information from the single-effect learner (SEL).

# Create a mixed dataset
data(Ind_5traits)
data(Heterogeneous_Effect)
X <- Ind_5traits$X[1:3]
Y <- Ind_5traits$Y[1:3]
X1 <- Heterogeneous_Effect$X
Y1 <- Heterogeneous_Effect$Y[,1,drop=F]
res <- colocboost(X = c(X, list(X1)), Y = c(Y, list(Y1)), output_level = 2)
names(res$ucos_details)

3.5.1. Trait-specific (uncolocalized) confidence sets (ucos)

res$ucos_details$ucos

3.5.2. Trait-specific (uncolocalized) outcomes (ucos_outcomes)

res$ucos_details$ucos_outcomes

3.5.3. Purity across CoS and uCoS (cos_ucos_purity)

res$ucos_details$cos_ucos_purity

3.5.4. Other components

By analyzing these components, you can gain a deeper understanding of trait-specific (uncolocalized) effects that are not colocalized, providing additional insights into the data.

3.6. Diagnostic details (diagnostic_details)

There is diagnostic_details in ColocBoost output when setting output_level = 3:

# Loading the dataset
data(Ind_5traits)
X <- Ind_5traits$X
Y <- Ind_5traits$Y
res <- colocboost(X = X, Y = Y, output_level = 3)
names(res$diagnostic_details$cb_model)
names(res$diagnostic_details$cb_model$ind_outcome_1)
names(res$diagnostic_details$cb_model_para)


Try the colocboost package in your browser

Any scripts or data that you put into this service are public.

colocboost documentation built on June 8, 2025, 11:07 a.m.