Skip to content

Commit

Permalink
Merge pull request #1111 from jiajic/suite_dev
Browse files Browse the repository at this point in the history
fix: slide setting passing
  • Loading branch information
jiajic authored Mar 1, 2025
2 parents a720a10 + 0f6feb8 commit 7b6e6b4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
8 changes: 5 additions & 3 deletions R/convenience_cosmx.R
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ setMethod(
micron = .Object@micron,
px2um = .Object@px2um,
offsets = .Object@offsets,
slide = .Object@slide,
verbose = verbose
)
}
Expand All @@ -375,7 +376,8 @@ setMethod(
path = path,
fovs = .Object@fovs %none% NULL,
feat_type = feat_type,
split_keyword = split_keyword
split_keyword = split_keyword,
slide = .Object@slide
)
}
.Object@calls$load_expression <- expr_fun
Expand Down Expand Up @@ -426,6 +428,7 @@ setMethod(
verbose = NULL) {
.cosmx_cellmeta(
path = path,
slide = .Object@slide,
fovs = .Object@fovs %none% NULL,
dropcols = dropcols,
cores = cores,
Expand Down Expand Up @@ -838,7 +841,7 @@ setMethod("$<-", signature("CosmxReader"), function(x, name, value) {
f <- x <- y <- NULL

path <- normalizePath(path)

GiottoUtils::vmsg(.v = verbose, "loading segmentation masks...")
vmsg(.v = verbose, .is_debug = TRUE, path)

Expand Down Expand Up @@ -1368,7 +1371,6 @@ createGiottoCosMxObject <- function(
"4.2.0", "createGiottoCosMxObject(background_algo)")
}


# setup importer
x <- importCosMx(cosmx_dir,
fovs = FOVs,
Expand Down
8 changes: 6 additions & 2 deletions tests/testthat/test_dataImports.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@

test_that("Expression matrix is read correctly", {
# getSpatialDataset
GiottoData::getSpatialDataset(dataset = "scRNA_mouse_brain", directory = paste0(getwd(), "/testdata/"))
expect_warning(expect_warning(GiottoData::getSpatialDataset(
dataset = "scRNA_mouse_brain",
directory = paste0(getwd(), "/testdata/")
), regexp = "output directory does not exist"), regexp = "footer")

# readExprMatrix
expr_mat <- readExprMatrix(paste0(getwd(), "/testdata/brain_sc_expression_matrix.txt.gz"))
expr_mat <- readExprMatrix(
paste0(getwd(), "/testdata/brain_sc_expression_matrix.txt.gz"))

expect_s4_class(expr_mat, "dgCMatrix")
expect_equal(expr_mat@Dim, c(27998, 8039))
Expand Down

0 comments on commit 7b6e6b4

Please sign in to comment.