Skip to content

Commit a985bd6

Browse files
Merge pull request #91 from BodenmillerGroup/build_revert
Revert changes and add test
2 parents fd4b913 + a754793 commit a985bd6

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: cytomapper
2-
Version: 1.15.3
2+
Version: 1.15.4
33
Title: Visualization of highly multiplexed imaging data in R
44
Description:
55
Highly multiplexed imaging acquires the single-cell expression of

NEWS

+3
Original file line numberDiff line numberDiff line change
@@ -195,3 +195,6 @@ Changes in version 1.15.2 (2023-12-13):
195195

196196
Changes in version 1.15.3 (2024-03-13):
197197
+ measureObject fixes for Bioc 3.19 release
198+
199+
Changes in version 1.15.4 (2024-03-21):
200+
+ measureObject fix reversion and test - Bioc 3.19

R/measureObjects.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,8 @@ measureObjects <- function(mask,
254254
cur_colData <- colData(object)
255255
cur_df <- cbind(mcols(image), mcols(mask))
256256
cur_df <- cur_df[,unique(names(cur_df)), drop=FALSE]
257-
cur_colData <- merge(as.data.frame(as.matrix(cur_colData)),
258-
as.data.frame(as.matrix(cur_df)),
257+
cur_colData <- merge(as.data.frame(cur_colData),
258+
as.data.frame(cur_df),
259259
by = img_id, sort = FALSE)
260260
colData(object) <- as(cur_colData, "DataFrame")
261261

tests/testthat/test_measureObjects.R

+5
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,11 @@ test_that("measureObjects: defaults work", {
237237
feature_types = c("basic", "haralick"), haralick_feature = c("var.s1", "test"), haralick_scales = c(1, 3)),
238238
regexp = "Only haralick features of type asm.s1, con.s1, cor.s1, var.s1, idm.s1, sav.s1, sva.s1, sen.s1, ent.s1, dva.s1, den.s1, f12.s1, f13.s1, asm.s3, con.s3, cor.s3, var.s3, idm.s3, sav.s3, sva.s3, sen.s3, ent.s3, dva.s3, den.s3, f12.s3, f13.s3 allowed.",
239239
fixed = TRUE)
240+
241+
# Test for character img_id
242+
expect_silent(sce <- measureObjects(pancreasMasks, pancreasImages, img_id = "ImageName"))
243+
expect_true(is.numeric(sce$object_id))
244+
expect_equal(sce$object_id[1:10], c(824, 835, 839, 844, 847, 853, 859, 864, 865, 872))
240245
})
241246

242247
test_that("measureObjects: different settings work", {

0 commit comments

Comments
 (0)