Skip to content

Commit

Permalink
Update test to match seurat version update and leiden changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bbimber committed Jan 15, 2025
1 parent 5c58d6c commit 92904ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/testthat/test-seurat.R
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ test_that("Seurat processing works as expected", {

seuratObj <- FindClustersAndDimRedux(seuratObj, useLeiden = TRUE)
expect_equal(ncol(seuratObj), 487)
expect_equal(length(unique(seuratObj$ClusterNames_0.6)), 7)
expect_equal(length(unique(seuratObj$ClusterNames_0.6)), 5)

#Note: Seurat::PercentageFeatureSet returns 0-100. our code is currently a fraction (0-1.0)
expect_true(max(seuratObj$p.mito) < 1.0)
Expand All @@ -86,7 +86,7 @@ test_that("Seurat processing works as expected", {
dt

df <- utils::read.table(mf, sep = '\t', header = T)
expect_equal(nrow(df), 868)
expect_equal(nrow(df), 276)
expect_equal(sum(df$avg_logFC > 0.5), nrow(df))

unlink(mf)
Expand All @@ -97,7 +97,7 @@ test_that("Seurat processing works as expected", {
dt

df <- utils::read.table(mf, sep = '\t', header = T)
expect_equal(nrow(df), 2224)
expect_equal(nrow(df), 876)
expect_equal(sum(df$avg_logFC > 0.5), nrow(df))

unlink(mf)
Expand Down

0 comments on commit 92904ee

Please sign in to comment.