Skip to content

Commit

Permalink
Fixing CI 4 - Updated tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
enblacar committed Feb 6, 2024
1 parent 6120dd2 commit 510600e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 100 deletions.
13 changes: 0 additions & 13 deletions tests/testthat/test-do_DiffusionMapPlot.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,6 @@ if (base::isFALSE(dep_check[["do_DiffusionMapPlot"]])){
enforce_symmetry = FALSE)
testthat::expect_type(p, "list")

p <- SCpubr::do_DiffusionMapPlot(sample = sample,
input_gene_list = genes,
subsample = NA,
nbin = 1,
ctrl = 5,
reduction = "umap",
dims = 1:2,
return_object = TRUE,
verbose = FALSE,
flavor = "AUCell",
use_viridis = TRUE,
enforce_symmetry = FALSE)
testthat::expect_type(p, "list")

p <- SCpubr::do_DiffusionMapPlot(sample = sample,
input_gene_list = genes,
Expand Down
18 changes: 0 additions & 18 deletions tests/testthat/test-do_EnrichmentHeatmap.R
Original file line number Diff line number Diff line change
Expand Up @@ -169,24 +169,6 @@ if (base::isFALSE(dep_check[["do_EnrichmentHeatmap"]])){
ctrl = 10,
viridis.direction = -1)
testthat::expect_true("ggplot" %in% class(p))

p <- SCpubr::do_EnrichmentHeatmap(sample = sample,
input_gene_list = genes,
flavor = "AUCell",
assay = "SCT",
nbin = 1,
ctrl = 10,
viridis.direction = 1)
testthat::expect_true("ggplot" %in% class(p))

p <- SCpubr::do_EnrichmentHeatmap(sample = sample,
input_gene_list = genes,
flavor = "AUCell",
assay = "SCT",
nbin = 1,
ctrl = 10,
viridis.direction = -1)
testthat::expect_true("ggplot" %in% class(p))
})

testthat::test_that("do_EnrichmentHeatmap: PASS - normal", {
Expand Down
70 changes: 1 addition & 69 deletions tests/testthat/test-do_SCEnrichmentHeatmap.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,72 +59,10 @@ if (base::isFALSE(dep_check[["do_SCEnrichmentHeatmap"]])){
ctrl = 5)})

sample$test <- as.factor(sample$seurat_clusters)
p <- SCpubr::do_SCEnrichmentHeatmap(sample = sample,
input_gene_list = genes,
group.by = "test",
flavor = "AUCell",
assay = "SCT",
nbin = 1,
ctrl = 5)
testthat::expect_type(p, "list")

genes <- list("A" = rownames(sample)[1:5])

p <- SCpubr::do_SCEnrichmentHeatmap(sample = sample,
subsample = 100,
input_gene_list = genes,
flavor = "AUCell",
assay = "SCT",
nbin = 1,
ctrl = 5)
testthat::expect_type(p, "list")


p <- SCpubr::do_SCEnrichmentHeatmap(sample = sample,
input_gene_list = genes,
flavor = "AUCell",
assay = "SCT",
nbin = 1,
ctrl = 5,
cluster = TRUE)
testthat::expect_type(p, "list")

p <- SCpubr::do_SCEnrichmentHeatmap(sample = sample,
input_gene_list = genes,
flavor = "AUCell",
assay = "SCT",
nbin = 1,
ctrl = 5,
cluster = FALSE)
testthat::expect_type(p, "list")

p <- SCpubr::do_SCEnrichmentHeatmap(sample = sample,
input_gene_list = genes,
flavor = "AUCell",
assay = "SCT",
nbin = 1,
ctrl = 5,
metadata = c("orig.ident", "seurat_clusters"),
metadata.colors = list("orig.ident" = c("Cell" = "red")))
testthat::expect_type(p, "list")

p <- SCpubr::do_SCEnrichmentHeatmap(sample = sample,
input_gene_list = genes,
flavor = "AUCell",
assay = "SCT",
nbin = 1,
ctrl = 5,
proportional.size = TRUE)
testthat::expect_type(p, "list")

p <- SCpubr::do_SCEnrichmentHeatmap(sample = sample,
input_gene_list = genes,
flavor = "AUCell",
assay = "SCT",
nbin = 1,
ctrl = 5,
proportional.size = FALSE)
testthat::expect_type(p, "list")


testthat::expect_warning({p <- SCpubr::do_SCEnrichmentHeatmap(sample = sample,
Expand All @@ -136,13 +74,7 @@ if (base::isFALSE(dep_check[["do_SCEnrichmentHeatmap"]])){
ctrl = 5)})
testthat::expect_type(p, "list")

p <- SCpubr::do_SCEnrichmentHeatmap(sample = sample,
input_gene_list = genes,
flavor = "AUCell",
assay = "SCT",
nbin = 1,
ctrl = 5)
testthat::expect_type(p, "list")


testthat::expect_warning({p <- SCpubr::do_SCEnrichmentHeatmap(sample = sample,
input_gene_list = genes,
Expand Down

0 comments on commit 510600e

Please sign in to comment.