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
10 changes: 5 additions & 5 deletions tests/testthat/test_inference.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ generate_test_result <- function(n = 100, p = 20, L = 2, seed = 42) {

if (L == 1) {
# Single trait case
true_beta[5, 1] <- 0.5 # SNP5 affects the trait
true_beta[10, 1] <- 0.3 # SNP10 also affects the trait
true_beta[5, 1] <- 0.7 # SNP5 affects the trait
true_beta[10, 1] <- 0.6 # SNP10 also affects the trait
} else {
# Multi-trait case
true_beta[5, 1] <- 0.5 # SNP5 affects trait 1
true_beta[5, 2] <- 0.4 # SNP5 also affects trait 2 (colocalized)
true_beta[10, 2] <- 0.3 # SNP10 only affects trait 2
true_beta[5, 1] <- 0.7 # SNP5 affects trait 1
true_beta[5, 2] <- 0.6 # SNP5 also affects trait 2 (colocalized)
true_beta[10, 2] <- 0.5 # SNP10 only affects trait 2
}

# Generate Y with some noise
Expand Down
10 changes: 5 additions & 5 deletions tests/testthat/test_utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ generate_test_result <- function(n = 100, p = 20, L = 2, seed = 42) {

if (L == 1) {
# Single trait case
true_beta[5, 1] <- 0.5 # SNP5 affects the trait
true_beta[10, 1] <- 0.3 # SNP10 also affects the trait
true_beta[5, 1] <- 0.7 # SNP5 affects the trait
true_beta[10, 1] <- 0.6 # SNP10 also affects the trait
} else {
# Multi-trait case
true_beta[5, 1] <- 0.5 # SNP5 affects trait 1
true_beta[5, 2] <- 0.4 # SNP5 also affects trait 2 (colocalized)
true_beta[10, 2] <- 0.3 # SNP10 only affects trait 2
true_beta[5, 1] <- 0.7 # SNP5 affects trait 1
true_beta[5, 2] <- 0.6 # SNP5 also affects trait 2 (colocalized)
true_beta[10, 2] <- 0.5 # SNP10 only affects trait 2
}

# Generate Y with some noise
Expand Down