From afcb0cac6bd99f5d30acf6ed3f96c3595efadbe4 Mon Sep 17 00:00:00 2001 From: xuewei cao <36172337+xueweic@users.noreply.github.com> Date: Tue, 5 May 2026 08:43:31 -0400 Subject: [PATCH] Update colocboost_output.R simple fix bug --- R/colocboost_output.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/colocboost_output.R b/R/colocboost_output.R index 826e07b..e1d2490 100644 --- a/R/colocboost_output.R +++ b/R/colocboost_output.R @@ -313,8 +313,8 @@ get_robust_colocalization <- function(cb_output, } } w_outcome <- colnames(w) - config_outcome <- paste0("outcome", config_idx) - pos <- which(w_outcome %in% config_outcome) + w_outcome_idx <- as.integer(gsub("^(outcome|Y)", "", w_outcome)) + pos <- which(!is.na(match(w_outcome_idx, config_idx))) ww = w[, pos, drop = FALSE] colnames(ww) <- gsub("outcome", "Y", colnames(ww)) ww