@@ -51,7 +51,7 @@ test_that("read10xCounts works correctly for sparse counts, version < 3", {
51
51
write10xCounts(path = tmpdir2 , my.counts * 2 , gene.id = gene.ids , gene.symbol = gene.symb , barcodes = cell.ids )
52
52
53
53
sce10x2 <- read10xCounts(tmpdir2 )
54
- expect_identical (assay(sce10x )* 2 , assay(sce10x2 ))
54
+ expect_equal (assay(sce10x )* 2L , assay(sce10x2 ))
55
55
56
56
ref <- cbind(sce10x , sce10x2 )
57
57
colnames(ref ) <- NULL
@@ -115,7 +115,7 @@ test_that("read10xCounts works for sparse counts with odd inputs", {
115
115
write10xCounts(path = tmpdir , my.counts , gene.id = gene.ids , gene.symbol = gene.symb2 , barcodes = cell.ids )
116
116
sce10x <- read10xCounts(tmpdir )
117
117
118
- expect_identical (assay(sce10x , withDimnames = FALSE ), my.counts )
118
+ expect_equal (assay(sce10x , withDimnames = FALSE ), my.counts )
119
119
expect_identical(colData(sce10x )$ Barcode , cell.ids )
120
120
expect_identical(rowData(sce10x )$ ID , gene.ids )
121
121
expect_identical(rowData(sce10x )$ Symbol , gene.symb2 )
@@ -143,7 +143,7 @@ test_that("read10xCounts works correctly for sparse counts, version >= 3", {
143
143
sce10delayed <- read10xCounts(c(tmpdir , tmpdir ), delayed = TRUE )
144
144
expect_s4_class(counts(sce10delayed ), " DelayedMatrix" )
145
145
converted <- as(counts(sce10delayed ), " CsparseMatrix" )
146
- expect_identical (converted , cbind(alt.counts , alt.counts ))
146
+ expect_equal (converted , cbind(alt.counts , alt.counts ))
147
147
})
148
148
149
149
test_that(" read10xCounts works correctly for zipped files" , {
@@ -244,7 +244,7 @@ test_that("read10xCounts works correctly with mismatching features", {
244
244
# Intersection works as expected.
245
245
sce10x <- read10xCounts(c(tmpdir1 , tmpdir2 ), intersect.genes = TRUE )
246
246
expect_identical(rownames(sce10x ), gene.ids [keep ])
247
- expect_identical (assay(sce10x , withDimnames = FALSE ), cbind(my.counts [keep ,], my.counts [keep ,]))
247
+ expect_equal (assay(sce10x , withDimnames = FALSE ), cbind(my.counts [keep ,], my.counts [keep ,]))
248
248
})
249
249
250
250
test_that(" read10xCounts, use gene symbols as row names" , {
0 commit comments