data(immdata)
dist_test <- seqDist(immdata$data[1])
# Arrange
negative_test_cases <- list(
"Wrong data" = list(
args = list(
.data = immdata[1:2],
.dist = dist_test
)
),
"No matching col" = list(
args = list(
.data = immdata$data[[1]] %>% mutate("CDR3.nt" = NULL),
.dist = dist_test
)
),
"Wrong samples" = list(
args = list(
.data = immdata$data[3],
.dist = dist_test
)
),
"Multiple thresholds" = list(
args = list(
.data = immdata$data[1],
.dist = dist_test,
.fixed_threshold = 10,
.nt_similarity = 3
)
),
"No thresholds" = list(
args = list(
.data = immdata$data[1],
.dist = dist_test,
.fixed_threshold = NULL
)
)
)
negative_args <- map(negative_test_cases, "args")
# Act, Assert
map2(names(negative_test_cases), negative_args, ~ test_that(.x, expect_error(do.call(seqCluster, .y))))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.