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
2 changes: 1 addition & 1 deletion R/colocboost_init.R
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ process_individual_data <- function(X, Y, dict_YX, target_variants,
ind_id_Y <- rownames(Y[[i]])
ind_id_X <- rownames(X[[current_matrix_type]])
if (is.null(ind_id_X) || is.null(ind_id_Y)) {
stop("Please provide the sample index of X and Y, since they do not have the same sample size!")
stop("Please provide the sample index of X and Y, since they do not have the same samples!")
}
# Find matching samples
pos <- match(ind_id_Y, ind_id_X)
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test_colocboost.R
Original file line number Diff line number Diff line change
Expand Up @@ -241,5 +241,5 @@ test_that("colocboost handles missing/invalid inputs appropriately", {
Y_list <- list(test_data$Y[,1], test_data$Y[,2])
X_list <- list(X_bad, X_bad)

expect_error(colocboost(X = X_list, Y = Y_list), "do not have the same sample size")
expect_error(colocboost(X = X_list, Y = Y_list), "Please provide the sample index of X and Y, since they do not have the same samples!")
})
4 changes: 2 additions & 2 deletions tests/testthat/test_corner_cases.R
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ test_that("colocboost handles missing values in Y", {
X_list <- list(test_data$X, test_data$X)

# Run colocboost - should handle NAs automatically
expect_warning(
expect_error(
result <- colocboost(
X = X_list,
Y = Y_list,
Expand All @@ -110,7 +110,7 @@ test_that("colocboost handles different sample sizes", {
# Run colocboost - should error without sample indices
expect_error(
colocboost(
X = test_data$X[1],
X = test_data$X,
Y = test_data$Y
)
)
Expand Down