Skip to content

Commit

Permalink
Adjust tests and examples for change in capitalization
Browse files Browse the repository at this point in the history
  • Loading branch information
jwokaty committed Dec 21, 2023
1 parent b2c3d1a commit 3f6ee5c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion R/getSignatures.R
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ getSignatures <- function(df,
#'
#' # Condition-specific meta-signatures from fecal samples, increased
#' # in conditions of study. Use taxonomic names instead of the default NCBI IDs:
#' df.feces <- df[df$`Body site` == "feces", ]
#' df.feces <- df[tolower(df$`Body site`) == "feces", ]
#' cond.meta.sigs <- getMetaSignatures(df.feces, column = "Condition",
#' direction = "UP", tax.id.type = "taxname")
#'
Expand Down
2 changes: 1 addition & 1 deletion man/getMetaSignatures.Rd

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

2 changes: 1 addition & 1 deletion tests/testthat/test-getMetaSignatures.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bsdb <- importBugSigDB()
df.feces <- subset(bsdb, `Body site` == "feces")
df.feces <- subset(bsdb, `Body site` == "Feces")
bs.msigs <- getMetaSignatures(bsdb, "Body site")
co.msigs <- getMetaSignatures(df.feces, "Condition")

Expand Down
5 changes: 3 additions & 2 deletions tests/testthat/test-ontology.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ checkOnto <- function(onto, which = c("efo", "uberon"))

checkSubset <- function(sdf, col, pos, neg)
{
print(paste(pos,"and",neg))
expect_true(is.data.frame(sdf))
expect_true(nrow(sdf) > 0)
rel.cols <- c("Body site", "Condition")
expect_true(all(rel.cols %in% colnames(sdf)))
expect_true(all(pos %in% sdf[,col]))
expect_false(any(neg %in% sdf[,col]))
expect_true(all(tolower(pos) %in% tolower(sdf[,col])))
expect_false(any(tolower(neg) %in% tolower(sdf[,col])))
}

test_that("getOntology", {
Expand Down

0 comments on commit 3f6ee5c

Please sign in to comment.