Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
csangara committed Jun 20, 2023
1 parent 0cd3371 commit 15bf3f1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/testthat/test-application_prediction.R
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ test_that("Target gene prediction can be predicted by multi-ligand models", {
target_prediction_performances_discrete_cv = gene_predictions_list %>% lapply(calculate_fraction_top_predicted,quantile_cutoff = 0.66) %>% bind_rows()
expect_type(target_prediction_performances_discrete_cv,"list")

target_prediction_performances_fisher_pval = gene_predictions_list %>% lapply(calculate_fraction_top_predicted_fisher,quantile_cutoff = 0.66) %>% unlist() %>% mean()
target_prediction_performances_fisher_pval = gene_predictions_list %>% lapply(calculate_fraction_top_predicted_fisher,quantile_cutoff = 0.5) %>% unlist() %>% mean()
expect_type(target_prediction_performances_fisher_pval,"double")

})
Expand Down Expand Up @@ -174,6 +174,8 @@ test_that("Single-cell ligand activity prediction functions work a bit OK", {
expect_type(normalized_ligand_activities,"list")

cell_scores_tbl = tibble(cell = cell_ids, score = c(1,4,2,3))
# Since changing the metric, these return zeros so standard deviation is zero
normalized_ligand_activities <- cbind(normalized_ligand_activities %>% select(cell), normalized_ligand_activities %>% select(-cell) + matrix(rnorm(12, sd=0.01),4))
regression_analysis_output = single_ligand_activity_score_regression(normalized_ligand_activities,cell_scores_tbl)
expect_type(regression_analysis_output,"list")

Expand Down

0 comments on commit 15bf3f1

Please sign in to comment.