Skip to content

Commit

Permalink
explicit function calls in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oganm committed May 23, 2024
1 parent 096689f commit 873f237
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/testthat/testOrderSanity.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,38 +56,38 @@ test_that('Multiple sanity checks for expression/differential expression values
c(213742,20592))

expect_true(
max(assay(object[[1]],'counts')[rowData(object[[1]])$GeneSymbol=='Xist',
max(SummarizedExperiment::assay(object[[1]],'counts')[SummarizedExperiment::rowData(object[[1]])$GeneSymbol=='Xist',
tolower(object[[1]]$`biological sex`) =='male', drop = FALSE] %>%
colMeans(),na.rm=TRUE) <
min(assay(object[[1]],'counts')[rowData(object[[1]])$GeneSymbol=='Xist',
min(SummarizedExperiment::assay(object[[1]],'counts')[SummarizedExperiment::rowData(object[[1]])$GeneSymbol=='Xist',
tolower(object[[1]]$`biological sex`) =='female', drop = FALSE] %>%
colMeans(),na.rm=TRUE)
)

expect_true(
max(assay(object[[1]],'counts')[rowData(object[[1]])$GeneSymbol=='Kdm5d',
max(SummarizedExperiment::assay(object[[1]],'counts')[SummarizedExperiment::rowData(object[[1]])$GeneSymbol=='Kdm5d',
tolower(object[[1]]$`biological sex`) =='female',drop=FALSE] %>%
colMeans(),na.rm=TRUE) <
min(assay(object[[1]],'counts')[rowData(object[[1]])$GeneSymbol=='Kdm5d',
min(SummarizedExperiment::assay(object[[1]],'counts')[SummarizedExperiment::rowData(object[[1]])$GeneSymbol=='Kdm5d',
tolower(object[[1]]$`biological sex`) =='male',drop = FALSE] %>%
colMeans(),na.rm=TRUE)
)


expect_true(
max(assay(object_genes[[1]],'counts')[rowData(object_genes[[1]])$GeneSymbol=='Xist',
max(SummarizedExperiment::assay(object_genes[[1]],'counts')[SummarizedExperiment::rowData(object_genes[[1]])$GeneSymbol=='Xist',
tolower(object_genes[[1]]$`biological sex`) =='male', drop = FALSE] %>%
colMeans(),na.rm=TRUE) <
min(assay(object_genes[[1]],'counts')[rowData(object_genes[[1]])$GeneSymbol=='Xist',
min(SummarizedExperiment::assay(object_genes[[1]],'counts')[SummarizedExperiment::rowData(object_genes[[1]])$GeneSymbol=='Xist',
tolower(object_genes[[1]]$`biological sex`) =='female', drop = FALSE] %>%
colMeans(),na.rm=TRUE)
)

expect_true(
max(assay(object_genes[[1]],'counts')[rowData(object_genes[[1]])$GeneSymbol=='Kdm5d',
max(SummarizedExperiment::assay(object_genes[[1]],'counts')[SummarizedExperiment::rowData(object_genes[[1]])$GeneSymbol=='Kdm5d',
tolower(object_genes[[1]]$`biological sex`) =='female',drop=FALSE] %>%
colMeans(),na.rm=TRUE) <
min(assay(object_genes[[1]],'counts')[rowData(object_genes[[1]])$GeneSymbol=='Kdm5d',
min(SummarizedExperiment::assay(object_genes[[1]],'counts')[SummarizedExperiment::rowData(object_genes[[1]])$GeneSymbol=='Kdm5d',
tolower(object_genes[[1]]$`biological sex`) =='male',drop = FALSE] %>%
colMeans(),na.rm=TRUE)
)
Expand Down

0 comments on commit 873f237

Please sign in to comment.