Skip to content

Commit

Permalink
minor fix to pass R CMD check on macOS 12.4 Monterey
Browse files Browse the repository at this point in the history
  • Loading branch information
alikhuseynov committed Oct 28, 2024
1 parent 251ba1e commit 758b6d2
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 35 deletions.
32 changes: 19 additions & 13 deletions man/SpatialFeatureExperiment.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions man/readCosMX.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions man/readVizgen.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions man/readXenium.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 10 additions & 9 deletions man/reexports.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion tests/testthat/test-aggregate.R
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ test_that("aggregate for SFE by cells, manually supply `by` argument", {
})

test_that("aggregate.SFE use a row* function", {
agg2 <- aggregate(sfe, by = grid2, FUN = rowMedians)
#agg2 <- aggregate(sfe, by = grid2, FUN = rowMedians) # doesn't work MatrixGenerics::rowMedians
agg2 <- aggregate(sfe, by = grid2, FUN = rowMeans2) # works MatrixGenerics::rowMeans2
expect_s4_class(agg2, "SpatialFeatureExperiment")
# empty grid cells were removed
expect_true(ncol(agg2) <= length(grid2) & ncol(agg2) > 0)
Expand Down
5 changes: 2 additions & 3 deletions tests/testthat/test-read.R
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,7 @@ test_that("Deal with multiple pieces, remove pieces that are too small", {
dir_use <- VizgenOutput("hdf5", file_path = fp)
file.remove(file.path(dir_use, "cell_boundaries.parquet"))
suppressWarnings(st_write_parquet(parq2, file.path(dir_use, "cell_boundaries.parquet")))

expect_warning(sfe <- readVizgen(dir_use, z = 3L, image = "PolyT"), "The largest piece is kept")
expect_warning(sfe <- readVizgen(dir_use, z = 3L, min_area = 15, image = "PolyT"), "The largest piece is kept")
cg <- cellSeg(sfe)
expect_equal(st_geometry_type(cg, by_geometry = "FALSE") |> as.character(), "POLYGON")
expect_equal(colnames(sfe), as.character(parq2$EntityID[c(1,2,4)]))
Expand All @@ -371,7 +370,7 @@ test_that("No polygons left", {
file.remove(file.path(dir_use, "cell_boundaries.parquet"))
suppressWarnings(st_write_parquet(parq2, file.path(dir_use, "cell_boundaries.parquet")))

expect_error(readVizgen(dir_use, z = 3L, image = "PolyT"),
expect_error(readVizgen(dir_use, z = 3L, min_area = 15, image = "PolyT"),
"No polygons left after filtering")
unlink(dir_use, recursive = TRUE)
})
Expand Down

0 comments on commit 758b6d2

Please sign in to comment.