Skip to content

Commit

Permalink
changed detectCommunity test for group_by parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
SchulzDan committed Oct 28, 2024
1 parent b9e7e33 commit 70adc27
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: imcRtools
Version: 1.11.3
Version: 1.11.4
Title: Methods for imaging mass cytometry data analysis
Description:
This R package supports the handling and analysis of imaging mass cytometry
Expand Down
4 changes: 4 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -234,3 +234,7 @@ Changes in version 1.11.2 (2024-10-08)
Changes in version 1.11.3 (2024-10-25)

+ fixed testdetectCommunity function

Changes in version 1.11.4 (2024-10-28)

+ changed testdetectCommunity function for group_by parameter
8 changes: 3 additions & 5 deletions tests/testthat/test_detectCommunity.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,9 @@ test_that("detectCommunity function works", {
BPPARAM = SerialParam(RNGseed = 123)
))
expect_false(identical(cur_sce_4$spatial_community, cur_sce$spatial_community))
expect_equal(cur_sce_4$spatial_community[1:10],c(E34_824 = "celltype_C_1", E34_835 = "celltype_C_2", E34_839 = "celltype_C_1",
E34_844 = "celltype_C_1", E34_847 = "celltype_C_2", E34_853 = "celltype_C_1",
E34_859 = "celltype_C_1", E34_864 = "celltype_C_1", E34_865 = "celltype_C_1",
E34_872 = "celltype_C_1"))

dat <- as.data.frame(unclass(table(cur_sce_4$spatial_community,cur_sce_4$CellType)))
expect_true(all(rowSums(dat != 0) == 1))


# manual coding spatial communities gives the same result
set.seed(22)
Expand Down

0 comments on commit 70adc27

Please sign in to comment.