From 4af1b7e20c3beeafdd2cde7d7034b8734d907066 Mon Sep 17 00:00:00 2001 From: Carter Thunes Date: Thu, 25 Jul 2024 15:27:02 -0400 Subject: [PATCH 01/32] update test-on-PR to test on PR to dev as well as main --- .github/workflows/test-on-PR.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-on-PR.yaml b/.github/workflows/test-on-PR.yaml index e9549a97..6a991b0d 100644 --- a/.github/workflows/test-on-PR.yaml +++ b/.github/workflows/test-on-PR.yaml @@ -2,7 +2,7 @@ # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: pull_request: - branches: [main] + branches: [main, dev] name: test-coverage From 948c5dfa997487eb8f1c538280be9c316892c61d Mon Sep 17 00:00:00 2001 From: Carter Thunes Date: Thu, 25 Jul 2024 15:27:32 -0400 Subject: [PATCH 02/32] 198 update tcplConf related tests, add API tests --- R/tcplConf.R | 6 +- .../_snaps/tcplPlot/negative-cutoff-bmr.svg | 195 ----- .../_snaps/tcplPlot/test-output-482273.svg | 790 ------------------ tests/testthat/test-tcplConf.R | 17 +- 4 files changed, 19 insertions(+), 989 deletions(-) delete mode 100644 tests/testthat/_snaps/tcplPlot/negative-cutoff-bmr.svg delete mode 100644 tests/testthat/_snaps/tcplPlot/test-output-482273.svg diff --git a/R/tcplConf.R b/R/tcplConf.R index 8fc42930..8c6071c4 100644 --- a/R/tcplConf.R +++ b/R/tcplConf.R @@ -74,9 +74,9 @@ tcplConf <- function (drvr = NULL, user = NULL, pass = NULL, host = NULL, if (drvr == "API") { options("TCPL_DRVR" = "API") - if (is.null(pass)) stop("'API' driver requires an API-key, supply it to - the 'pass' parameter. To request a key, send an - email to ccte_api@epa.gov.") + if (is.null(pass)) stop("'API' driver requires an API-key, supply it to ", + "the 'pass' parameter. To request a key, send an ", + "email to ccte_api@epa.gov.") if (is.null(host)) options("TCPL_HOST" = "https://api-ccte.epa.gov/bioactivity") register_ctx_api_key(key = pass) } diff --git a/tests/testthat/_snaps/tcplPlot/negative-cutoff-bmr.svg b/tests/testthat/_snaps/tcplPlot/negative-cutoff-bmr.svg deleted file mode 100644 index edd4e0ab..00000000 --- a/tests/testthat/_snaps/tcplPlot/negative-cutoff-bmr.svg +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --0.4 --0.2 -0.0 - - - - - - - -0.1 -1.0 -10.0 -100.0 -Concentration (uM) -Log2 Fold Induction - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Winning Model -(pow) -Losing Models -Cutoff -BMD -AC50 -DTXSID10379991 3-(Perfluorooctyl)propanol -SPID:1210314466 AEID:80 AENM:ATG_GLI_CIS_up -M4ID:482359 HITC:0.960 - - diff --git a/tests/testthat/_snaps/tcplPlot/test-output-482273.svg b/tests/testthat/_snaps/tcplPlot/test-output-482273.svg deleted file mode 100644 index 4fd6daf6..00000000 --- a/tests/testthat/_snaps/tcplPlot/test-output-482273.svg +++ /dev/null @@ -1,790 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0.0 -0.3 -0.6 - - - - - - - -0.1 -1.0 -10.0 -100.0 -Concentration (uM) -Log2 Fold Induction - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Winning Model -(exp2) -Losing Models -Cutoff -BMD -AC50 -DTXSID80379721 1H,1H,6H,6H-Perfluorohexane-1,6-diol diacrylate -SPID:01504209 AEID:80 AENM:ATG_GLI_CIS_up -M4ID:482273 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Hitcall - - - - -1.000 - - - - -model - - - - -poly2 - - - - -BMD - - - - -46.275 - - - - -aic - - - - -pow - - - - -AC50 - - - - -79.547 - - - - -rme - - - - -exp2 - - - - -hill - - - - -exp3 - - - - -exp5 - - - - -gnls - - - - -poly1 - - - - -exp4 - - - - -cnst - - - - --2.1e+01 - - - - --2.1e+01 - - - - --2.1e+01 - - - - --1.9e+01 - - - - --1.9e+01 - - - - --1.9e+01 - - - - --1.5e+01 - - - - --1.5e+01 - - - - --7.3e+00 - - - - -4.350 - - - - -0.094 - - - - -0.094 - - - - -0.093 - - - - -0.094 - - - - -0.093 - - - - -0.094 - - - - -0.094 - - - - -0.116 - - - - -0.142 - - - - -0.332 - - - - diff --git a/tests/testthat/test-tcplConf.R b/tests/testthat/test-tcplConf.R index 966c1b4f..a8a7277e 100644 --- a/tests/testthat/test-tcplConf.R +++ b/tests/testthat/test-tcplConf.R @@ -8,6 +8,21 @@ test_that("unsupported driver error message", { drvr <- "test" expect_error( tcplConf(drvr), - paste0(drvr," is not a supported database driver. Must be 'MySQL', 'tcplLite', or 'example'.") + paste0(drvr," is not a supported database driver. Must be 'MySQL', 'tcplLite', 'API' or 'example'.") ) +}) + +test_that("API driver no key error message", { + drvr <- "API" + expect_error( + tcplConf(drvr), + "'API' driver requires an API-key, supply it to the 'pass' parameter. To request a key, send an email to ccte_api@epa.gov." + ) +}) + +test_that("API driver properly sets URL", { + tcplConf(drvr = "API", pass = "api_key") + expect_equal("https://api-ccte.epa.gov/bioactivity", + getOption("TCPL_HOST") + ) }) \ No newline at end of file From 6e5072144cd73ad5e89ba69646500e7f8c31b98a Mon Sep 17 00:00:00 2001 From: Carter Thunes Date: Thu, 25 Jul 2024 15:27:02 -0400 Subject: [PATCH 03/32] update test-on-PR to test on PR to dev as well as main --- .github/workflows/test-on-PR.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-on-PR.yaml b/.github/workflows/test-on-PR.yaml index e9549a97..6a991b0d 100644 --- a/.github/workflows/test-on-PR.yaml +++ b/.github/workflows/test-on-PR.yaml @@ -2,7 +2,7 @@ # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: pull_request: - branches: [main] + branches: [main, dev] name: test-coverage From d2c2586c90cc72454abb03a1252d000ccdef0424 Mon Sep 17 00:00:00 2001 From: Carter Thunes Date: Thu, 25 Jul 2024 15:27:32 -0400 Subject: [PATCH 04/32] 198 update tcplConf related tests, add API tests --- R/tcplConf.R | 6 +- .../_snaps/tcplPlot/negative-cutoff-bmr.svg | 195 ----- .../_snaps/tcplPlot/test-output-482273.svg | 790 ------------------ tests/testthat/test-tcplConf.R | 17 +- 4 files changed, 19 insertions(+), 989 deletions(-) delete mode 100644 tests/testthat/_snaps/tcplPlot/negative-cutoff-bmr.svg delete mode 100644 tests/testthat/_snaps/tcplPlot/test-output-482273.svg diff --git a/R/tcplConf.R b/R/tcplConf.R index 8fc42930..8c6071c4 100644 --- a/R/tcplConf.R +++ b/R/tcplConf.R @@ -74,9 +74,9 @@ tcplConf <- function (drvr = NULL, user = NULL, pass = NULL, host = NULL, if (drvr == "API") { options("TCPL_DRVR" = "API") - if (is.null(pass)) stop("'API' driver requires an API-key, supply it to - the 'pass' parameter. To request a key, send an - email to ccte_api@epa.gov.") + if (is.null(pass)) stop("'API' driver requires an API-key, supply it to ", + "the 'pass' parameter. To request a key, send an ", + "email to ccte_api@epa.gov.") if (is.null(host)) options("TCPL_HOST" = "https://api-ccte.epa.gov/bioactivity") register_ctx_api_key(key = pass) } diff --git a/tests/testthat/_snaps/tcplPlot/negative-cutoff-bmr.svg b/tests/testthat/_snaps/tcplPlot/negative-cutoff-bmr.svg deleted file mode 100644 index edd4e0ab..00000000 --- a/tests/testthat/_snaps/tcplPlot/negative-cutoff-bmr.svg +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --0.4 --0.2 -0.0 - - - - - - - -0.1 -1.0 -10.0 -100.0 -Concentration (uM) -Log2 Fold Induction - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Winning Model -(pow) -Losing Models -Cutoff -BMD -AC50 -DTXSID10379991 3-(Perfluorooctyl)propanol -SPID:1210314466 AEID:80 AENM:ATG_GLI_CIS_up -M4ID:482359 HITC:0.960 - - diff --git a/tests/testthat/_snaps/tcplPlot/test-output-482273.svg b/tests/testthat/_snaps/tcplPlot/test-output-482273.svg deleted file mode 100644 index 4fd6daf6..00000000 --- a/tests/testthat/_snaps/tcplPlot/test-output-482273.svg +++ /dev/null @@ -1,790 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0.0 -0.3 -0.6 - - - - - - - -0.1 -1.0 -10.0 -100.0 -Concentration (uM) -Log2 Fold Induction - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Winning Model -(exp2) -Losing Models -Cutoff -BMD -AC50 -DTXSID80379721 1H,1H,6H,6H-Perfluorohexane-1,6-diol diacrylate -SPID:01504209 AEID:80 AENM:ATG_GLI_CIS_up -M4ID:482273 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Hitcall - - - - -1.000 - - - - -model - - - - -poly2 - - - - -BMD - - - - -46.275 - - - - -aic - - - - -pow - - - - -AC50 - - - - -79.547 - - - - -rme - - - - -exp2 - - - - -hill - - - - -exp3 - - - - -exp5 - - - - -gnls - - - - -poly1 - - - - -exp4 - - - - -cnst - - - - --2.1e+01 - - - - --2.1e+01 - - - - --2.1e+01 - - - - --1.9e+01 - - - - --1.9e+01 - - - - --1.9e+01 - - - - --1.5e+01 - - - - --1.5e+01 - - - - --7.3e+00 - - - - -4.350 - - - - -0.094 - - - - -0.094 - - - - -0.093 - - - - -0.094 - - - - -0.093 - - - - -0.094 - - - - -0.094 - - - - -0.116 - - - - -0.142 - - - - -0.332 - - - - diff --git a/tests/testthat/test-tcplConf.R b/tests/testthat/test-tcplConf.R index 966c1b4f..a8a7277e 100644 --- a/tests/testthat/test-tcplConf.R +++ b/tests/testthat/test-tcplConf.R @@ -8,6 +8,21 @@ test_that("unsupported driver error message", { drvr <- "test" expect_error( tcplConf(drvr), - paste0(drvr," is not a supported database driver. Must be 'MySQL', 'tcplLite', or 'example'.") + paste0(drvr," is not a supported database driver. Must be 'MySQL', 'tcplLite', 'API' or 'example'.") ) +}) + +test_that("API driver no key error message", { + drvr <- "API" + expect_error( + tcplConf(drvr), + "'API' driver requires an API-key, supply it to the 'pass' parameter. To request a key, send an email to ccte_api@epa.gov." + ) +}) + +test_that("API driver properly sets URL", { + tcplConf(drvr = "API", pass = "api_key") + expect_equal("https://api-ccte.epa.gov/bioactivity", + getOption("TCPL_HOST") + ) }) \ No newline at end of file From 2ab7b87a2fee09ae77699db5ab024ac3fc507fb3 Mon Sep 17 00:00:00 2001 From: Carter Thunes Date: Fri, 26 Jul 2024 15:07:32 -0400 Subject: [PATCH 05/32] rearranged tcplConf tests to make actual and expected in correct order --- tests/testthat/test-tcplConf.R | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/testthat/test-tcplConf.R b/tests/testthat/test-tcplConf.R index a8a7277e..18e8eefa 100644 --- a/tests/testthat/test-tcplConf.R +++ b/tests/testthat/test-tcplConf.R @@ -1,7 +1,8 @@ test_that("example=driver updates option TCPL_DRVR", { - tcplConf(drvr = "example") - expect_equal("example", - getOption("TCPL_DRVR")) + drvr <- "example" + tcplConf(drvr) + expect_equal(getOption("TCPL_DRVR"), + drvr) }) test_that("unsupported driver error message", { @@ -22,7 +23,7 @@ test_that("API driver no key error message", { test_that("API driver properly sets URL", { tcplConf(drvr = "API", pass = "api_key") - expect_equal("https://api-ccte.epa.gov/bioactivity", - getOption("TCPL_HOST") + expect_equal(getOption("TCPL_HOST"), + "https://api-ccte.epa.gov/bioactivity" ) }) \ No newline at end of file From 9c9141847e96f74da57d77e34a0f3c172f230a28 Mon Sep 17 00:00:00 2001 From: Carter Thunes Date: Fri, 26 Jul 2024 15:08:16 -0400 Subject: [PATCH 06/32] added new approach with mocking tcplQuery responses for testing --- data-raw/mc_test.R | 74 +++++++++++++++++++++++++++++ data/mc_test.rda | Bin 0 -> 3850 bytes tests/testthat/test-tcplLoadData.R | 57 +++++++++++++++++++++- 3 files changed, 130 insertions(+), 1 deletion(-) create mode 100644 data-raw/mc_test.R create mode 100644 data/mc_test.rda diff --git a/data-raw/mc_test.R b/data-raw/mc_test.R new file mode 100644 index 00000000..715fc340 --- /dev/null +++ b/data-raw/mc_test.R @@ -0,0 +1,74 @@ +#==============================================================================# +# NOTE: This script is written such that it is run from 'top' to 'bottom' +# or programmatically via the Terminal. +# ('R CMD BATCH --vanilla '.) +# Please do not jump around when running this script. +#==============================================================================# +## r packages +devtools::load_all() + +library(here) +#---------------------------# +## code to prepare `mc_test` dataset goes here +# source the user ID, password, host, and database information for connection +# - NOTE: To replicate one will need to save their own 'db_cred.R', including +# the 'userid', 'userpwd', 'host', and DB collection via 'ivtdb'. +source(file = here::here("data-raw/db_cred.R"),verbose = FALSE) +# connect to the DB +tcplConf(user = userid, + pass = userpwd, + host = host, + db = ivtdb, + drvr = "MySQL") + + +# #add temporary line to tcplLoadData to print 'fld' from .prepField and qstring +# hide_response <- tcplLoadData(lvl = 4, fld = "m4id", val = 12699347) +# +# +# # use queries to save data +# mc4_m4id_12699347 <- list(.prepField = "mc4_param.m4id", +# tcplQuery = tcplQuery('SELECT * FROM mc4,mc4_param WHERE mc4.m4id = mc4_param.m4id AND mc4_param.m4id IN ("12699347");')) +# +# +# # collate the data into a single object 'mc_test' +# mc_test <- list( +# tcplConfQuery = tcplQuery("SHOW VARIABLES LIKE 'max_allowed_packet'"), +# mc4_m4id_12699347 = mc4_m4id_12699347 +# ) +# #---------------------------# +# ## save the data +# usethis::use_data(mc_test, overwrite = TRUE) +# #---------------------------# + + + +get_query_data <- function(lvl, fld, val, add.fld = TRUE) { + + # different style of saving just tcplQuery output + # add temporary line to top of tcplQuery to get the query string: print(query) + query_strings <- capture.output(result<-tcplLoadData(lvl = lvl, fld = fld, val = val, add.fld = add.fld)) + query_strings <- unique(gsub("\\\\", "\\\"", gsub("\"", "", gsub("\\\\n", "\\\n", gsub("\\[1\\] ", "", query_strings))))) + + # use queries to save data + dat <- lapply(query_strings, function(query_string) { + return(tcplQuery(query_string)) + }) + names(dat) <- query_strings + return(dat) + +} + +mc4_m4id_12699347 <- get_query_data(lvl = 4, fld = "m4id", val = 12699347) +mc5_m4id_12699347 <- get_query_data(lvl = 5, fld = "m4id", val = 12699347) + +# collate the data into a single object 'mc_test' +mc_test <- list( + tcplConfQuery = tcplQuery("SHOW VARIABLES LIKE 'max_allowed_packet'"), + mc4_m4id_12699347 = mc4_m4id_12699347, + mc5_m4id_12699347 = mc5_m4id_12699347 +) +#---------------------------# +## save the data +usethis::use_data(mc_test, overwrite = TRUE) +#---------------------------# \ No newline at end of file diff --git a/data/mc_test.rda b/data/mc_test.rda new file mode 100644 index 0000000000000000000000000000000000000000..8f4bd452c6d2ad14fbf4c279f3b75455dd045ef2 GIT binary patch literal 3850 zcmbuAX*d*)x5rhZ2FciWVFryX4HL3dnz7D;F{M!whHPVrvZO-9{A|t0&S=coB4o`T z*|!)XgoLtXY3!+Pzx%)UdG7oBeepTVbDr;ub6%V)wyqaoh6F`x!sjBc-yAx>9{>5P z-~ZzO>gT^j_MhfI_J96-24!>nmCy@?%lOcLGY(;nXLtcT(w&46Lj&7oC=3g0cNcOV zJT>DCaa-Ri(LD%5hs)5HgA7c6BtY{t+zr6Sw7g-+)<`ff26kde(OFy~Nbw0P=)5?e zJI#uL;f<8Bc7If`)wPZMYk%a$U%(~);$Qu5{7=Q<%5nLBn#T-Z{HOQd^Z!ZzmFRf3#jUQJtiKMqKOcwo=m5Vup&~;9U zpPA^bqZe#%fE!Zh+9%T`vuwh@>%MNgp`!L=~FH#_zjt}0ClSTO15=?5DY1( zwPl*NY?ufZ>xjTnt^%3nX7Wz`0*b=2wUE@8hRM>MuXo0OX4%+z0s^M|6X z-?YwL2u*#spiQ~!=r>ZXV@aBMkhN(gZ;w0W2)H#jKV}$DMYev2#w?{6vo3j%5 z-mb1^G1=U9b=|q*WWdsrj!iM-*{neFr=nNH_U?sGoe)ST_k~*3!bO+JbD0@c6D#bVkB7I;A8+aH*E1AFZ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X#c)x0hJ>Y(qvR(pEOBiQnC3I9~=T7O) zG|OFm=Uv_ikV#UTIUY~z$ZTqbDk(o+de9holEU?R=hS6cL+2Qfz9TNNHfG5p0X|m> z5a%%Li+c54{FMR#DAt%6^gGk0_m4+rr4o;)(bzrNu=<-%2H1Lj+=C$5q7T-UM~?EH z1Ifm4cW?msJEQQjWpp1P$X=xU7r`E55EciLWq2Pt3gHEFArn8w zIWG5Ib2RMD-2T}jCr6kOyHTJYPoGxeSUKq`YlsR4f^OM#iVcKKMT4%FbA-JO1C%ri zs@^Hyof_1cv2|5tQyc+OF5}Rq=rB%iaw!ayK@PnfeimvRvdsdgIloeKRs1P+NN$)1 zo-%@v*BYCsJR@cT-$IufiBV}gG>6rn^85qAjn5-SpGO;$SM?qfmh0mKKJKd1o)|#L z8MBVNP0e?}e3C!hbkQ#P3)Kg!WnrB8yxC8#iQ~?u`2T%3j1y%?jwb-$c%L6-jaEP_ z9)u=qszm@b!B%Xk^(4zJUuK$i+k3cM_}keyCrNOk(%kowg_=eQRL#1V_e$AgY1rvJ z0Rh1kw$&B@=x{L{aME2$@I5>gE{Rn&zI#RTtG~0$F~48KQuL!h9Yup%SqY5cEeT_j z#Wx3|C6EeZg9E!T&bT*W$A+;6@8auWfp)l#k0pZNkN>L9UfmV}7amjW Date: Mon, 29 Jul 2024 15:21:26 -0400 Subject: [PATCH 07/32] update tcplLoadData example section and sc_vignette data for tests --- R/tcplLoadData.R | 27 ++++++++++++++++++--------- data-raw/sc_vignette.R | 11 +++++------ data/sc_vignette.rda | Bin 2054 -> 1998 bytes 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/R/tcplLoadData.R b/R/tcplLoadData.R index fdfb73b4..bb027265 100644 --- a/R/tcplLoadData.R +++ b/R/tcplLoadData.R @@ -108,7 +108,7 @@ tcplLoadData <- function(lvl, fld = NULL, val = NULL, type = "mc", add.fld = TRU } else if (lvl == 1L) { sc1 <- sc_vignette[["sc1"]] - sc1 <- sc1[,c("s0id","s1id","spid","acid","aeid","apid","rowi","coli","wllt","logc","resp")] + sc1 <- sc1[,c("s0id","s1id","spid","acid","aeid","apid","rowi","coli","wllt","conc","resp")] return(sc1) } @@ -121,7 +121,7 @@ tcplLoadData <- function(lvl, fld = NULL, val = NULL, type = "mc", add.fld = TRU sc1 <- sc_vignette[["sc1"]] sc2 <- sc_vignette[["sc2"]] agg <- sc1[sc2, on = c("spid","aeid")] - agg <- agg[,c("aeid","s2id","s1id","s0id","logc","resp")] + agg <- agg[,c("aeid","s2id","s1id","s0id","conc","resp")] return(agg) } else stop("example tables for sc0, sc1, sc2, agg available.") @@ -146,14 +146,17 @@ tcplLoadData <- function(lvl, fld = NULL, val = NULL, type = "mc", add.fld = TRU } else if (lvl == 3L) { mc3 <- mc_vignette[["mc3"]] - mc3 <- mc3[,c("m0id","m1id","m2id","m3id","spid","aeid","logc","resp","cndx","wllt","apid","rowi","coli","repi")] + mc3 <- mc3[,c("m0id","m1id","m2id","m3id","spid","aeid","conc","resp","cndx","wllt","apid","rowi","coli","repi")] return(mc3) } else if (lvl == 4L) { mc4 <- mc_vignette[["mc4"]] if (!add.fld) { - mc4 <- mc4[,c("m4id","aeid","spid","bmad","resp_max","resp_min","max_mean","max_mean_conc","max_med","max_med_conc", - "logc_max","logc_min","nconc","npts","nrep","nmed_gtbl")] + mc4 <- mc4[,c("m4id", "aeid", "spid", "bmad", "resp_max", "resp_min", + "max_mean", "max_mean_conc", "min_mean", "min_mean_conc", + "max_med", "max_med_conc", "min_med", "min_med_conc", + "max_med_diff", "max_med_diff_conc", "conc_max", "conc_min", + "nconc", "npts", "nrep", "nmed_gtbl_pos", "nmed_gtbl_neg")] } else { mc4 <- mc4[,!c("chid","casn","chnm","dsstox_substance_id","code","aenm","resp_unit","conc_unit")] setcolorder(mc4, c("m4id", "aeid", "spid")) @@ -163,10 +166,15 @@ tcplLoadData <- function(lvl, fld = NULL, val = NULL, type = "mc", add.fld = TRU else if (lvl == 5L) { mc5 <- mc_vignette[["mc5"]] if (!add.fld){ - mc5 <- mc5[,c("m5id","m4id","aeid","spid","bmad","resp_max","resp_min","max_mean","max_mean_conc","max_med", - "max_med_conc","logc_max","logc_min","nconc","npts","nrep","nmed_gtbl","hitc","modl","fitc","coff")] + mc5 <- mc5[,c("m5id","m4id", "aeid", "spid", "bmad", "resp_max", "resp_min", + "max_mean", "max_mean_conc", "min_mean", "min_mean_conc", + "max_med", "max_med_conc", "min_med", "min_med_conc", + "max_med_diff", "max_med_diff_conc", "conc_max", "conc_min", + "nconc", "npts", "nrep", "nmed_gtbl_pos", "nmed_gtbl_neg", + "hitc", "modl", "fitc", "coff")] } else { - mc5 <- mc5[,!c("chid","casn","chnm","dsstox_substance_id","code","aenm","resp_unit","conc_unit","tp","ga","q","la","ac50_loss")] + mc5 <- mc5[,!c("chid","casn","chnm","dsstox_substance_id","code","aenm", + "resp_unit","conc_unit","tp","ga","q","la","ac50_loss")] setcolorder(mc5, c("m5id", "m4id","aeid", "spid")) } return(mc5) @@ -175,7 +183,8 @@ tcplLoadData <- function(lvl, fld = NULL, val = NULL, type = "mc", add.fld = TRU mc3 <- mc_vignette[["mc3"]] mc4 <- mc_vignette[["mc4"]] agg <- mc3[mc4, on = c("spid","aeid")] - agg <- agg[, c("aeid", "m4id", "m3id", "m2id", "m1id", "m0id", "spid", "logc", "resp")] + agg <- agg[, c("aeid", "m4id", "m3id", "m2id", "m1id", "m0id", "spid", + "conc", "resp")] return(agg) } diff --git a/data-raw/sc_vignette.R b/data-raw/sc_vignette.R index ade6e63d..d2f2fd73 100644 --- a/data-raw/sc_vignette.R +++ b/data-raw/sc_vignette.R @@ -5,8 +5,7 @@ # Please do not jump around when running this script. #==============================================================================# ## r packages -library(tcplfit2) -library(tcpl) +devtools::load_all() library(here) library(data.table) @@ -43,8 +42,8 @@ atg.acid.sc <- atg.acid %>% filter(.,acid%in%atg.sc.ids) %>% as.data.table() # print the data.table of acid's atg.acid.sc # obtain the aeid's for the atg single concentration data -atg.aeid.sc <- tcplLoadAeid(fld = 'acid',val = atg.acid.sc) %>% - filter(.,grepl(aenm,pattern = "up$")) +atg.aeid.sc <- tcplLoadAeid(fld = 'acid',val = atg.acid.sc) #%>% + #filter(.,grepl(aenm,pattern = "up$")) # obtain the level 2 sc data tictoc::tic() atg.sc2 <- tcplPrepOtpt( @@ -110,9 +109,9 @@ tictoc::toc() tictoc::tic() atg.sc1.ss <- atg.sc1 %>% # keep only those observations that are related to the level 2 spids - dplyr::filter(spid %in% atg.sc2.ss[,spid]) %>% + dplyr::filter(spid %in% atg.sc2.ss[,spid]) #%>% # keep only those observations that are related to the 'up' endpoints - dplyr::filter(.,grepl(aenm,pattern = "up$")) + #dplyr::filter(.,grepl(aenm,pattern = "up$")) tictoc::toc() # collate the data into a single object 'sc_vignette' diff --git a/data/sc_vignette.rda b/data/sc_vignette.rda index e478e9c97f1c734cb387030da36d3f1d32b0351f..19310c0aabe1330b634cdf3d9551644c9c07758e 100644 GIT binary patch literal 1998 zcmV;<2Qm0UT4*^jL0KkKS%)vu4*(7~fB*mg|MPkG|L_0z|I7d9|Nr>qKd<^V76bj? zVyf-Y^_}1dKYXf+ph^HOm_;B-Mwn`pX`|F=05oI(0BFz*fB*mh41fSM0Av6F02%-d z01W^=5FpWzXwc9!(?Dc213`fR2ATn&0Kp9m0D+;CKp26hnrWjGKm!B-0igzrgGPpd zrkVpGpc)Ja05s4I00szXU<3^engGNNG}BEOngAFe01XHo2_Mrcpe6HPD#GBFIAY5J2! zLF!?s$>;zEfig5SG-%UC2-5;&&@_67s1+p;DX}#@1Z2=@M}nS7`XtPuh-s4}$bpkX zKn91X(DgKXRQ)J=jXgln&>K)R0QEFIM)gOOF*F0z%I0)DO?Tqym4H za!qPgQz(YqlblN&E(3#N%N!;*QFSdWTXNgBTXM@SA(CU9tKM5&k8 z_nZcMZc#}ca!~mO!NFRYrSqDnUe;?hn&x?kyyBVqgIbg+LYzq}j^i;xkn1xEF=5K= zvNV%+Y{X^ORMF>EWxw{Na=2Lu(o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ject: [PATCH 08/32] commit to style of mocking only tcplQuery, fix test bug --- data-raw/mc_test.R | 23 ++------------------- tests/testthat/test-tcplLoadData.R | 32 ++++-------------------------- 2 files changed, 6 insertions(+), 49 deletions(-) diff --git a/data-raw/mc_test.R b/data-raw/mc_test.R index 715fc340..b7c1807d 100644 --- a/data-raw/mc_test.R +++ b/data-raw/mc_test.R @@ -22,27 +22,6 @@ tcplConf(user = userid, drvr = "MySQL") -# #add temporary line to tcplLoadData to print 'fld' from .prepField and qstring -# hide_response <- tcplLoadData(lvl = 4, fld = "m4id", val = 12699347) -# -# -# # use queries to save data -# mc4_m4id_12699347 <- list(.prepField = "mc4_param.m4id", -# tcplQuery = tcplQuery('SELECT * FROM mc4,mc4_param WHERE mc4.m4id = mc4_param.m4id AND mc4_param.m4id IN ("12699347");')) -# -# -# # collate the data into a single object 'mc_test' -# mc_test <- list( -# tcplConfQuery = tcplQuery("SHOW VARIABLES LIKE 'max_allowed_packet'"), -# mc4_m4id_12699347 = mc4_m4id_12699347 -# ) -# #---------------------------# -# ## save the data -# usethis::use_data(mc_test, overwrite = TRUE) -# #---------------------------# - - - get_query_data <- function(lvl, fld, val, add.fld = TRUE) { # different style of saving just tcplQuery output @@ -59,6 +38,8 @@ get_query_data <- function(lvl, fld, val, add.fld = TRUE) { } +# TODO: consider a more generalizable way to pick an m4id, so this script can be +# run without issues in the future. mc4_m4id_12699347 <- get_query_data(lvl = 4, fld = "m4id", val = 12699347) mc5_m4id_12699347 <- get_query_data(lvl = 5, fld = "m4id", val = 12699347) diff --git a/tests/testthat/test-tcplLoadData.R b/tests/testthat/test-tcplLoadData.R index 41c04e2e..d1f75bde 100644 --- a/tests/testthat/test-tcplLoadData.R +++ b/tests/testthat/test-tcplLoadData.R @@ -156,33 +156,9 @@ test_that("mc example error message appears", { ) }) -# test_that("description", { -# expect_*(code) -# }) - - -## this stores simple string responses for .prepField -# test_that("tcplLoadData loads mc4 data for one m4id", { -# data("mc_test") -# mocked <- mc_test$mc4_m4id_12699347 -# local_mocked_bindings( -# tcplQuery = function(query, db, tbl) { -# if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") mc_test$tcplConfQuery -# else mocked$tcplQuery -# }, -# .prepField = function(fld, tbl, db) mocked$.prepField -# ) -# tcplConf(drvr = "MySQL") -# mc4 <- tcplLoadData(lvl = 4, fld = "m4id", val = 12699347) -# expect_true( -# is.data.table(mc4) -# ) -# }) - - - -## this way avoids storing a .prepField and allows getting coverage there +# new method using mocking for tcplQuery function +# TODO: add more expectations to check for columns/rows of the data table, etc test_that("tcplLoadData loads mc4 data for one m4id", { data("mc_test") mocked <- mc_test$mc4_m4id_12699347 @@ -192,7 +168,7 @@ test_that("tcplLoadData loads mc4 data for one m4id", { else mocked[query][[1]] } ) - tcplConf(drvr = "MySQL") + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both mc4 <- tcplLoadData(lvl = 4, fld = "m4id", val = 12699347) expect_true( is.data.table(mc4) @@ -208,7 +184,7 @@ test_that("tcplLoadData loads mc5 data for one m4id", { else mocked[query][[1]] } ) - tcplConf(drvr = "MySQL") + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both mc5 <- tcplLoadData(lvl = 5, fld = "m4id", val = 12699347) expect_true( is.data.table(mc5) From 0e0e23b1eb7b6b355d08981e58a99b145490fffa Mon Sep 17 00:00:00 2001 From: Carter Thunes Date: Mon, 29 Jul 2024 19:04:11 -0400 Subject: [PATCH 09/32] Generalized test ids and added fifteen datasets for tcplLoadData tests --- data-raw/mc_test.R | 48 +++++- data/mc_test.rda | Bin 3850 -> 9131 bytes tests/testthat/test-tcplLoadData.R | 268 ++++++++++++++++++++++++++++- 3 files changed, 300 insertions(+), 16 deletions(-) diff --git a/data-raw/mc_test.R b/data-raw/mc_test.R index b7c1807d..debd83b5 100644 --- a/data-raw/mc_test.R +++ b/data-raw/mc_test.R @@ -8,6 +8,7 @@ devtools::load_all() library(here) +library(dplyr) #---------------------------# ## code to prepare `mc_test` dataset goes here # source the user ID, password, host, and database information for connection @@ -21,10 +22,27 @@ tcplConf(user = userid, db = ivtdb, drvr = "MySQL") +# pick endpoints and ids +# load the number of rows and max hitc per aeid +mc5_counts <- tcplQuery("SELECT DISTINCT aeid, + COUNT( aeid ) as n, + max(hitc) as max_hitc + FROM invitrodb.mc5 GROUP BY aeid") +# filter to only include where at least one sample is active and n < 10 +mc5_counts <- mc5_counts %>% filter(max_hitc > 0.9 & n < 10) +# pick one aeid +aeid <- mc5_counts[sample(1:nrow(mc5_counts),size = 1,replace = FALSE),aeid] +# obtain the acid for the example dataset +acid <- tcplLoadAcid(fld = 'aeid',val = aeid)$acid +# pick one sample/row from each level (lvl 3 contains ids back to lvl 0 and lvl 6 does back to lvl 4) +l3_sample <- tcplLoadData(lvl = 3, fld = "acid", val = acid)[sample(1:nrow(l3),size = 1,replace = FALSE)] +l6_sample <- tcplLoadData(lvl = 6, fld = "aeid", val = aeid, add.fld = FALSE)[sample(1:nrow(l6),size = 1,replace = FALSE)] +l7_sample <- tcplLoadData(lvl = 7, fld = "aeid", val = aeid, add.fld = FALSE)[sample(1:nrow(l7),size = 1,replace = FALSE)] + get_query_data <- function(lvl, fld, val, add.fld = TRUE) { - # different style of saving just tcplQuery output + # IMPORTANT || MUST ADD TEMPORARY LINE TO TCPLQUERY -------------------------- # add temporary line to top of tcplQuery to get the query string: print(query) query_strings <- capture.output(result<-tcplLoadData(lvl = lvl, fld = fld, val = val, add.fld = add.fld)) query_strings <- unique(gsub("\\\\", "\\\"", gsub("\"", "", gsub("\\\\n", "\\\n", gsub("\\[1\\] ", "", query_strings))))) @@ -34,20 +52,34 @@ get_query_data <- function(lvl, fld, val, add.fld = TRUE) { return(tcplQuery(query_string)) }) names(dat) <- query_strings + + # also store fld and val in list object for use in test case + dat[fld] <- val return(dat) } -# TODO: consider a more generalizable way to pick an m4id, so this script can be -# run without issues in the future. -mc4_m4id_12699347 <- get_query_data(lvl = 4, fld = "m4id", val = 12699347) -mc5_m4id_12699347 <- get_query_data(lvl = 5, fld = "m4id", val = 12699347) -# collate the data into a single object 'mc_test' +# to add more tests with new/different data to test-tcplLoadData.R, add lines below and run script mc_test <- list( tcplConfQuery = tcplQuery("SHOW VARIABLES LIKE 'max_allowed_packet'"), - mc4_m4id_12699347 = mc4_m4id_12699347, - mc5_m4id_12699347 = mc5_m4id_12699347 + mc0_by_m0id = get_query_data(lvl = 0, fld = "m0id", val = l3_sample$m0id), + mc0_by_acid = get_query_data(lvl = 0, fld = "acid", val = acid), + mc1_by_m1id = get_query_data(lvl = 1, fld = "m1id", val = l3_sample$m1id), + mc1_by_acid = get_query_data(lvl = 1, fld = "acid", val = acid), + mc2_by_m2id = get_query_data(lvl = 2, fld = "m2id", val = l3_sample$m2id), + mc2_by_acid = get_query_data(lvl = 2, fld = "acid", val = acid), + mc3_by_m3id = get_query_data(lvl = 3, fld = "m3id", val = l3_sample$m3id), + mc3_by_aeid = get_query_data(lvl = 3, fld = "aeid", val = aeid), + mc4_by_m4id = get_query_data(lvl = 4, fld = "m4id", val = l6_sample$m4id), + mc4_by_aeid = get_query_data(lvl = 4, fld = "aeid", val = aeid, add.fld = FALSE), + mc5_by_m5id = get_query_data(lvl = 5, fld = "m5id", val = l6_sample$m5id), + mc5_by_aeid = get_query_data(lvl = 5, fld = "aeid", val = aeid, add.fld = FALSE), + mc6_by_m6id = get_query_data(lvl = 6, fld = "m6id", val = l6_sample$m6id), + mc6_by_aeid = get_query_data(lvl = 6, fld = "aeid", val = aeid), + mc7_by_m7id = get_query_data(lvl = 7, fld = "m7id", val = l7_sample$m7id), + mc7_by_aeid = get_query_data(lvl = 7, fld = "aeid", val = aeid), + mcagg_by_aeid = get_query_data(lvl = "agg", fld = "aeid", val = aeid) ) #---------------------------# ## save the data diff --git a/data/mc_test.rda b/data/mc_test.rda index 8f4bd452c6d2ad14fbf4c279f3b75455dd045ef2..5864cdaa3effb6618e525c827fdc186ab0f4aa20 100644 GIT binary patch literal 9131 zcmV;cBUIc%T4*^jL0KkKS#?1nG63#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n8w zIWG5Ib2RMD-2T}jCr6kOyHTJYPoGxeSUKq`YlsR4f^OM#iVcKKMT4%FbA-JO1C%ri zs@^Hyof_1cv2|5tQyc+OF5}Rq=rB%iaw!ayK@PnfeimvRvdsdgIloeKRs1P+NN$)1 zo-%@v*BYCsJR@cT-$IufiBV}gG>6rn^85qAjn5-SpGO;$SM?qfmh0mKKJKd1o)|#L z8MBVNP0e?}e3C!hbkQ#P3)Kg!WnrB8yxC8#iQ~?u`2T%3j1y%?jwb-$c%L6-jaEP_ z9)u=qszm@b!B%Xk^(4zJUuK$i+k3cM_}keyCrNOk(%kowg_=eQRL#1V_e$AgY1rvJ z0Rh1kw$&B@=x{L{aME2$@I5>gE{Rn&zI#RTtG~0$F~48KQuL!h9Yup%SqY5cEeT_j z#Wx3|C6EeZg9E!T&bT*W$A+;6@8auWfp)l#k0pZNkN>L9UfmV}7amjW Date: Tue, 30 Jul 2024 12:39:34 -0400 Subject: [PATCH 10/32] added error cases and multiple expectations per test case --- tests/testthat/test-tcplLoadData.R | 170 ++++++++++++++++++++--------- 1 file changed, 119 insertions(+), 51 deletions(-) diff --git a/tests/testthat/test-tcplLoadData.R b/tests/testthat/test-tcplLoadData.R index 40a20499..f6251b26 100644 --- a/tests/testthat/test-tcplLoadData.R +++ b/tests/testthat/test-tcplLoadData.R @@ -158,8 +158,8 @@ test_that("mc example error message appears", { #------------------------------------------------------------------------------- +# Covers testing tcplLoadData with "MySQL" driver # new method using mocking for tcplQuery function -# TODO: add more expectations to check for columns/rows of the data table, etc #------------------------------------------------------------------------------- # MC0 @@ -174,9 +174,11 @@ test_that("tcplLoadData loads mc0 data for one m0id", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both dat <- tcplLoadData(lvl = 0, fld = "m0id", val = mocked$m0id) - expect_true( - is.data.table(dat) - ) + #expectations + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("m0id", "acid", "spid", "wllt", "wllq", "conc", "rval") %in% colnames(dat))) + expect_true(mocked$m0id %in% dat$m0id) }) test_that("tcplLoadData loads mc0 data for one acid", { @@ -190,9 +192,11 @@ test_that("tcplLoadData loads mc0 data for one acid", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both dat <- tcplLoadData(lvl = 0, fld = "acid", val = mocked$acid) - expect_true( - is.data.table(dat) - ) + #expectations + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("m0id", "acid", "spid", "wllt", "wllq", "conc", "rval") %in% colnames(dat))) + expect_true(mocked$acid %in% dat$acid) }) # MC1 @@ -207,9 +211,11 @@ test_that("tcplLoadData loads mc1 data for one m1id", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both dat <- tcplLoadData(lvl = 1, fld = "m1id", val = mocked$m1id) - expect_true( - is.data.table(dat) - ) + #expectations + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("m0id", "m1id", "acid", "spid", "wllt", "wllq", "conc", "rval") %in% colnames(dat))) + expect_true(mocked$m1id %in% dat$m1id) }) test_that("tcplLoadData loads mc1 data for one acid", { @@ -223,9 +229,11 @@ test_that("tcplLoadData loads mc1 data for one acid", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both dat <- tcplLoadData(lvl = 1, fld = "acid", val = mocked$acid) - expect_true( - is.data.table(dat) - ) + #expectations + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("m0id", "m1id", "acid", "spid", "wllt", "wllq", "conc", "rval") %in% colnames(dat))) + expect_true(mocked$acid %in% dat$acid) }) # MC2 @@ -240,9 +248,11 @@ test_that("tcplLoadData loads mc2 data for one m2id", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both dat <- tcplLoadData(lvl = 2, fld = "m2id", val = mocked$m2id) - expect_true( - is.data.table(dat) - ) + #expectations + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("m0id", "m1id", "m2id", "acid", "spid", "wllt", "wllq", "conc", "rval", "cval") %in% colnames(dat))) + expect_true(mocked$m2id %in% dat$m2id) }) test_that("tcplLoadData loads mc2 data for one acid", { @@ -256,9 +266,11 @@ test_that("tcplLoadData loads mc2 data for one acid", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both dat <- tcplLoadData(lvl = 2, fld = "acid", val = mocked$acid) - expect_true( - is.data.table(dat) - ) + #expectations + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("m0id", "m1id", "m2id", "acid", "spid", "wllt", "wllq", "conc", "rval", "cval") %in% colnames(dat))) + expect_true(mocked$acid %in% dat$acid) }) # MC3 @@ -273,9 +285,11 @@ test_that("tcplLoadData loads mc3 data for one m3id", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both dat <- tcplLoadData(lvl = 3, fld = "m3id", val = mocked$m3id) - expect_true( - is.data.table(dat) - ) + #expectations + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("m0id", "m1id", "m2id", "m3id", "acid", "aeid", "spid", "wllt", "wllq", "conc", "rval", "resp") %in% colnames(dat))) + expect_true(mocked$m3id %in% dat$m3id) }) test_that("tcplLoadData loads mc3 data for one aeid", { @@ -289,9 +303,11 @@ test_that("tcplLoadData loads mc3 data for one aeid", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both dat <- tcplLoadData(lvl = 3, fld = "aeid", val = mocked$aeid) - expect_true( - is.data.table(dat) - ) + #expectations + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("m0id", "m1id", "m2id", "m3id", "acid", "aeid", "spid", "wllt", "wllq", "conc", "rval", "resp") %in% colnames(dat))) + expect_true(mocked$aeid %in% dat$aeid) }) # MC4 @@ -306,9 +322,11 @@ test_that("tcplLoadData loads mc4 data for one m4id", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both dat <- tcplLoadData(lvl = 4, fld = "m4id", val = mocked$m4id) - expect_true( - is.data.table(dat) - ) + #expectations + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("m4id", "aeid", "spid", "bmad", "nconc", "nrep", "cnst_aic") %in% colnames(dat))) + expect_true(mocked$m4id %in% dat$m4id) }) test_that("tcplLoadData loads mc4 data for one aeid with add.fld = FALSE", { @@ -322,9 +340,11 @@ test_that("tcplLoadData loads mc4 data for one aeid with add.fld = FALSE", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both dat <- tcplLoadData(lvl = 4, fld = "aeid", val = mocked$aeid, add.fld = FALSE) - expect_true( - is.data.table(dat) - ) + #expectations + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("m4id", "aeid", "spid", "bmad", "nconc", "nrep") %in% colnames(dat))) + expect_true(mocked$aeid %in% dat$aeid) }) # MC5 @@ -339,9 +359,11 @@ test_that("tcplLoadData loads mc5 data for one m5id", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both dat <- tcplLoadData(lvl = 5, fld = "m5id", val = mocked$m5id) - expect_true( - is.data.table(dat) - ) + #expectations + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("m4id", "m5id", "aeid", "spid", "bmad", "nconc", "nrep", "modl", "hitc", "coff", "top") %in% colnames(dat))) + expect_true(mocked$m5id %in% dat$m5id) }) test_that("tcplLoadData loads mc5 data for one aeid with add.fld = FALSE", { @@ -355,9 +377,11 @@ test_that("tcplLoadData loads mc5 data for one aeid with add.fld = FALSE", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both dat <- tcplLoadData(lvl = 5, fld = "aeid", val = mocked$aeid, add.fld = FALSE) - expect_true( - is.data.table(dat) - ) + #expectations + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("m4id", "m5id", "aeid", "spid", "bmad", "nconc", "nrep", "modl", "hitc", "coff") %in% colnames(dat))) + expect_true(mocked$aeid %in% dat$aeid) }) # MC6 @@ -372,9 +396,11 @@ test_that("tcplLoadData loads mc6 data for one m6id", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both dat <- tcplLoadData(lvl = 6, fld = "m6id", val = mocked$m6id) - expect_true( - is.data.table(dat) - ) + #expectations + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("m4id", "m5id", "m6id", "aeid", "spid", "bmad", "nconc", "nrep", "flag") %in% colnames(dat))) + expect_true(mocked$m6id %in% dat$m6id) }) test_that("tcplLoadData loads mc6 data for one aeid", { @@ -388,9 +414,11 @@ test_that("tcplLoadData loads mc6 data for one aeid", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both dat <- tcplLoadData(lvl = 6, fld = "aeid", val = mocked$aeid) - expect_true( - is.data.table(dat) - ) + #expectations + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("m4id", "m5id", "m6id", "aeid", "spid", "bmad", "nconc", "nrep", "flag") %in% colnames(dat))) + expect_true(mocked$aeid %in% dat$aeid) }) # MC7 @@ -405,9 +433,11 @@ test_that("tcplLoadData loads mc7 data for one m7id", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both dat <- tcplLoadData(lvl = 7, fld = "m7id", val = mocked$m7id) - expect_true( - is.data.table(dat) - ) + #expectations + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("m4id", "m7id", "aeid", "spid", "bmad", "nconc", "nrep", "aed_val") %in% colnames(dat))) + expect_true(mocked$m7id %in% dat$m7id) }) test_that("tcplLoadData loads mc7 data for one aeid", { @@ -421,9 +451,11 @@ test_that("tcplLoadData loads mc7 data for one aeid", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both dat <- tcplLoadData(lvl = 7, fld = "aeid", val = mocked$aeid) - expect_true( - is.data.table(dat) - ) + #expectations + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("m4id", "m7id", "aeid", "spid", "bmad", "nconc", "nrep", "aed_val") %in% colnames(dat))) + expect_true(mocked$aeid %in% dat$aeid) }) # MCagg @@ -438,7 +470,43 @@ test_that("tcplLoadData loads mc 'agg' data for one aeid", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both dat <- tcplLoadData(lvl = "agg", fld = "aeid", val = mocked$aeid) - expect_true( - is.data.table(dat) + #expectations + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("m0id", "m1id", "m2id", "m3id", "m4id", "acid", "aeid", "spid", + "conc", "resp", "bmad", "nconc", "nrep") %in% colnames(dat))) + expect_true(mocked$aeid %in% dat$aeid) +}) + +# error cases +test_that("invalid lvl and type error message", { + data("mc_test") + mocked <- mc_test$mcagg_by_aeid + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") mc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + expect_error( + tcplLoadData(lvl = 5, type = "sc"), + "Invalid 'lvl' and 'type' combination." ) }) + +test_that("missing val error message", { + data("mc_test") + mocked <- mc_test$mcagg_by_aeid + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") mc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + expect_error( + tcplLoadData(lvl = 5, type = "mc", fld = "aeid"), + "'val' cannot be NULL check that a valid value was provided for the specified field" + ) +}) \ No newline at end of file From 79ada6d5267b34493c893e5ba33a19efa6699d67 Mon Sep 17 00:00:00 2001 From: Carter Thunes Date: Wed, 31 Jul 2024 19:20:06 -0400 Subject: [PATCH 11/32] removed old tcplPlot tests that didn't test the any actual functions --- tests/testthat/test-tcplPlot.R | 175 ++------------------------------- 1 file changed, 9 insertions(+), 166 deletions(-) diff --git a/tests/testthat/test-tcplPlot.R b/tests/testthat/test-tcplPlot.R index 55e65081..6663cc37 100644 --- a/tests/testthat/test-tcplPlot.R +++ b/tests/testthat/test-tcplPlot.R @@ -1,3 +1,7 @@ +#------------------------------------------------------------------------------- +# old tests using drvr = "example" +#------------------------------------------------------------------------------- + tcplConf(drvr="example") if (!interactive()) pdf(NULL) @@ -7,150 +11,6 @@ test_that("round_n function works", { c("1.2e+03",NA,"0.333")) }) -test_that("check_tcpl_db_schema() loaded", { - expect_false( - (check_tcpl_db_schema()) - ) -}) - -test_that("error message works: 'No data for fld/val provided'", { - input <- NULL - expect_error( - if (nrow(input) == 0) stop("No data for fld/val provided") - ) -}) - -test_that("tcplPlot loads data", { - input <- tcplLoadData(lvl = 4, type = "mc") - expect_no_error( - if (nrow(input) == 0) stop("No data for fld/val provided") - ) -}) - -test_that("logic check works: assign multi=TRUE for output='pdf'", { - output <- "pdf" - multi <- NULL - if (output == "pdf" && is.null(multi)) { - multi <- TRUE - } - expect_true(multi) -}) - -test_that("logic check works: assign multi=FALSE for output != 'pdf', - verbose=FALSE for output='console'", { - output = 'console' - if (output !="pdf") { - multi <- FALSE - if(output =="console"){ - verbose <- FALSE - } - } - expect_false(multi) - expect_false(verbose) - }) - -test_that("logic check works: assign nrow = ncol = 1 for output='pdf' and - multi=FALSE to plot one plot per page", { - output = 'pdf' - multi = FALSE - input <- tcplLoadData(lvl = 4, type = "mc") - if(nrow(input) > 1 && output == "pdf" && multi == FALSE) { - nrow = ncol = 1 - } - expect_equal( - c(nrow,ncol), - c(1,1) - ) -}) - -test_that("error message: output = 'console' and multi = FALSE - to avoid multiple plots in console", { - input <- tcplLoadData(lvl = 4, type = "mc") - expect_error( - if(nrow(input) > 1 && output == "console" && multi == FALSE) stop("More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: ", nrow(input)) - ) -}) - - -test_that("nrow value set based on verbose", { - nrow = NULL - verbose = TRUE - if(is.null(nrow)){ - nrow <- ifelse(verbose,2,2) - } - expect_equal(nrow,2) -}) - -test_that("ncol value set based on verbose", { - ncol = NULL - verbose = FALSE - if(is.null(ncol)){ - ncol <- ifelse(verbose,2,3) - } - expect_equal(ncol,3) -}) - -test_that("m4id filters mc4 input", { - input <- tcplLoadData(lvl = 4, type = "mc") - m4id <- input$m4id - expect_length(m4id,5) -}) - -test_that("m4id filters mc5 input", { - input <- tcplLoadData(lvl = 5, type = "mc") - m4id <- input$m4id - expect_length(m4id,5) -}) - -test_that("dat table loads", { - lvl = 5 - l4 <- tcplLoadData(lvl = 4, type = "mc", add.fld = TRUE) - if (lvl >= 5L) { - l5 <- tcplLoadData(lvl = 5, type = "mc", add.fld = TRUE) - dat <- l4[l5, on = "m4id"] - } - expect_length(dat,length(l5)+length(l4)-1) -}) - -test_that("tcplPrepOtpt loads chemical and units", { - lvl = 5 - l4 <- tcplLoadData(lvl = 4, type = "mc", add.fld = TRUE) - if (lvl >= 5L) { - l5 <- mc_vignette[["mc5"]] - dat <- l4[l5, on = c("m4id","aeid")] - dat <- dat[,!c("tp","ga","q","la","ac50_loss")] - } - expect_length(dat,188) - expect_type(dat$dsstox_substance_id,"character") - expect_type(dat$conc_unit,"character") -}) - -test_that("unlog conc data table works", { - agg <- tcplLoadData(lvl = "agg", type = "mc") - conc_resp_table <- agg %>% - group_by(m4id) %>% - summarise(conc = list(10^logc), resp = list(resp)) %>% - as.data.table() - expect_true(is.data.table(conc_resp_table)) - expect_length(conc_resp_table,3) - expect_length(conc_resp_table$conc,5) -}) - -test_that("conc_resp_table joins dat table correctly", { - lvl = 5 - l4 <- tcplLoadData(lvl = 4, type = "mc", add.fld = TRUE) - if (lvl >= 5L) { - l5 <- tcplLoadData(lvl = 5, type = "mc", add.fld = TRUE) - dat <- l4[l5, on = "m4id"] - } - agg <- tcplLoadData(lvl = "agg", type = "mc") - conc_resp_table <- agg %>% - group_by(m4id) %>% - summarise(conc = list(10^logc), resp = list(resp)) %>% - as.data.table() - dat <- dat[conc_resp_table, on = "m4id"] - expect_length(dat,183) -}) test_that("one m4id tcplPlot works", { skip_on_ci() @@ -165,7 +25,7 @@ test_that("one m4id tcplPlot works", { agg <- tcplLoadData(lvl = "agg", type = "mc") conc_resp_table <- agg %>% group_by(m4id) %>% - summarise(conc = list(10^logc), resp = list(resp)) %>% + summarise(conc = list(conc), resp = list(resp)) %>% as.data.table() dat <- dat[conc_resp_table, on = "m4id"] dat <- dat[,normalized_data_type:="log2_fold_induction"] @@ -187,7 +47,7 @@ test_that("negative direction plot has negative bmr and cutoff lines", { agg <- tcplLoadData(lvl = "agg", type = "mc") conc_resp_table <- agg %>% group_by(m4id) %>% - summarise(conc = list(10^logc), resp = list(resp)) %>% + summarise(conc = list(conc), resp = list(resp)) %>% as.data.table() dat <- dat[conc_resp_table, on = "m4id"] dat <- dat[,normalized_data_type:="log2_fold_induction"] @@ -196,24 +56,7 @@ test_that("negative direction plot has negative bmr and cutoff lines", { vdiffr::expect_doppelganger("negative_cutoff_bmr", mc5_tcplplot) }) -test_that("coff,bmr should be negative if winning model has negative top", { - lvl = 5 - l4 <- tcplLoadData(lvl = 4, type = "mc", add.fld = TRUE) - if (lvl >= 5L) { - l5 <- tcplLoadData(lvl = 5, type = "mc", add.fld = TRUE) - dat <- l4[l5, on = "m4id"] - } - dat <- dat[spid == "1210314466"] - if (!is.null(dat$top) && !is.null(dat$coff) && !is.na(dat$top) && !is.null(dat$bmr)) { - if (dat$top < 0) { - dat$coff <- dat$coff * -1 - dat$bmr <- dat$bmr * -1 - } - } - expect_lt(dat$coff,0) - expect_lt(dat$bmr,0) -}) -# test_that("description", { -# expect_*(code) -# }) +#------------------------------------------------------------------------------- +# new tests using drvr = "MySQL" and mocking +#------------------------------------------------------------------------------- \ No newline at end of file From b4d9282ba22e1000d809b2745c622b6634ece757 Mon Sep 17 00:00:00 2001 From: Carter Thunes Date: Wed, 31 Jul 2024 19:21:14 -0400 Subject: [PATCH 12/32] updated mc_test data to store tcplPlot data as well --- data-raw/mc_test.R | 104 +++++++++++++++++++++++++++++++++++++-------- data/mc_test.rda | Bin 9131 -> 33493 bytes 2 files changed, 86 insertions(+), 18 deletions(-) diff --git a/data-raw/mc_test.R b/data-raw/mc_test.R index debd83b5..3ade9c6c 100644 --- a/data-raw/mc_test.R +++ b/data-raw/mc_test.R @@ -4,6 +4,11 @@ # ('R CMD BATCH --vanilla '.) # Please do not jump around when running this script. #==============================================================================# +# NOTE: You MUST temporarily update tcplQuery() by adding a line at the top of the +# function: print(query). +# This is because the queries will be captured from output and saved as +# part of the mocking data. +#==============================================================================# ## r packages devtools::load_all() @@ -29,22 +34,43 @@ mc5_counts <- tcplQuery("SELECT DISTINCT aeid, max(hitc) as max_hitc FROM invitrodb.mc5 GROUP BY aeid") # filter to only include where at least one sample is active and n < 10 -mc5_counts <- mc5_counts %>% filter(max_hitc > 0.9 & n < 10) +mc5_counts <- mc5_counts %>% filter(max_hitc > 0.9 & n == 2) # pick one aeid -aeid <- mc5_counts[sample(1:nrow(mc5_counts),size = 1,replace = FALSE),aeid] +aeid <- selected <- mc5_counts[sample(1:nrow(mc5_counts),size = 1,replace = FALSE),aeid] # obtain the acid for the example dataset acid <- tcplLoadAcid(fld = 'aeid',val = aeid)$acid # pick one sample/row from each level (lvl 3 contains ids back to lvl 0 and lvl 6 does back to lvl 4) -l3_sample <- tcplLoadData(lvl = 3, fld = "acid", val = acid)[sample(1:nrow(l3),size = 1,replace = FALSE)] -l6_sample <- tcplLoadData(lvl = 6, fld = "aeid", val = aeid, add.fld = FALSE)[sample(1:nrow(l6),size = 1,replace = FALSE)] -l7_sample <- tcplLoadData(lvl = 7, fld = "aeid", val = aeid, add.fld = FALSE)[sample(1:nrow(l7),size = 1,replace = FALSE)] +l3 <- tcplLoadData(lvl = 3, fld = "acid", val = acid) +l3_sample1 <- l3[sample(1:nrow(l3),size = 1,replace = FALSE)] +l3_sample2 <- l3[sample(1:nrow(l3),size = 2,replace = FALSE)] +l5 <- tcplLoadData(lvl = 5, fld = "aeid", val = aeid, add.fld = FALSE) +l5_sample1 <- l5[sample(1:nrow(l5),size = 1,replace = FALSE)] +l5_sample2 <- l5[sample(1:nrow(l5),size = 2,replace = FALSE)] +l6 <- tcplLoadData(lvl = 6, fld = "aeid", val = aeid, add.fld = FALSE) +l6_sample1 <- l6[sample(1:nrow(l6),size = 1,replace = FALSE)] +l6_sample2 <- l6[sample(1:nrow(l6),size = 2,replace = FALSE)] +l7 <- tcplLoadData(lvl = 7, fld = "aeid", val = aeid, add.fld = FALSE) +l7_sample1 <- l7[sample(1:nrow(l7),size = 1,replace = FALSE)] +l7_sample2 <- l7[sample(1:nrow(l7),size = 2,replace = FALSE)] +# pick compare.val endpoints and ids +# be sure to only allow to choose from endpoints with the same number of samples +mc5_counts <- filter(mc5_counts, n == mc5_counts[aeid == selected]$n & aeid != selected) +compare.aeid <- mc5_counts[sample(1:nrow(mc5_counts),size = 1,replace = FALSE),aeid] +compare.l5 <- tcplLoadData(lvl = 5, fld = "aeid", val = compare.aeid) +compare.l5_sample1 <- compare.l5[sample(1:nrow(compare.l5),size = 1,replace = FALSE)] +compare.l5_sample2 <- compare.l5[sample(1:nrow(compare.l5),size = 2,replace = FALSE)] -get_query_data <- function(lvl, fld, val, add.fld = TRUE) { +get_query_data <- function(lvl, fld, val, compare.val = NULL, add.fld = TRUE, func = "tcplLoadData") { + message(compare.val) + if (func == "tcplLoadData") { + # IMPORTANT || MUST ADD TEMPORARY LINE TO TCPLQUERY -------------------------- + # add temporary line to top of tcplQuery to get the query string: print(query) + query_strings <- capture.output(result<-tcplLoadData(lvl = lvl, fld = fld, val = val, add.fld = add.fld)) + } else if (func == "tcplPlot") { + query_strings <- capture.output(result<-tcplPlot(type = "mc", fld = fld, val = val, compare.val = compare.val, output = "pdf", multi = TRUE)) + } - # IMPORTANT || MUST ADD TEMPORARY LINE TO TCPLQUERY -------------------------- - # add temporary line to top of tcplQuery to get the query string: print(query) - query_strings <- capture.output(result<-tcplLoadData(lvl = lvl, fld = fld, val = val, add.fld = add.fld)) query_strings <- unique(gsub("\\\\", "\\\"", gsub("\"", "", gsub("\\\\n", "\\\n", gsub("\\[1\\] ", "", query_strings))))) # use queries to save data @@ -63,23 +89,65 @@ get_query_data <- function(lvl, fld, val, add.fld = TRUE) { # to add more tests with new/different data to test-tcplLoadData.R, add lines below and run script mc_test <- list( tcplConfQuery = tcplQuery("SHOW VARIABLES LIKE 'max_allowed_packet'"), - mc0_by_m0id = get_query_data(lvl = 0, fld = "m0id", val = l3_sample$m0id), + mc0_by_m0id = get_query_data(lvl = 0, fld = "m0id", val = l3_sample1$m0id), mc0_by_acid = get_query_data(lvl = 0, fld = "acid", val = acid), - mc1_by_m1id = get_query_data(lvl = 1, fld = "m1id", val = l3_sample$m1id), + mc1_by_m1id = get_query_data(lvl = 1, fld = "m1id", val = l3_sample1$m1id), mc1_by_acid = get_query_data(lvl = 1, fld = "acid", val = acid), - mc2_by_m2id = get_query_data(lvl = 2, fld = "m2id", val = l3_sample$m2id), + mc2_by_m2id = get_query_data(lvl = 2, fld = "m2id", val = l3_sample1$m2id), mc2_by_acid = get_query_data(lvl = 2, fld = "acid", val = acid), - mc3_by_m3id = get_query_data(lvl = 3, fld = "m3id", val = l3_sample$m3id), + mc3_by_m3id = get_query_data(lvl = 3, fld = "m3id", val = l3_sample1$m3id), mc3_by_aeid = get_query_data(lvl = 3, fld = "aeid", val = aeid), - mc4_by_m4id = get_query_data(lvl = 4, fld = "m4id", val = l6_sample$m4id), + mc4_by_m4id = get_query_data(lvl = 4, fld = "m4id", val = l5_sample1$m4id), mc4_by_aeid = get_query_data(lvl = 4, fld = "aeid", val = aeid, add.fld = FALSE), - mc5_by_m5id = get_query_data(lvl = 5, fld = "m5id", val = l6_sample$m5id), + mc5_by_m5id = get_query_data(lvl = 5, fld = "m5id", val = l5_sample1$m5id), mc5_by_aeid = get_query_data(lvl = 5, fld = "aeid", val = aeid, add.fld = FALSE), - mc6_by_m6id = get_query_data(lvl = 6, fld = "m6id", val = l6_sample$m6id), + mc6_by_m6id = get_query_data(lvl = 6, fld = "m6id", val = l6_sample1$m6id), mc6_by_aeid = get_query_data(lvl = 6, fld = "aeid", val = aeid), - mc7_by_m7id = get_query_data(lvl = 7, fld = "m7id", val = l7_sample$m7id), + mc7_by_m7id = get_query_data(lvl = 7, fld = "m7id", val = l7_sample1$m7id), mc7_by_aeid = get_query_data(lvl = 7, fld = "aeid", val = aeid), - mcagg_by_aeid = get_query_data(lvl = "agg", fld = "aeid", val = aeid) + mcagg_by_aeid = get_query_data(lvl = "agg", fld = "aeid", val = aeid), + plot_single_m4id = get_query_data(fld = "m4id", + val = l5_sample1$m4id, + func = "tcplPlot"), + plot_multiple_m4id = get_query_data(fld = "m4id", + val = l5_sample2$m4id, + func = "tcplPlot"), + plot_single_aeid = get_query_data(fld = "aeid", + val = aeid, + func = "tcplPlot"), + plot_multiple_aeid = get_query_data(fld = "aeid", + val = c(aeid, compare.aeid), + func = "tcplPlot"), + plot_single_spid = get_query_data(fld = c("spid", "aeid"), + val = list(l5_sample1$spid, aeid), + func = "tcplPlot"), + plot_multiple_spid = get_query_data(fld = c("spid", "aeid"), + val = list(l5_sample2$spid, aeid), + func = "tcplPlot"), + plot_single_m4id_compare = get_query_data(fld = "m4id", + val = l5_sample1$m4id, + compare.val = compare.l5_sample1$m4id, + func = "tcplPlot"), + plot_multiple_m4id_compare = get_query_data(fld = "m4id", + val = l5_sample2$m4id, + compare.val = compare.l5_sample2$m4id, + func = "tcplPlot"), + plot_single_aeid_compare = get_query_data(fld = "aeid", + val = aeid, + compare.val = compare.aeid, + func = "tcplPlot"), + plot_multiple_aeid_compare = get_query_data(fld = "aeid", + val = c(aeid, compare.aeid), + compare.val = c(compare.aeid, aeid), + func = "tcplPlot"), + plot_single_spid_compare = get_query_data(fld = c("spid", "aeid"), + val = list(l5_sample1$spid, aeid), + compare.val = list(compare.l5_sample1$spid, compare.aeid), + func = "tcplPlot"), + plot_multiple_spid_compare = get_query_data(fld = c("spid", "aeid"), + val = list(l5_sample2$spid, aeid), + compare.val = list(compare.l5_sample2$spid, compare.aeid), + func = "tcplPlot") ) #---------------------------# ## save the data diff --git a/data/mc_test.rda b/data/mc_test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otValidate --- R/tcplPlotUtils.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/tcplPlotUtils.R b/R/tcplPlotUtils.R index bcaa921b..467b1b09 100644 --- a/R/tcplPlotUtils.R +++ b/R/tcplPlotUtils.R @@ -38,7 +38,7 @@ tcplPlotSetYRange <- function(dat,yuniform,yrange,type){ } - tcplPlotValidate <- function(type = "mc",flags = NULL,output = "none",multi = FALSE,verbose = FALSE){ + tcplPlotValidate <- function(type = "mc",flags = NULL,output = "none",multi = NULL,verbose = FALSE){ # set lvl based on type lvl <- 5 @@ -46,6 +46,7 @@ tcplPlotSetYRange <- function(dat,yuniform,yrange,type){ lvl <- 2 if (flags == TRUE) { warning("'flags' was set to TRUE - no flags exist for plotting single concentration") + flags = FALSE } } From 1057c0bb45b938520c78c41c96ec9824f54c98ce Mon Sep 17 00:00:00 2001 From: Carter Thunes Date: Fri, 2 Aug 2024 15:07:27 -0400 Subject: [PATCH 14/32] updated mc_test to include mocking data for tcplPlot as well --- data-raw/mc_test.R | 20 +++++++++++++------- data/mc_test.rda | Bin 33493 -> 42367 bytes 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/data-raw/mc_test.R b/data-raw/mc_test.R index 3ade9c6c..cd209fad 100644 --- a/data-raw/mc_test.R +++ b/data-raw/mc_test.R @@ -14,6 +14,7 @@ devtools::load_all() library(here) library(dplyr) +library(stringr) #---------------------------# ## code to prepare `mc_test` dataset goes here # source the user ID, password, host, and database information for connection @@ -68,7 +69,11 @@ get_query_data <- function(lvl, fld, val, compare.val = NULL, add.fld = TRUE, fu # add temporary line to top of tcplQuery to get the query string: print(query) query_strings <- capture.output(result<-tcplLoadData(lvl = lvl, fld = fld, val = val, add.fld = add.fld)) } else if (func == "tcplPlot") { - query_strings <- capture.output(result<-tcplPlot(type = "mc", fld = fld, val = val, compare.val = compare.val, output = "pdf", multi = TRUE)) + query_strings <- capture.output(result<-tcplPlot(type = "mc", fld = fld, + val = val, compare.val = compare.val, + output = "pdf", multi = TRUE, flags = TRUE, + fileprefix = "temp_tcplPlot")) + file.remove(stringr::str_subset(list.files(), "^temp_tcplPlot")) # clean up } query_strings <- unique(gsub("\\\\", "\\\"", gsub("\"", "", gsub("\\\\n", "\\\n", gsub("\\[1\\] ", "", query_strings))))) @@ -81,6 +86,7 @@ get_query_data <- function(lvl, fld, val, compare.val = NULL, add.fld = TRUE, fu # also store fld and val in list object for use in test case dat[fld] <- val + if (!is.null(compare.val)) dat[sprintf("compare.%s", fld)] <- compare.val return(dat) } @@ -110,13 +116,13 @@ mc_test <- list( val = l5_sample1$m4id, func = "tcplPlot"), plot_multiple_m4id = get_query_data(fld = "m4id", - val = l5_sample2$m4id, + val = list(l5_sample2$m4id), func = "tcplPlot"), plot_single_aeid = get_query_data(fld = "aeid", val = aeid, func = "tcplPlot"), plot_multiple_aeid = get_query_data(fld = "aeid", - val = c(aeid, compare.aeid), + val = list(c(aeid, compare.aeid)), func = "tcplPlot"), plot_single_spid = get_query_data(fld = c("spid", "aeid"), val = list(l5_sample1$spid, aeid), @@ -129,16 +135,16 @@ mc_test <- list( compare.val = compare.l5_sample1$m4id, func = "tcplPlot"), plot_multiple_m4id_compare = get_query_data(fld = "m4id", - val = l5_sample2$m4id, - compare.val = compare.l5_sample2$m4id, + val = list(l5_sample2$m4id), + compare.val = list(compare.l5_sample2$m4id), func = "tcplPlot"), plot_single_aeid_compare = get_query_data(fld = "aeid", val = aeid, compare.val = compare.aeid, func = "tcplPlot"), plot_multiple_aeid_compare = get_query_data(fld = "aeid", - val = c(aeid, compare.aeid), - compare.val = c(compare.aeid, aeid), + val = list(c(aeid, compare.aeid)), + compare.val = list(c(compare.aeid, aeid)), func = "tcplPlot"), plot_single_spid_compare = get_query_data(fld = c("spid", "aeid"), val = list(l5_sample1$spid, aeid), diff --git a/data/mc_test.rda b/data/mc_test.rda index 44a925177b5880cfb661cc86e321b2f23419fa6e..cdca61c1d426526ed015c37a2499d7bc43ee25b5 100644 GIT binary patch literal 42367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js+c|qaz~5s!EqJ zm=aK9pe6X#!QD^Y^UIm*nLf{!b%ttjQ_vBB{)WJU49!MUkvZvA5FQ?m?9yq(IQn1& z_W-UMt_;7?Pp9n>W)s&l0q$HE4xS{N{24?e| z!iYg=twyc3I7{;Om!64T-}qLEW)MxsFGrmvIu+V54pNpL>Hd?D19KjtjDS7@yWXalI7&n!~Ke`xm4 z#z%dikr~fd1!Ozqjx$oa`M1)MAE8o@9CF$ueaPFG6Tr*;*nQDEoRMpR z9=;A#r1PD8O=0cEoS@G^AiHKtz=CJ;m45T4!GH2}Uy@M0d0Ksr=50LTse^DSZ^5rT z^rKz(>x!@~0yoPCjQx+Y9H&M9^nvpuYb45Wr?f#~#S~M>7{#iVgI)DcS9nTc!bao6ow98b-592+x^O}S~ zVu;`a9m=GxcO%_`CL^KjFR*1ZrNIdK+r1!_$sv`=|Q^G&D~C` zOS`v%z48mjm42CUDZQ$>Eg8jz$32vY3xQAZl1knXvg^0+{e+%492eC#`X|STFXI(oY)~797HPfbkmtVm{B9qm`UAyP znw}GCnx$^C1w{w{OVwgjbw*}6%s(5Wq8o)#w79sh-i|WZHj@z40RlaXY>$a9iI5@H zZSRK&banrYDS&V`9(m5@!AF8fOIE#a_3)i&xgKSnzai=9OGKHpB%kcK8=n5UZmrj> z0qbUHYwGMSqN^HK?VNsBfn*p2>BiZD`vi?1Y@Kk)<)=SYuf}i5y)3~V~8lUM; z@Kdm%`Gb8q+`mf%1U*dlGP7_Ms5HnY-?0uTcBoH??N`Pahw)Ox3 From 12f19d7c519d36dbae297c95713845a0937b2e84 Mon Sep 17 00:00:00 2001 From: Carter Thunes Date: Fri, 2 Aug 2024 15:07:56 -0400 Subject: [PATCH 15/32] added mocking tests for tcplPlot in test-tcplPlot.R --- .../_snaps/tcplPlot/test-output-482273.svg | 738 ++++++++++++++++++ tests/testthat/test-tcplPlot.R | 292 ++++++- 2 files changed, 1029 insertions(+), 1 deletion(-) create mode 100644 tests/testthat/_snaps/tcplPlot/test-output-482273.svg diff --git a/tests/testthat/_snaps/tcplPlot/test-output-482273.svg b/tests/testthat/_snaps/tcplPlot/test-output-482273.svg new file mode 100644 index 00000000..7f91b287 --- /dev/null +++ b/tests/testthat/_snaps/tcplPlot/test-output-482273.svg @@ -0,0 +1,738 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +0.0 +0.3 +0.6 + + + + + + + +0.1 +1.0 +10.0 +100.0 +Concentration (uM) +Log2 Fold Induction + + + + + + + + + + + + + + + + + + + +Winning Model +(exp2) +Losing Models +Cutoff +BMD +AC50 +DTXSID80379721 1H,1H,6H,6H-Perfluorohexane-1,6-diol diacrylate +SPID:01504209 AEID:80 AENM:ATG_GLI_CIS +M4ID:7918855 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Hitcall + + + + +0.999 + + + + +model + + + + +poly2 + + + + +BMD + + + + +49.542 + + + + +aic + + + + +exp2 + + + + +AC50 + + + + +81.061 + + + + +rme + + + + +pow + + + + +hill + + + + +exp3 + + + + +exp5 + + + + +gnls + + + + +poly1 + + + + +exp4 + + + + +cnst + + + + +-2.1e+01 + + + + +-2.1e+01 + + + + +-2.0e+01 + + + + +-1.9e+01 + + + + +-1.9e+01 + + + + +-1.9e+01 + + + + +-1.5e+01 + + + + +-1.4e+01 + + + + +-6.0e+00 + + + + +4.350 + + + + +0.095 + + + + +0.093 + + + + +0.096 + + + + +0.094 + + + + +0.094 + + + + +0.094 + + + + +0.094 + + + + +0.122 + + + + +0.149 + + + + +0.332 + + + + diff --git a/tests/testthat/test-tcplPlot.R b/tests/testthat/test-tcplPlot.R index 6663cc37..a8dc1021 100644 --- a/tests/testthat/test-tcplPlot.R +++ b/tests/testthat/test-tcplPlot.R @@ -59,4 +59,294 @@ test_that("negative direction plot has negative bmr and cutoff lines", { #------------------------------------------------------------------------------- # new tests using drvr = "MySQL" and mocking -#------------------------------------------------------------------------------- \ No newline at end of file +#------------------------------------------------------------------------------- +# Format +# test_that("something works", { + # data("mc_test") + # mocked <- mc_test$mc0_by_m0id # change this + # local_mocked_bindings( + # tcplQuery = function(query, db, tbl) { + # if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") mc_test$tcplConfQuery + # else mocked[query][[1]] + # } + # ) + # tcplConf(drvr = "MySQL", db = "invitrodb") # must include both +# }) + +test_that("tcplPlotLoadData loads all necessary mc data", { + data("mc_test") + mocked <- mc_test$plot_single_m4id + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") mc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + dat <- tcplPlotLoadData(val = mocked$m4id, flags = TRUE) + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("dsstox_substance_id", "aenm", "m4id", "bmad", "hitc", "modl", + "cnst_aic", "flag", "ac50", "order", "conc", "resp", "conc_unit", + "resp_unit", "normalized_data_type") %in% colnames(dat))) + expect_true(mocked$m4id %in% dat$m4id) +}) + +test_that("tcplPlotLoadData loads all necessary sc data", { + skip() +}) + +test_that("tcplPlotLoadData errors if type is not 'mc' or 'sc'", { + data("mc_test") + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") mc_test$tcplConfQuery + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + expect_error(tcplPlotLoadData(type = "ms", val = 123, flags = TRUE), + "Invalid 'lvl' and 'type' combination.") +}) + +test_that("tcplPlotValidate warns user if flags = TRUE and type = 'sc'", { + expect_warning(validated_params <- tcplPlotValidate(type = "sc",flags = TRUE,output = "pdf",multi = NULL,verbose = FALSE)) + expect_equal(validated_params, list(lvl = 2, type = "sc", flags = FALSE, output = "pdf", multi = TRUE, verbose = FALSE)) +}) + +test_that("tcplPlotValidate force assigns multi = FALSE and verbose = FALSE if output != pdf", { + validated_params <- tcplPlotValidate(type = "mc",flags = TRUE,output = "console",multi = TRUE,verbose = TRUE) + expect_equal(validated_params, list(lvl = 5, type = "mc", flags = TRUE, output = "console", multi = FALSE, verbose = FALSE)) +}) + +test_that("tcplPlotValidate doesn't change correctly assigned parameters", { + validated_params <- tcplPlotValidate(type = "mc",flags = TRUE,output = "pdf",multi = TRUE,verbose = TRUE) + expect_equal(validated_params, list(lvl = 5, type = "mc", flags = TRUE, output = "pdf", multi = TRUE, verbose = TRUE)) +}) + +test_that("tcplPlotSetYRange validates range", { + # error cases + expect_error(tcplPlotSetYRange(dat=NULL,yuniform=FALSE,yrange=c(1,2,3),type="mc"), "'yrange' must be of length 2") + expect_error(tcplPlotSetYRange(dat=NULL,yuniform=FALSE,yrange=1,type="mc"), "'yrange' must be of length 2") + expect_error(tcplPlotSetYRange(dat=NULL,yuniform=FALSE,yrange=NULL,type="mc"), "'yrange' must be of length 2") + # validate existing set yrange and doesn't overwrite it regardless if yuniform is TRUE + expect_equal(tcplPlotSetYRange(dat=NULL,yuniform=FALSE,yrange=c(-100,100),type="mc"),c(-100,100)) + expect_equal(tcplPlotSetYRange(dat=NULL,yuniform=TRUE,yrange=c(-100,100),type="mc"),c(-100,100)) +}) + +test_that("tcplPlotSetYRange correctly sets yrange for mc data", { + data("mc_test") + mocked <- mc_test$plot_multiple_aeid + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") mc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + dat <- tcplPlotLoadData(fld = "aeid", val = mocked$aeid, flags = TRUE) + expect_no_error(yrange <- tcplPlotSetYRange(dat=dat,yuniform=TRUE,yrange=c(NA,NA),type="mc")) + expect_length(yrange,2) + expect_equal(yrange, c(-53.6184,19.1)) +}) + +test_that("tcplPlotSetYRange correctly sets yrange for sc data", { + skip() +}) + +test_that("tcplPlot works for single m4id", { + data("mc_test") + mocked <- mc_test$plot_single_m4id + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") mc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "m4id", val = mocked$m4id, output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "m4id", val = mocked$m4id, output = "console", verbose = TRUE, flags = TRUE, multi = TRUE))) + file.remove(stringr::str_subset(list.files(), "^temp_tcplPlot")) # clean up +}) + +test_that("tcplPlot works for multiple m4id", { + data("mc_test") + mocked <- mc_test$plot_multiple_m4id + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") mc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "m4id", val = mocked$m4id, output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + # console does not work with length(val) > 1 + expect_error(tcplPlot(type = "mc", fld = "m4id", val = mocked$m4id, output = "console", verbose = TRUE, flags = TRUE, multi = TRUE), + "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 2") + file.remove(stringr::str_subset(list.files(), "^temp_tcplPlot")) # clean up +}) + +test_that("tcplPlot works for single aeid", { + data("mc_test") + mocked <- mc_test$plot_single_aeid + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") mc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "aeid", val = mocked$aeid, output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + # console does not work with length(val) > 1 + expect_error(tcplPlot(type = "mc", fld = "aeid", val = mocked$aeid, output = "console", verbose = TRUE, flags = TRUE, multi = TRUE), + "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 2") + file.remove(stringr::str_subset(list.files(), "^temp_tcplPlot")) # clean up +}) + +test_that("tcplPlot works for multiple aeid", { + data("mc_test") + mocked <- mc_test$plot_multiple_aeid + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") mc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "aeid", val = mocked$aeid, output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + # console does not work with length(val) > 1 + expect_error(tcplPlot(type = "mc", fld = "aeid", val = mocked$aeid, output = "console", verbose = TRUE, flags = TRUE, multi = TRUE), + "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 4") + file.remove(stringr::str_subset(list.files(), "^temp_tcplPlot")) # clean up +}) + +test_that("tcplPlot works for single spid/aeid", { + data("mc_test") + mocked <- mc_test$plot_single_spid + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") mc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + # console does not work with length(val) > 1 + expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), output = "console", verbose = TRUE, flags = TRUE, multi = TRUE))) + file.remove(stringr::str_subset(list.files(), "^temp_tcplPlot")) # clean up +}) + +test_that("tcplPlot works for multiple spid/aeid", { + data("mc_test") + mocked <- mc_test$plot_multiple_spid + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") mc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + # console does not work with length(val) > 1 + expect_error(tcplPlot(type = "mc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), output = "console", verbose = TRUE, flags = TRUE, multi = TRUE), + "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 2") + file.remove(stringr::str_subset(list.files(), "^temp_tcplPlot")) # clean up +}) + +test_that("tcplPlot works for single m4id compared", { + data("mc_test") + mocked <- mc_test$plot_single_m4id_compare + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") mc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "m4id", val = mocked$m4id, compare.val = mocked$compare.m4id, output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "m4id", val = mocked$m4id, compare.val = mocked$compare.m4id, output = "console", verbose = TRUE, flags = TRUE, multi = TRUE))) + file.remove(stringr::str_subset(list.files(), "^temp_tcplPlot")) # clean up +}) + +test_that("tcplPlot works for multiple m4id compared", { + data("mc_test") + mocked <- mc_test$plot_multiple_m4id_compare + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") mc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "m4id", val = mocked$m4id, compare.val = mocked$compare.m4id, output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + # console does not work with length(val) > 1 + expect_error(tcplPlot(type = "mc", fld = "m4id", val = mocked$m4id, compare.val = mocked$compare.m4id, output = "console", verbose = TRUE, flags = TRUE, multi = TRUE), + "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 4") + file.remove(stringr::str_subset(list.files(), "^temp_tcplPlot")) # clean up +}) + +test_that("tcplPlot works for single aeid compared", { + data("mc_test") + mocked <- mc_test$plot_single_aeid_compare + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") mc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "aeid", val = mocked$aeid, compare.val = mocked$compare.aeid, output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + # console does not work with length(val) > 1 + expect_error(tcplPlot(type = "mc", fld = "aeid", val = mocked$aeid, compare.val = mocked$compare.aeid, output = "console", verbose = TRUE, flags = TRUE, multi = TRUE), + "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 4") + file.remove(stringr::str_subset(list.files(), "^temp_tcplPlot")) # clean up +}) + +test_that("tcplPlot works for multiple aeid compared", { + data("mc_test") + mocked <- mc_test$plot_multiple_aeid_compare + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") mc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "aeid", val = mocked$aeid, compare.val = mocked$compare.aeid, output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + # console does not work with length(val) > 1 + expect_error(tcplPlot(type = "mc", fld = "aeid", val = mocked$aeid, compare.val = mocked$compare.aeid, output = "console", verbose = TRUE, flags = TRUE, multi = TRUE), + "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 8") + file.remove(stringr::str_subset(list.files(), "^temp_tcplPlot")) # clean up +}) + +test_that("tcplPlot works for single spid/aeid compared", { + data("mc_test") + mocked <- mc_test$plot_single_spid_compare + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") mc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), compare.val = list(mocked$compare.spid, mocked$compare.aeid), output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + # console does not work with length(val) > 1 + expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), compare.val = list(mocked$compare.spid, mocked$compare.aeid), output = "console", verbose = TRUE, flags = TRUE, multi = TRUE))) + file.remove(stringr::str_subset(list.files(), "^temp_tcplPlot")) # clean up +}) + +test_that("tcplPlot works for multiple spid/aeid compared", { + data("mc_test") + mocked <- mc_test$plot_multiple_spid_compare + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") mc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), compare.val = list(mocked$compare.spid, mocked$compare.aeid), output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + # console does not work with length(val) > 1 + expect_error(tcplPlot(type = "mc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), compare.val = list(mocked$compare.spid, mocked$compare.aeid), output = "console", verbose = TRUE, flags = TRUE, multi = TRUE), + "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 4") + file.remove(stringr::str_subset(list.files(), "^temp_tcplPlot")) # clean up +}) \ No newline at end of file From 68274670289e162dcb71f6a16bff93261cf7258f Mon Sep 17 00:00:00 2001 From: Carter Thunes Date: Mon, 5 Aug 2024 19:17:33 -0400 Subject: [PATCH 16/32] fix bug discovered with testing sc plotting in console --- R/tcplPlot.R | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/R/tcplPlot.R b/R/tcplPlot.R index e29445ce..a6bf4957 100644 --- a/R/tcplPlot.R +++ b/R/tcplPlot.R @@ -413,11 +413,13 @@ tcplPlotlyPlot <- function(dat, lvl = 5){ } # compare data - if (!is.null(compare.dat$coff) && compare.dat$max_med < 0) { - compare.dat$coff <- compare.dat$coff * -1 - } - if (!is.null(compare.dat$coff) && !is.null(compare.dat$hitc) && compare.dat$hitc < 0) { - compare.dat$coff <- compare.dat$coff * -1 + if (nrow(compare.dat) > 0) { + if (!is.null(compare.dat$coff) && compare.dat$max_med < 0) { + compare.dat$coff <- compare.dat$coff * -1 + } + if (!is.null(compare.dat$coff) && !is.null(compare.dat$hitc) && compare.dat$hitc < 0) { + compare.dat$coff <- compare.dat$coff * -1 + } } } From 50f22ea25e65ca25588033d414b4cef4b153f80b Mon Sep 17 00:00:00 2001 From: Carter Thunes Date: Mon, 5 Aug 2024 19:32:36 -0400 Subject: [PATCH 17/32] added many new sc plot tests to mirror the existing mc plot tests --- tests/testthat/test-tcplPlot.R | 339 +++++++++++++++++++++++++++++++-- 1 file changed, 319 insertions(+), 20 deletions(-) diff --git a/tests/testthat/test-tcplPlot.R b/tests/testthat/test-tcplPlot.R index a8dc1021..145f1779 100644 --- a/tests/testthat/test-tcplPlot.R +++ b/tests/testthat/test-tcplPlot.R @@ -30,12 +30,14 @@ test_that("one m4id tcplPlot works", { dat <- dat[conc_resp_table, on = "m4id"] dat <- dat[,normalized_data_type:="log2_fold_induction"] dat <- dat[spid == "01504209"] - mc5_tcplplot <- tcplggplot(dat,verbose = verbose) + mc5_tcplplot <- suppressWarnings(tcplggplot(dat,verbose = verbose)) expect_no_warning(mc5_tcplplot) vdiffr::expect_doppelganger("test_output_482273", mc5_tcplplot) }) +# needs updates or removal; new spid is not in downward direction test_that("negative direction plot has negative bmr and cutoff lines", { + skip() lvl = 5 verbose = FALSE l4 <- tcplLoadData(lvl = 4, type = "mc", add.fld = TRUE) @@ -51,8 +53,8 @@ test_that("negative direction plot has negative bmr and cutoff lines", { as.data.table() dat <- dat[conc_resp_table, on = "m4id"] dat <- dat[,normalized_data_type:="log2_fold_induction"] - dat <- dat[spid == "1210314466"] - mc5_tcplplot <- tcplggplot(dat,verbose = verbose) + dat <- dat[spid == "01504209"] + mc5_tcplplot <- suppressWarnings(tcplggplot(dat,verbose = verbose)) vdiffr::expect_doppelganger("negative_cutoff_bmr", mc5_tcplplot) }) @@ -73,6 +75,7 @@ test_that("negative direction plot has negative bmr and cutoff lines", { # tcplConf(drvr = "MySQL", db = "invitrodb") # must include both # }) +# Test tcplPlotLoadData test_that("tcplPlotLoadData loads all necessary mc data", { data("mc_test") mocked <- mc_test$plot_single_m4id @@ -93,7 +96,22 @@ test_that("tcplPlotLoadData loads all necessary mc data", { }) test_that("tcplPlotLoadData loads all necessary sc data", { - skip() + data("sc_test") + mocked <- sc_test$plot_single_s2id + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") sc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + dat <- tcplPlotLoadData(type = "sc", fld = "s2id", val = mocked$s2id) + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("dsstox_substance_id", "aenm", "s2id", "bmad", "hitc", "max_med", + "order", "conc", "resp", "conc_unit", "coff", + "resp_unit", "normalized_data_type") %in% colnames(dat))) + expect_true(mocked$s2id %in% dat$s2id) }) test_that("tcplPlotLoadData errors if type is not 'mc' or 'sc'", { @@ -108,6 +126,7 @@ test_that("tcplPlotLoadData errors if type is not 'mc' or 'sc'", { "Invalid 'lvl' and 'type' combination.") }) +# Test tcplPlotValidate test_that("tcplPlotValidate warns user if flags = TRUE and type = 'sc'", { expect_warning(validated_params <- tcplPlotValidate(type = "sc",flags = TRUE,output = "pdf",multi = NULL,verbose = FALSE)) expect_equal(validated_params, list(lvl = 2, type = "sc", flags = FALSE, output = "pdf", multi = TRUE, verbose = FALSE)) @@ -123,6 +142,7 @@ test_that("tcplPlotValidate doesn't change correctly assigned parameters", { expect_equal(validated_params, list(lvl = 5, type = "mc", flags = TRUE, output = "pdf", multi = TRUE, verbose = TRUE)) }) +# Test tcplPlotSetYRange test_that("tcplPlotSetYRange validates range", { # error cases expect_error(tcplPlotSetYRange(dat=NULL,yuniform=FALSE,yrange=c(1,2,3),type="mc"), "'yrange' must be of length 2") @@ -146,13 +166,49 @@ test_that("tcplPlotSetYRange correctly sets yrange for mc data", { dat <- tcplPlotLoadData(fld = "aeid", val = mocked$aeid, flags = TRUE) expect_no_error(yrange <- tcplPlotSetYRange(dat=dat,yuniform=TRUE,yrange=c(NA,NA),type="mc")) expect_length(yrange,2) - expect_equal(yrange, c(-53.6184,19.1)) + min <- min(dat$resp_min, unlist(dat$resp)) + max <- max(dat$resp_max, unlist(dat$resp)) + if (2 %in% dat$model_type) { + cutoffs <- dat[model_type == 2]$coff + min <- min(min, cutoffs, cutoffs * -1) + max <- max(max, cutoffs, cutoffs * -1) + } + # any gain models contained in dat, cutoff only positive + if (3 %in% dat$model_type) { + cutoffs <- dat[model_type == 3]$coff + min <- min(min, cutoffs) + max <- max(max, cutoffs) + } + # any loss models contained in dat, cutoff only negative + if (4 %in% dat$model_type) { + cutoffs <- dat[model_type == 4]$coff + min <- min(min, cutoffs * -1) + max <- max(max, cutoffs * -1) + } + expect_equal(yrange, c(min,max)) }) test_that("tcplPlotSetYRange correctly sets yrange for sc data", { - skip() + data("sc_test") + mocked <- sc_test$plot_multiple_aeid + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") sc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + dat <- tcplPlotLoadData(type = "sc", fld = "aeid", val = mocked$aeid) + expect_no_error(yrange <- tcplPlotSetYRange(dat=dat,yuniform=TRUE,yrange=c(NA,NA),type="sc")) + expect_length(yrange,2) + min <- min(dat$resp_min, unlist(dat$resp)) + max <- max(dat$resp_max, unlist(dat$resp)) + min <- min(min, dat$coff, dat$coff * -1) + max <- max(max, dat$coff, dat$coff * -1) + expect_equal(yrange, c(min,max)) }) +# Test tcplPlot - mc test_that("tcplPlot works for single m4id", { data("mc_test") mocked <- mc_test$plot_single_m4id @@ -165,7 +221,9 @@ test_that("tcplPlot works for single m4id", { tcplConf(drvr = "MySQL", db = "invitrodb") # must include both expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "m4id", val = mocked$m4id, output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "m4id", val = mocked$m4id, output = "console", verbose = TRUE, flags = TRUE, multi = TRUE))) - file.remove(stringr::str_subset(list.files(), "^temp_tcplPlot")) # clean up + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up }) test_that("tcplPlot works for multiple m4id", { @@ -182,7 +240,9 @@ test_that("tcplPlot works for multiple m4id", { # console does not work with length(val) > 1 expect_error(tcplPlot(type = "mc", fld = "m4id", val = mocked$m4id, output = "console", verbose = TRUE, flags = TRUE, multi = TRUE), "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 2") - file.remove(stringr::str_subset(list.files(), "^temp_tcplPlot")) # clean up + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up }) test_that("tcplPlot works for single aeid", { @@ -199,7 +259,9 @@ test_that("tcplPlot works for single aeid", { # console does not work with length(val) > 1 expect_error(tcplPlot(type = "mc", fld = "aeid", val = mocked$aeid, output = "console", verbose = TRUE, flags = TRUE, multi = TRUE), "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 2") - file.remove(stringr::str_subset(list.files(), "^temp_tcplPlot")) # clean up + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up }) test_that("tcplPlot works for multiple aeid", { @@ -216,7 +278,9 @@ test_that("tcplPlot works for multiple aeid", { # console does not work with length(val) > 1 expect_error(tcplPlot(type = "mc", fld = "aeid", val = mocked$aeid, output = "console", verbose = TRUE, flags = TRUE, multi = TRUE), "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 4") - file.remove(stringr::str_subset(list.files(), "^temp_tcplPlot")) # clean up + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up }) test_that("tcplPlot works for single spid/aeid", { @@ -230,9 +294,10 @@ test_that("tcplPlot works for single spid/aeid", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) - # console does not work with length(val) > 1 expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), output = "console", verbose = TRUE, flags = TRUE, multi = TRUE))) - file.remove(stringr::str_subset(list.files(), "^temp_tcplPlot")) # clean up + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up }) test_that("tcplPlot works for multiple spid/aeid", { @@ -249,7 +314,9 @@ test_that("tcplPlot works for multiple spid/aeid", { # console does not work with length(val) > 1 expect_error(tcplPlot(type = "mc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), output = "console", verbose = TRUE, flags = TRUE, multi = TRUE), "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 2") - file.remove(stringr::str_subset(list.files(), "^temp_tcplPlot")) # clean up + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up }) test_that("tcplPlot works for single m4id compared", { @@ -264,7 +331,9 @@ test_that("tcplPlot works for single m4id compared", { tcplConf(drvr = "MySQL", db = "invitrodb") # must include both expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "m4id", val = mocked$m4id, compare.val = mocked$compare.m4id, output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "m4id", val = mocked$m4id, compare.val = mocked$compare.m4id, output = "console", verbose = TRUE, flags = TRUE, multi = TRUE))) - file.remove(stringr::str_subset(list.files(), "^temp_tcplPlot")) # clean up + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up }) test_that("tcplPlot works for multiple m4id compared", { @@ -281,7 +350,9 @@ test_that("tcplPlot works for multiple m4id compared", { # console does not work with length(val) > 1 expect_error(tcplPlot(type = "mc", fld = "m4id", val = mocked$m4id, compare.val = mocked$compare.m4id, output = "console", verbose = TRUE, flags = TRUE, multi = TRUE), "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 4") - file.remove(stringr::str_subset(list.files(), "^temp_tcplPlot")) # clean up + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up }) test_that("tcplPlot works for single aeid compared", { @@ -298,7 +369,9 @@ test_that("tcplPlot works for single aeid compared", { # console does not work with length(val) > 1 expect_error(tcplPlot(type = "mc", fld = "aeid", val = mocked$aeid, compare.val = mocked$compare.aeid, output = "console", verbose = TRUE, flags = TRUE, multi = TRUE), "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 4") - file.remove(stringr::str_subset(list.files(), "^temp_tcplPlot")) # clean up + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up }) test_that("tcplPlot works for multiple aeid compared", { @@ -315,7 +388,9 @@ test_that("tcplPlot works for multiple aeid compared", { # console does not work with length(val) > 1 expect_error(tcplPlot(type = "mc", fld = "aeid", val = mocked$aeid, compare.val = mocked$compare.aeid, output = "console", verbose = TRUE, flags = TRUE, multi = TRUE), "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 8") - file.remove(stringr::str_subset(list.files(), "^temp_tcplPlot")) # clean up + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up }) test_that("tcplPlot works for single spid/aeid compared", { @@ -329,9 +404,10 @@ test_that("tcplPlot works for single spid/aeid compared", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), compare.val = list(mocked$compare.spid, mocked$compare.aeid), output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) - # console does not work with length(val) > 1 expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), compare.val = list(mocked$compare.spid, mocked$compare.aeid), output = "console", verbose = TRUE, flags = TRUE, multi = TRUE))) - file.remove(stringr::str_subset(list.files(), "^temp_tcplPlot")) # clean up + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up }) test_that("tcplPlot works for multiple spid/aeid compared", { @@ -348,5 +424,228 @@ test_that("tcplPlot works for multiple spid/aeid compared", { # console does not work with length(val) > 1 expect_error(tcplPlot(type = "mc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), compare.val = list(mocked$compare.spid, mocked$compare.aeid), output = "console", verbose = TRUE, flags = TRUE, multi = TRUE), "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 4") - file.remove(stringr::str_subset(list.files(), "^temp_tcplPlot")) # clean up + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up +}) + +# Test tcplPlot - sc +test_that("tcplPlot works for single s2id", { + data("sc_test") + mocked <- sc_test$plot_single_s2id + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") sc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + expect_no_error(suppressWarnings(tcplPlot(type = "sc", fld = "s2id", val = mocked$s2id, output = "pdf", verbose = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + expect_no_error(suppressWarnings(tcplPlot(type = "sc", fld = "s2id", val = mocked$s2id, output = "console", verbose = TRUE, multi = TRUE))) + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up +}) + +test_that("tcplPlot works for multiple s2id", { + data("sc_test") + mocked <- sc_test$plot_multiple_s2id + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") sc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + expect_no_error(suppressWarnings(tcplPlot(type = "sc", fld = "s2id", val = mocked$s2id, output = "pdf", verbose = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + # console does not work with length(val) > 1 + expect_error(tcplPlot(type = "sc", fld = "s2id", val = mocked$s2id, output = "console", verbose = TRUE, multi = TRUE), + "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 2") + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up +}) + +test_that("tcplPlot works for single aeid", { + data("sc_test") + mocked <- sc_test$plot_single_aeid + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") sc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + expect_no_error(suppressWarnings(tcplPlot(type = "sc", fld = "aeid", val = mocked$aeid, output = "pdf", verbose = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + # console does not work with length(val) > 1 + expect_error(tcplPlot(type = "sc", fld = "aeid", val = mocked$aeid, output = "console", verbose = TRUE, multi = TRUE), + "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 7") + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up +}) + +test_that("tcplPlot works for multiple aeid", { + data("sc_test") + mocked <- sc_test$plot_multiple_aeid + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") sc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + expect_no_error(suppressWarnings(tcplPlot(type = "sc", fld = "aeid", val = mocked$aeid, output = "pdf", verbose = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + # console does not work with length(val) > 1 + expect_error(tcplPlot(type = "sc", fld = "aeid", val = mocked$aeid, output = "console", verbose = TRUE, multi = TRUE), + "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 14") + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up +}) + +test_that("tcplPlot works for single spid/aeid", { + data("sc_test") + mocked <- sc_test$plot_single_spid + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") sc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + expect_no_error(suppressWarnings(tcplPlot(type = "sc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), output = "pdf", verbose = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + expect_no_error(suppressWarnings(tcplPlot(type = "sc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), output = "console", verbose = TRUE, multi = TRUE))) + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up +}) + +test_that("tcplPlot works for multiple spid/aeid", { + data("sc_test") + mocked <- sc_test$plot_multiple_spid + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") sc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + expect_no_error(suppressWarnings(tcplPlot(type = "sc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), output = "pdf", verbose = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + # console does not work with length(val) > 1 + expect_error(tcplPlot(type = "sc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), output = "console", verbose = TRUE, multi = TRUE), + "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 2") + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up +}) + +test_that("tcplPlot works for single s2id compared", { + data("sc_test") + mocked <- sc_test$plot_single_s2id_compare + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") sc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + expect_no_error(suppressWarnings(tcplPlot(type = "sc", fld = "s2id", val = mocked$s2id, compare.val = mocked$compare.s2id, output = "pdf", verbose = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + expect_no_error(suppressWarnings(tcplPlot(type = "sc", fld = "s2id", val = mocked$s2id, compare.val = mocked$compare.s2id, output = "console", verbose = TRUE, multi = TRUE))) + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up +}) + +test_that("tcplPlot works for multiple s2id compared", { + data("sc_test") + mocked <- sc_test$plot_multiple_s2id_compare + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") sc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + expect_no_error(suppressWarnings(tcplPlot(type = "sc", fld = "s2id", val = mocked$s2id, compare.val = mocked$compare.s2id, output = "pdf", verbose = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + # console does not work with length(val) > 1 + expect_error(tcplPlot(type = "sc", fld = "s2id", val = mocked$s2id, compare.val = mocked$compare.s2id, output = "console", verbose = TRUE, multi = TRUE), + "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 4") + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up +}) + +test_that("tcplPlot works for single aeid compared", { + data("sc_test") + mocked <- sc_test$plot_single_aeid_compare + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") sc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + expect_no_error(suppressWarnings(tcplPlot(type = "sc", fld = "aeid", val = mocked$aeid, compare.val = mocked$compare.aeid, output = "pdf", verbose = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + # console does not work with length(val) > 1 + expect_error(tcplPlot(type = "sc", fld = "aeid", val = mocked$aeid, compare.val = mocked$compare.aeid, output = "console", verbose = TRUE, multi = TRUE), + "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 14") + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up +}) + +test_that("tcplPlot works for multiple aeid compared", { + data("sc_test") + mocked <- sc_test$plot_multiple_aeid_compare + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") sc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + expect_no_error(suppressWarnings(tcplPlot(type = "sc", fld = "aeid", val = mocked$aeid, compare.val = mocked$compare.aeid, output = "pdf", verbose = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + # console does not work with length(val) > 1 + expect_error(tcplPlot(type = "sc", fld = "aeid", val = mocked$aeid, compare.val = mocked$compare.aeid, output = "console", verbose = TRUE, multi = TRUE), + "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 28") + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up +}) + +test_that("tcplPlot works for single spid/aeid compared", { + data("sc_test") + mocked <- sc_test$plot_single_spid_compare + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") sc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + expect_no_error(suppressWarnings(tcplPlot(type = "sc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), compare.val = list(mocked$compare.spid, mocked$compare.aeid), output = "pdf", verbose = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + expect_no_error(suppressWarnings(tcplPlot(type = "sc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), compare.val = list(mocked$compare.spid, mocked$compare.aeid), output = "console", verbose = TRUE, multi = TRUE))) + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up +}) + +test_that("tcplPlot works for multiple spid/aeid compared", { + data("sc_test") + mocked <- sc_test$plot_multiple_spid_compare + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") sc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + expect_no_error(suppressWarnings(tcplPlot(type = "sc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), compare.val = list(mocked$compare.spid, mocked$compare.aeid), output = "pdf", verbose = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + # console does not work with length(val) > 1 + expect_error(tcplPlot(type = "sc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), compare.val = list(mocked$compare.spid, mocked$compare.aeid), output = "console", verbose = TRUE, multi = TRUE), + "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 4") + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up }) \ No newline at end of file From c9cb5236f37a4d80041e2659c0bf1e348c7ccfd9 Mon Sep 17 00:00:00 2001 From: Carter Thunes Date: Mon, 5 Aug 2024 19:33:49 -0400 Subject: [PATCH 18/32] Added tcplLoadData tests for with mocked sc test data --- tests/testthat/test-tcplLoadData.R | 130 +++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) diff --git a/tests/testthat/test-tcplLoadData.R b/tests/testthat/test-tcplLoadData.R index f6251b26..d4b3d9a9 100644 --- a/tests/testthat/test-tcplLoadData.R +++ b/tests/testthat/test-tcplLoadData.R @@ -162,6 +162,136 @@ test_that("mc example error message appears", { # new method using mocking for tcplQuery function #------------------------------------------------------------------------------- +# SC0 +test_that("tcplLoadData loads sc0 data for one s0id", { + data("sc_test") + mocked <- sc_test$sc0_by_s0id + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") sc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + dat <- tcplLoadData(type = "sc", lvl = 0, fld = "s0id", val = mocked$s0id) + #expectations + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("s0id", "acid", "spid", "wllt", "wllq", "conc", "rval") %in% colnames(dat))) + expect_true(mocked$s0id %in% dat$s0id) +}) + +test_that("tcplLoadData loads sc0 data for one acid", { + data("sc_test") + mocked <- sc_test$sc0_by_acid + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") sc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + dat <- tcplLoadData(type = "sc", lvl = 0, fld = "acid", val = mocked$acid) + #expectations + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("s0id", "acid", "spid", "wllt", "wllq", "conc", "rval") %in% colnames(dat))) + expect_true(mocked$acid %in% dat$acid) +}) + +# SC1 +test_that("tcplLoadData loads sc1 data for one s1id", { + data("sc_test") + mocked <- sc_test$sc1_by_s1id + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") sc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + dat <- tcplLoadData(type = "sc", lvl = 1, fld = "s1id", val = mocked$s1id) + #expectations + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("s0id", "s1id", "acid", "aeid", "spid", "wllt", "wllq", "conc", "resp") %in% colnames(dat))) + expect_true(mocked$s1id %in% dat$s1id) +}) + +test_that("tcplLoadData loads sc1 data for one acid", { + data("sc_test") + mocked <- sc_test$sc1_by_acid + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") sc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + dat <- tcplLoadData(type = "sc", lvl = 1, fld = "acid", val = mocked$acid) + #expectations + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("s0id", "s1id", "acid", "aeid", "spid", "wllt", "wllq", "conc", "resp") %in% colnames(dat))) + expect_true(mocked$acid %in% dat$acid) +}) + +# SC2 +test_that("tcplLoadData loads sc2 data for one s2id", { + data("sc_test") + mocked <- sc_test$sc2_by_s2id + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") sc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + dat <- tcplLoadData(type = "sc", lvl = 2, fld = "s2id", val = mocked$s2id) + #expectations + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("s2id", "aeid", "spid", "bmad", "max_med", "coff", "hitc") %in% colnames(dat))) + expect_true(mocked$s2id %in% dat$s2id) +}) + +test_that("tcplLoadData loads sc2 data for one aeid", { + data("sc_test") + mocked <- sc_test$sc2_by_aeid + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") sc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + dat <- tcplLoadData(type = "sc", lvl = 2, fld = "aeid", val = mocked$aeid) + #expectations + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("s2id", "aeid", "spid", "bmad", "max_med", "coff", "hitc") %in% colnames(dat))) + expect_true(mocked$aeid %in% dat$aeid) +}) + +# SCagg +test_that("tcplLoadData loads sc 'agg' data for one aeid", { + data("sc_test") + mocked <- sc_test$scagg_by_aeid + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") sc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + dat <- tcplLoadData(type = "sc", lvl = "agg", fld = "aeid", val = mocked$aeid) + #expectations + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("s0id", "s1id", "s2id", "acid", "aeid", "conc", "resp") %in% colnames(dat))) + expect_true(mocked$aeid %in% dat$aeid) +}) + # MC0 test_that("tcplLoadData loads mc0 data for one m0id", { data("mc_test") From cc6e99be502b7bf0a303d939c47f7796977db154 Mon Sep 17 00:00:00 2001 From: Carter Thunes Date: Tue, 6 Aug 2024 00:00:21 -0400 Subject: [PATCH 19/32] fix bug found with missing concs in console plotting --- R/tcplPlot.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/tcplPlot.R b/R/tcplPlot.R index a6bf4957..a7a44cdc 100644 --- a/R/tcplPlot.R +++ b/R/tcplPlot.R @@ -202,7 +202,7 @@ tcplPlotlyPlot <- function(dat, lvl = 5){ # extract range from level 3 data for creating plotting all the functions # increase resolution to get smoother curves resolution <- 100 - x_min_max <- range(l3_dat_both$conc) + x_min_max <- range(l3_dat_both$conc, na.rm=TRUE) #if the overall minimum conc is greater than 0 (test wells) if (x_min_max[1] > 0) { hline_range <- 10^(seq(from = log10(x_min_max[1]/100), to = log10(x_min_max[2]*100), length.out = resolution)) From ef052dedcac4dfb88dd4a94569f0f89c04c4599b Mon Sep 17 00:00:00 2001 From: Carter Thunes Date: Tue, 6 Aug 2024 00:01:40 -0400 Subject: [PATCH 20/32] add sc_test data for testing tcplLoadData and tcplPlot --- data-raw/sc_test.R | 146 +++++++++++++++++++++++++++++++++++++++++++++ data/sc_test.rda | Bin 0 -> 10560 bytes 2 files changed, 146 insertions(+) create mode 100644 data-raw/sc_test.R create mode 100644 data/sc_test.rda diff --git a/data-raw/sc_test.R b/data-raw/sc_test.R new file mode 100644 index 00000000..4928f9ae --- /dev/null +++ b/data-raw/sc_test.R @@ -0,0 +1,146 @@ +#==============================================================================# +# NOTE: This script is written such that it is run from 'top' to 'bottom' +# or programmatically via the Terminal. +# ('R CMD BATCH --vanilla '.) +# Please do not jump around when running this script. +#==============================================================================# +# NOTE: You MUST temporarily update tcplQuery() by adding a line at the top of the +# function: print(query). +# This is because the queries will be captured from output and saved as +# part of the mocking data. +#==============================================================================# +## r packages +devtools::load_all() + +library(here) +library(dplyr) +library(stringr) +#---------------------------# +## code to prepare `sc_test` dataset goes here +# source the user ID, password, host, and database information for connection +# - NOTE: To replicate one will need to save their own 'db_cred.R', including +# the 'userid', 'userpwd', 'host', and DB collection via 'ivtdb'. +source(file = here::here("data-raw/db_cred.R"),verbose = FALSE) +# connect to the DB +tcplConf(user = userid, + pass = userpwd, + host = host, + db = ivtdb, + drvr = "MySQL") + +# pick endpoints and ids +# load the number of rows and max hitc per aeid +sc2_counts <- tcplQuery("SELECT DISTINCT aeid, + COUNT( aeid ) as n, + max(hitc) as max_hitc + FROM invitrodb.sc2 GROUP BY aeid") +# filter to only include where at least one sample is active and n = 7 +sc2_counts <- sc2_counts %>% filter(max_hitc > 0.9 & n == 7) +# pick one aeid +aeid <- selected <- sc2_counts[sample(1:nrow(sc2_counts),size = 1,replace = FALSE),aeid] +# obtain the acid for the example dataset +acid <- tcplLoadAcid(fld = 'aeid',val = aeid)$acid +# pick one sample/row from each level (lvl 1 contains ids back to lvl 0) +l1 <- tcplLoadData(type = "sc", lvl = 1, fld = "acid", val = acid) +l1_sample1 <- l1[sample(1:nrow(l1),size = 1,replace = FALSE)] +l1_sample2 <- l1[sample(1:nrow(l1),size = 2,replace = FALSE)] +l2 <- tcplLoadData(type = "sc", lvl = 2, fld = "aeid", val = aeid) +l2_sample1 <- l2[sample(1:nrow(l2),size = 1,replace = FALSE)] +l2_sample2 <- l2[sample(1:nrow(l2),size = 2,replace = FALSE)] +# pick compare.val endpoints and ids +# be sure to only allow to choose from endpoints with the same number of samples +sc2_counts <- filter(sc2_counts, n == sc2_counts[aeid == selected]$n & aeid != selected) +compare.aeid <- sc2_counts[sample(1:nrow(sc2_counts),size = 1,replace = FALSE),aeid] +compare.l2 <- tcplLoadData(type = "sc", lvl = 2, fld = "aeid", val = compare.aeid) +compare.l2_sample1 <- compare.l2[sample(1:nrow(compare.l2),size = 1,replace = FALSE)] +compare.l2_sample2 <- compare.l2[sample(1:nrow(compare.l2),size = 2,replace = FALSE)] + + +get_query_data <- function(lvl, fld, val, compare.val = NULL, add.fld = TRUE, func = "tcplLoadData") { + + # IMPORTANT || MUST ADD TEMPORARY LINE TO TCPLQUERY -------------------------- + # add temporary line to top of tcplQuery to get the query string: print(query) + if (func == "tcplLoadData") { + query_strings <- capture.output(result<-tcplLoadData(type = "sc", lvl = lvl, fld = fld, val = val, add.fld = add.fld)) + } else if (func == "tcplPlot") { + query_strings <- capture.output(result<-tcplPlot(type = "sc", fld = fld, + val = val, compare.val = compare.val, + output = "pdf", multi = TRUE, verbose = TRUE, + fileprefix = "temp_tcplPlot")) + file.remove(stringr::str_subset(list.files(), "^temp_tcplPlot")) # clean up + } + + query_strings <- unique(gsub("\\\\", "\\\"", gsub("\"", "", gsub("\\\\n", "\\\n", gsub("\\[1\\] ", "", query_strings))))) + + # use queries to save data + dat <- lapply(query_strings, function(query_string) { + return(tcplQuery(query_string)) + }) + names(dat) <- query_strings + + # also store fld and val in list object for use in test case + dat[fld] <- val + if (!is.null(compare.val)) dat[sprintf("compare.%s", fld)] <- compare.val + return(dat) + +} + + + +# to add more tests with new/different data to test-tcplLoadData.R, add lines below and run script +sc_test <- list( + tcplConfQuery = tcplQuery("SHOW VARIABLES LIKE 'max_allowed_packet'"), + sc0_by_s0id = get_query_data(lvl = 0, fld = "s0id", val = l1_sample1$s0id), + sc0_by_acid = get_query_data(lvl = 0, fld = "acid", val = acid), + sc1_by_s1id = get_query_data(lvl = 1, fld = "s1id", val = l1_sample1$s1id), + sc1_by_acid = get_query_data(lvl = 1, fld = "acid", val = acid), + sc2_by_s2id = get_query_data(lvl = 2, fld = "s2id", val = l2_sample1$s2id), + sc2_by_aeid = get_query_data(lvl = 2, fld = "aeid", val = aeid), + scagg_by_aeid = get_query_data(lvl = "agg", fld = "aeid", val = aeid), + plot_single_s2id = get_query_data(fld = "s2id", + val = l2_sample1$s2id, + func = "tcplPlot"), + plot_multiple_s2id = get_query_data(fld = "s2id", + val = list(l2_sample2$s2id), + func = "tcplPlot"), + plot_single_aeid = get_query_data(fld = "aeid", + val = aeid, + func = "tcplPlot"), + plot_multiple_aeid = get_query_data(fld = "aeid", + val = list(c(aeid, compare.aeid)), + func = "tcplPlot"), + plot_single_spid = get_query_data(fld = c("spid", "aeid"), + val = list(l2_sample1$spid, aeid), + func = "tcplPlot"), + plot_multiple_spid = get_query_data(fld = c("spid", "aeid"), + val = list(l2_sample2$spid, aeid), + func = "tcplPlot"), + plot_single_s2id_compare = get_query_data(fld = "s2id", + val = l2_sample1$s2id, + compare.val = compare.l2_sample1$s2id, + func = "tcplPlot"), + plot_multiple_s2id_compare = get_query_data(fld = "s2id", + val = list(l2_sample2$s2id), + compare.val = list(compare.l2_sample2$s2id), + func = "tcplPlot"), + plot_single_aeid_compare = get_query_data(fld = "aeid", + val = aeid, + compare.val = compare.aeid, + func = "tcplPlot"), + plot_multiple_aeid_compare = get_query_data(fld = "aeid", + val = list(c(aeid, compare.aeid)), + compare.val = list(c(compare.aeid, aeid)), + func = "tcplPlot"), + plot_single_spid_compare = get_query_data(fld = c("spid", "aeid"), + val = list(l2_sample1$spid, aeid), + compare.val = list(compare.l2_sample1$spid, compare.aeid), + func = "tcplPlot"), + plot_multiple_spid_compare = get_query_data(fld = c("spid", "aeid"), + val = list(l2_sample2$spid, aeid), + compare.val = list(compare.l2_sample2$spid, compare.aeid), + func = "tcplPlot") +) +#---------------------------# +## save the data +usethis::use_data(sc_test, overwrite = TRUE) +#---------------------------# \ No newline at end of file diff --git a/data/sc_test.rda b/data/sc_test.rda new file mode 100644 index 0000000000000000000000000000000000000000..2998be805e760152ddaa1e3eddcdbc7562058363 GIT binary patch literal 10560 zcmbVy2T)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IN9&cZ_F`2Zm1-D?SP}3#nXM{|Z|tY@MSo7*_UZl->(-T@gLKEDbjN(1!B!!!AFvmaBgvAv_Z=dpQ%@qyPc1dC$wK7VxRFtAI z3)Ftnw~NW1_%lDMQL&}qtl-yjkz`Cwai^{$euulNx)6HEFjelx(k>vde#D}lwZeQF zB{$hia#hasf2`M()kxZTpSnW-YkkJ(sJzv#BJqS6wGMchouHEH_pS{g|I2^3xWy{e zZ)YXu_nw1FAEa8pSf6QPbSHM3rN$_O`}q0tS4^1rnc=?}e@Xf0p_eic^R1j@$I(O} z{>{20by{?w*D23=U7lrU0zU!Eq!9x|H%6fvV1Gte%t5d-gJ_lke2&qtvfA_03p2sH z+bD{6ZhftoMI&xG|1(}3_008zn1-v)EDtm=ax+RYTnGyd@!g8~ksjKx=h)x!wk2HA zY-Ol5M@G^0#n?~6H-NL^u_E$C_s^Kwl+HU${!R;kC_xXwD8c7~&P~W8y(2&i-uZ0$ zcU+4iFi1CqZ9)PW>aefebCjdHH@53{AUa>(t+Hd6tNc2Y64Ed;yfJ(*{ChYNp?}~s zjX~S&_2dfptu|)$9W5_nB2)w#VV^9%wM8fkhfvR$LW#dVR^>>|v_8zUV-C((#yo0M zZ(s;-cpB+rr`#s)WmGKjTCwxQ=k&blHElFG>}to+YPu*v^O6o3WO^DC+9zT+g8(1+ z{4nnie`ftP-U^Lhft|7b>RCQ~Lqfbb#UlT%JY$A!V_x7(tt}ca10-8JJae7SxsVj$ zW2crtmd$ss+CsK03USL*<*SonViu5Q;_q?d->ZtcVS||^#(%GgrxJ38Xe-aAT>1Ht87lNo=*|NjoHuX)5r?&3dZY)3WBSpIce)~?}085z9fQueE ztxf8`d0A%5eS$LsPXd9#nckzXf)) Date: Tue, 6 Aug 2024 10:28:19 -0400 Subject: [PATCH 21/32] Add expectations of no error when using 'by' parameter in tcplPlot --- tests/testthat/test-tcplPlot.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/testthat/test-tcplPlot.R b/tests/testthat/test-tcplPlot.R index 145f1779..5da78ecc 100644 --- a/tests/testthat/test-tcplPlot.R +++ b/tests/testthat/test-tcplPlot.R @@ -275,11 +275,12 @@ test_that("tcplPlot works for multiple aeid", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "aeid", val = mocked$aeid, output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "aeid", val = mocked$aeid, output = "pdf", by = "aeid", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) # console does not work with length(val) > 1 expect_error(tcplPlot(type = "mc", fld = "aeid", val = mocked$aeid, output = "console", verbose = TRUE, flags = TRUE, multi = TRUE), "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 4") fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") - expect_length(fn, 1) # exactly one file created + expect_length(fn, 3) # exactly three files created (2 from `by = "aeid"` output) file.remove(fn) # clean up }) @@ -496,11 +497,12 @@ test_that("tcplPlot works for multiple aeid", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both expect_no_error(suppressWarnings(tcplPlot(type = "sc", fld = "aeid", val = mocked$aeid, output = "pdf", verbose = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + expect_no_error(suppressWarnings(tcplPlot(type = "sc", fld = "aeid", val = mocked$aeid, by = "aeid", output = "pdf", verbose = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) # console does not work with length(val) > 1 expect_error(tcplPlot(type = "sc", fld = "aeid", val = mocked$aeid, output = "console", verbose = TRUE, multi = TRUE), "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 14") fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") - expect_length(fn, 1) # exactly one file created + expect_length(fn, 3) # exactly one file created file.remove(fn) # clean up }) From b93601c46098f4ecefff3f56c1005f43f062d8ca Mon Sep 17 00:00:00 2001 From: Carter Thunes Date: Tue, 6 Aug 2024 12:08:24 -0400 Subject: [PATCH 22/32] added expectations for verbose/flags = FALSE for tcplPlot tests --- tests/testthat/test-tcplPlot.R | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/testthat/test-tcplPlot.R b/tests/testthat/test-tcplPlot.R index 5da78ecc..986c3fcb 100644 --- a/tests/testthat/test-tcplPlot.R +++ b/tests/testthat/test-tcplPlot.R @@ -220,6 +220,7 @@ test_that("tcplPlot works for single m4id", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "m4id", val = mocked$m4id, output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "m4id", val = mocked$m4id, output = "pdf", multi = TRUE, fileprefix = "temp_tcplPlot"))) expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "m4id", val = mocked$m4id, output = "console", verbose = TRUE, flags = TRUE, multi = TRUE))) fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") expect_length(fn, 1) # exactly one file created @@ -237,6 +238,7 @@ test_that("tcplPlot works for multiple m4id", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "m4id", val = mocked$m4id, output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "m4id", val = mocked$m4id, output = "pdf", multi = TRUE, fileprefix = "temp_tcplPlot"))) # console does not work with length(val) > 1 expect_error(tcplPlot(type = "mc", fld = "m4id", val = mocked$m4id, output = "console", verbose = TRUE, flags = TRUE, multi = TRUE), "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 2") @@ -256,6 +258,7 @@ test_that("tcplPlot works for single aeid", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "aeid", val = mocked$aeid, output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "aeid", val = mocked$aeid, output = "pdf", multi = TRUE, fileprefix = "temp_tcplPlot"))) # console does not work with length(val) > 1 expect_error(tcplPlot(type = "mc", fld = "aeid", val = mocked$aeid, output = "console", verbose = TRUE, flags = TRUE, multi = TRUE), "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 2") @@ -276,6 +279,8 @@ test_that("tcplPlot works for multiple aeid", { tcplConf(drvr = "MySQL", db = "invitrodb") # must include both expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "aeid", val = mocked$aeid, output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "aeid", val = mocked$aeid, output = "pdf", by = "aeid", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "aeid", val = mocked$aeid, output = "pdf", flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "aeid", val = mocked$aeid, output = "pdf", flags = TRUE, by = "aeid", multi = TRUE, fileprefix = "temp_tcplPlot"))) # console does not work with length(val) > 1 expect_error(tcplPlot(type = "mc", fld = "aeid", val = mocked$aeid, output = "console", verbose = TRUE, flags = TRUE, multi = TRUE), "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 4") @@ -295,6 +300,7 @@ test_that("tcplPlot works for single spid/aeid", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), output = "pdf", multi = TRUE, fileprefix = "temp_tcplPlot"))) expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), output = "console", verbose = TRUE, flags = TRUE, multi = TRUE))) fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") expect_length(fn, 1) # exactly one file created @@ -312,6 +318,7 @@ test_that("tcplPlot works for multiple spid/aeid", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), output = "pdf", multi = TRUE, fileprefix = "temp_tcplPlot"))) # console does not work with length(val) > 1 expect_error(tcplPlot(type = "mc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), output = "console", verbose = TRUE, flags = TRUE, multi = TRUE), "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 2") @@ -331,6 +338,7 @@ test_that("tcplPlot works for single m4id compared", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "m4id", val = mocked$m4id, compare.val = mocked$compare.m4id, output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "m4id", val = mocked$m4id, compare.val = mocked$compare.m4id, output = "pdf", multi = TRUE, fileprefix = "temp_tcplPlot"))) expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "m4id", val = mocked$m4id, compare.val = mocked$compare.m4id, output = "console", verbose = TRUE, flags = TRUE, multi = TRUE))) fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") expect_length(fn, 1) # exactly one file created @@ -348,6 +356,7 @@ test_that("tcplPlot works for multiple m4id compared", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "m4id", val = mocked$m4id, compare.val = mocked$compare.m4id, output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "m4id", val = mocked$m4id, compare.val = mocked$compare.m4id, output = "pdf", flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) # console does not work with length(val) > 1 expect_error(tcplPlot(type = "mc", fld = "m4id", val = mocked$m4id, compare.val = mocked$compare.m4id, output = "console", verbose = TRUE, flags = TRUE, multi = TRUE), "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 4") @@ -367,6 +376,7 @@ test_that("tcplPlot works for single aeid compared", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "aeid", val = mocked$aeid, compare.val = mocked$compare.aeid, output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "aeid", val = mocked$aeid, compare.val = mocked$compare.aeid, output = "pdf", multi = TRUE, fileprefix = "temp_tcplPlot"))) # console does not work with length(val) > 1 expect_error(tcplPlot(type = "mc", fld = "aeid", val = mocked$aeid, compare.val = mocked$compare.aeid, output = "console", verbose = TRUE, flags = TRUE, multi = TRUE), "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 4") @@ -386,6 +396,7 @@ test_that("tcplPlot works for multiple aeid compared", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "aeid", val = mocked$aeid, compare.val = mocked$compare.aeid, output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = "aeid", val = mocked$aeid, compare.val = mocked$compare.aeid, output = "pdf", multi = TRUE, flags = TRUE, fileprefix = "temp_tcplPlot"))) # console does not work with length(val) > 1 expect_error(tcplPlot(type = "mc", fld = "aeid", val = mocked$aeid, compare.val = mocked$compare.aeid, output = "console", verbose = TRUE, flags = TRUE, multi = TRUE), "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 8") @@ -405,6 +416,7 @@ test_that("tcplPlot works for single spid/aeid compared", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), compare.val = list(mocked$compare.spid, mocked$compare.aeid), output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), compare.val = list(mocked$compare.spid, mocked$compare.aeid), output = "pdf", multi = TRUE, fileprefix = "temp_tcplPlot"))) expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), compare.val = list(mocked$compare.spid, mocked$compare.aeid), output = "console", verbose = TRUE, flags = TRUE, multi = TRUE))) fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") expect_length(fn, 1) # exactly one file created @@ -422,6 +434,7 @@ test_that("tcplPlot works for multiple spid/aeid compared", { ) tcplConf(drvr = "MySQL", db = "invitrodb") # must include both expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), compare.val = list(mocked$compare.spid, mocked$compare.aeid), output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + expect_no_error(suppressWarnings(tcplPlot(type = "mc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), compare.val = list(mocked$compare.spid, mocked$compare.aeid), output = "pdf", flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) # console does not work with length(val) > 1 expect_error(tcplPlot(type = "mc", fld = c("spid", "aeid"), val = list(mocked$spid, mocked$aeid), compare.val = list(mocked$compare.spid, mocked$compare.aeid), output = "console", verbose = TRUE, flags = TRUE, multi = TRUE), "More than 1 concentration series returned for given field/val combination. Set output to pdf or reduce the number of curves to 1. Current number of curves: 4") From 1dacff947ca877535367ba9bd8e0fd3067e407bc Mon Sep 17 00:00:00 2001 From: Carter Thunes Date: Fri, 9 Aug 2024 14:45:49 -0400 Subject: [PATCH 23/32] fix unnest bug in tcplLoadData for loading agg level API data --- R/tcplLoadData.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/R/tcplLoadData.R b/R/tcplLoadData.R index bb027265..a838936d 100644 --- a/R/tcplLoadData.R +++ b/R/tcplLoadData.R @@ -213,10 +213,11 @@ tcplLoadData <- function(lvl, fld = NULL, val = NULL, type = "mc", add.fld = TRU # query the API dat <- tcplQueryAPI(fld = fld, val = val, return_flds = cols) - if (lvl == 3) { + if (lvl == 3 | lvl == "agg") { dat$resp <- lapply(dat$resp, unlist) dat$logc <- lapply(dat$logc, unlist) - dat <- unnest_longer(dat, c(conc, logc, resp)) %>% as.data.table() + if (lvl == 3) dat <- unnest_longer(dat, c(conc, logc, resp)) %>% as.data.table() + else dat <- unnest_longer(dat, c(logc, resp)) %>% as.data.table() } if (lvl == 6) { From e093f484eb2626abcf775663034f5bafb0316d41 Mon Sep 17 00:00:00 2001 From: Carter Thunes Date: Fri, 9 Aug 2024 14:46:46 -0400 Subject: [PATCH 24/32] add test_api rda file to pick various ids based on current API data --- data-raw/test_api.R | 45 ++++++++++++++++++++++++++++++++++++++++++++ data/test_api.rda | Bin 0 -> 171 bytes 2 files changed, 45 insertions(+) create mode 100644 data-raw/test_api.R create mode 100644 data/test_api.rda diff --git a/data-raw/test_api.R b/data-raw/test_api.R new file mode 100644 index 00000000..f211b2b0 --- /dev/null +++ b/data-raw/test_api.R @@ -0,0 +1,45 @@ +#==============================================================================# +# NOTE: This script is written such that it is run from 'top' to 'bottom' +# or programmatically via the Terminal. +# ('R CMD BATCH --vanilla '.) +# Please do not jump around when running this script. +#==============================================================================# +# NOTE: You MUST temporarily update tcplQuery() by adding a line at the top of the +# function: print(query). +# This is because the queries will be captured from output and saved as +# part of the mocking data. +#==============================================================================# +## r packages +devtools::load_all() +library(ctxR) +library(here) +library(dplyr) +library(stringr) +#---------------------------# +## code to prepare `test_api` dataset goes here +# source the user ID, password, host, and database information for connection +# - NOTE: To replicate one will need to save their own 'db_cred.R', including +# the 'apikey'. +source(file = here::here("data-raw/db_cred.R"),verbose = FALSE) +# connect to the DB +tcplConf(pass = apikey, + drvr = "API") + +assays <- get_all_assays(Server = paste0(getOption("TCPL_HOST"))) +aeid <- assays[sample(1:nrow(assays), 1),]$aeid +acid <- tcplLoadAcid(fld = "aeid", val = aeid)$acid +dat <- tcplLoadData(lvl = 5, fld = "aeid", val = aeid) +sample <- dat[sample(1:nrow(dat), 1),] + +# to add more tests with new/different data to test-tcplLoadData.R, add lines below and run script +test_api <- list( + aeid = aeid, + acid = acid, + dtxsid = sample$dtxsid, + spid = sample$spid, + m4id = sample$m4id +) +#---------------------------# +## save the data +usethis::use_data(test_api, overwrite = TRUE) +#---------------------------# \ No newline at end of file diff --git a/data/test_api.rda b/data/test_api.rda new file mode 100644 index 0000000000000000000000000000000000000000..b8de308a4c5f6b0d0b8615a8474e7eb8fbcc49cf GIT binary patch literal 171 zcmV;c095}%T4*^jL0KkKS&)c`RR92D@6!K&NC0-gMIc;2t|Lrf00;;G06+i%AOMmP zOqyr_001&+qeg&|6pb<%KmY&+jTT!WQB6e?UMLFXaLCrv7I*zH7`-}4Nh=uHlvc?X zP(y$?${o-%2_2_&p`_=ixw~X?XW=_47N#sfd^ajMtnlv!f-39}I#x^qM^kI_v6*l< ZaS)!gHdcrI3;sxcF64@Ep&=m=5UP!IKP&(M literal 0 HcmV?d00001 From 25e698f2fb44fb91277440b79543e0ae4282d246 Mon Sep 17 00:00:00 2001 From: Carter Thunes Date: Fri, 9 Aug 2024 14:48:49 -0400 Subject: [PATCH 25/32] 232 added API mocking tests/data to test-tcplLoadData & test-tcplPlot --- .../api-ccte.epa.gov/bioactivity/assay.json | 164 +++++++++++++ .../bioactivity/data/search/by-aeid/0.json | 3 + .../bioactivity/data/search/by-aeid/891.json | 214 +++++++++++++++++ .../data/search/by-dtxsid/DTXSID7020182.json | 204 ++++++++++++++++ .../data/search/by-dtxsid/fakedtxsid.json | 3 + .../bioactivity/data/search/by-m4id/0.json | 3 + .../data/search/by-m4id/742051.json | 219 ++++++++++++++++++ .../data/search/by-spid/TP0001055F12.json | 217 +++++++++++++++++ .../data/search/by-spid/fakespid.json | 3 + tests/testthat/test-tcplLoadData.R | 216 ++++++++++++++++- tests/testthat/test-tcplPlot.R | 112 +++++++++ 11 files changed, 1357 insertions(+), 1 deletion(-) create mode 100644 tests/testthat/ctx/api-ccte.epa.gov/bioactivity/assay.json create mode 100644 tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-aeid/0.json create mode 100644 tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-aeid/891.json create mode 100644 tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-dtxsid/DTXSID7020182.json create mode 100644 tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-dtxsid/fakedtxsid.json create mode 100644 tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-m4id/0.json create mode 100644 tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-m4id/742051.json create mode 100644 tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-spid/TP0001055F12.json create mode 100644 tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-spid/fakespid.json diff --git a/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/assay.json b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/assay.json new file mode 100644 index 00000000..a5eed06c --- /dev/null +++ b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/assay.json @@ -0,0 +1,164 @@ +[ +{ + "aeid": 891, + "assayComponentEndpointName": "CEETOX_H295R_11DCORT", + "exportReady": 1, + "internalReady": 1, + "assayComponentEndpointDesc": "Data from the assay component CEETOX_H295R_11DCORT was analyzed into 1 assay endpoint. This assay endpoint, CEETOX_H295R_11DCORT, was analyzed with bidirectional fitting relative to DMSO as the negative control and baseline of activity. Using a type of inducible reporter, gain or loss-of-signal activity using HPLC-MS-MS was used to understand synthesis of 11-Deoxycortisol in H295R cell line at 48hr of chemical exposure. To generalize the intended target to other relatable targets, this assay endpoint is annotated to the steroid hormone intended target family, where the subfamily is glucocorticoids.", + "assayFunctionType": "detection of steroid hormone", + "normalizedDataType": "log2_fold_induction", + "burstAssay": 0, + "keyPositiveControl": "Prochloraz;Forskolin", + "signalDirection": "bidirectional", + "intendedTargetType": "molecular messenger", + "intendedTargetTypeSub": "11-Deoxycortisol", + "intendedTargetFamily": "steroid hormone", + "intendedTargetFamilySub": "glucocorticoids", + "cellViabilityAssay": 0, + "dataUsability": 1, + "acid": 586, + "assayComponentName": "CEETOX_H295R_11DCORT", + "assayComponentDesc": "CEETOX_H295R_11DCORT is one of 23 assay component(s) measured or calculated from the CEETOX_H295R assay. It is designed to make measurements of hormone induction, a form of inducible reporter, as detected with absorbance signals by HPLC-MS-MS technology.", + "assayComponentTargetDesc": null, + "parameterReadoutType": "single", + "assayDesignType": "inducible reporter", + "assayDesignTypeSub": "hormone induction", + "biologicalProcessTarget": "regulation of steroid hormone biosynthetic process", + "detectionTechnologyType": "Spectrophotometry", + "detectionTechnologyTypeSub": "Absorbance", + "detectionTechnology": "HPLC-MS-MS", + "keyAssayReagentType": "inducer", + "keyAssayReagent": null, + "technologicalTargetType": "molecular messenger", + "technologicalTargetTypeSub": "11-Deoxycortisol", + "aid": 370, + "assayName": "CEETOX_H295R", + "assayDesc": "CEETOX_H295R is a cell-based, multiplexed-readout assay that uses H295R, a human adrenal gland cell line, with measurements taken at 48 hours after chemical dosing in a 96-well plate.", + "timepointHr": 48.0, + "organismId": 9606, + "organism": "human", + "tissue": "adrenal gland", + "cellFormat": "cell line", + "cellFreeComponentSource": "", + "cellShortName": "H295R", + "cellGrowthMode": "adherent", + "assayFootprint": "microplate: 96-well plate", + "assayFormatType": "cell-based", + "assayFormatTypeSub": "cell-based format", + "contentReadoutType": "multiplexed", + "dilutionSolvent": "DMSO", + "dilutionSolventPercentMax": 0.1, + "asid": 8, + "assaySourceName": "CEETOX", + "assaySourceLongName": "Ceetox/OpAns", + "assaySourceDesc": "Ceetox, a part of Cyprotex, is a Contract Research Organization (CRO) that in coordination with OpAns, an analytical laboratory, provide ADME-tox services.", + "gene": { + "geneId": 145, + "geneName": "nuclear receptor subfamily 3, group C, member 1 (glucocorticoid receptor)", + "description": null, + "geneSymbol": "NR3C1", + "organismId": 1, + "trackStatus": "live", + "entrezGeneId": 2908, + "officialSymbol": "NR3C1", + "officialFullName": "nuclear receptor subfamily 3, group C, member 1 (glucocorticoid receptor)", + "uniprotAccessionNumber": "P04150" + }, + "assayList": { + "name": "EDSP steroidogenesis", + "description": "Steroidogenesis pathway assays used in EDSP" + }, + "citations": { + "doi": "doi: 10.1093/toxsci/kfw002", + "url": "https://pubmed.ncbi.nlm.nih.gov/26781511/", + "pmid": 26781511, + "title": "High-Throughput Screening of Chemical Effects on Steroidogenesis Using H295R Human Adrenocortical Carcinoma Cells", + "author": "Karmaus AL, Toole CM, Filer DL, Lewis KC, Martin MT", + "citation": "Karmaus AL, Toole CM, Filer DL, Lewis KC, Martin MT. High-Throughput Screening of Chemical Effects on Steroidogenesis Using H295R Human Adrenocortical Carcinoma Cells. Toxicol Sci. 2016 Apr;150(2):323-32. doi: 10.1093/toxsci/kfw002. Epub 2016 Jan 18. PMID: 26781511; PMCID: PMC4809454.", + "otherId": "0", + "citationId": 245, + "otherSource": "" + } + }, + { + "aeid": 893, + "assayComponentEndpointName": "CEETOX_H295R_OHPREG", + "exportReady": 1, + "internalReady": 1, + "assayComponentEndpointDesc": "Data from the assay component CEETOX_H295R_OHPREG was analyzed into 1 assay endpoint. This assay endpoint, CEETOX_H295R_OHPREG, was analyzed with bidirectional fitting relative to DMSO as the negative control and baseline of activity. Using a type of inducible reporter, gain or loss-of-signal activity using HPLC-MS-MS was used to understand synthesis of 17alpha-hydroxypregnenolone in H295R cell line at 48hr of chemical exposure. To generalize the intended target to other relatable targets, this assay endpoint is annotated to the steroid hormone intended target family, where the subfamily is progestagens.", + "assayFunctionType": "detection of steroid hormone", + "normalizedDataType": "log2_fold_induction", + "burstAssay": 0, + "keyPositiveControl": "Prochloraz;Forskolin", + "signalDirection": "bidirectional", + "intendedTargetType": "molecular messenger", + "intendedTargetTypeSub": "17alpha-hydroxypregnenolone", + "intendedTargetFamily": "steroid hormone", + "intendedTargetFamilySub": "progestagens", + "cellViabilityAssay": 0, + "dataUsability": 1, + "acid": 587, + "assayComponentName": "CEETOX_H295R_OHPREG", + "assayComponentDesc": "CEETOX_H295R_OHPREG is one of 23 assay component(s) measured or calculated from the CEETOX_H295R assay. It is designed to make measurements of hormone induction, a form of inducible reporter, as detected with absorbance signals by HPLC-MS-MS technology.", + "assayComponentTargetDesc": null, + "parameterReadoutType": "single", + "assayDesignType": "inducible reporter", + "assayDesignTypeSub": "hormone induction", + "biologicalProcessTarget": "regulation of steroid hormone biosynthetic process", + "detectionTechnologyType": "Spectrophotometry", + "detectionTechnologyTypeSub": "Absorbance", + "detectionTechnology": "HPLC-MS-MS", + "keyAssayReagentType": "inducer", + "keyAssayReagent": null, + "technologicalTargetType": "molecular messenger", + "technologicalTargetTypeSub": "17alpha-hydroxypregnenolone", + "aid": 370, + "assayName": "CEETOX_H295R", + "assayDesc": "CEETOX_H295R is a cell-based, multiplexed-readout assay that uses H295R, a human adrenal gland cell line, with measurements taken at 48 hours after chemical dosing in a 96-well plate.", + "timepointHr": 48.0, + "organismId": 9606, + "organism": "human", + "tissue": "adrenal gland", + "cellFormat": "cell line", + "cellFreeComponentSource": "", + "cellShortName": "H295R", + "cellGrowthMode": "adherent", + "assayFootprint": "microplate: 96-well plate", + "assayFormatType": "cell-based", + "assayFormatTypeSub": "cell-based format", + "contentReadoutType": "multiplexed", + "dilutionSolvent": "DMSO", + "dilutionSolventPercentMax": 0.1, + "asid": 8, + "assaySourceName": "CEETOX", + "assaySourceLongName": "Ceetox/OpAns", + "assaySourceDesc": "Ceetox, a part of Cyprotex, is a Contract Research Organization (CRO) that in coordination with OpAns, an analytical laboratory, provide ADME-tox services.", + "gene": { + "geneId": 235, + "geneName": "progesterone receptor", + "description": null, + "geneSymbol": "PGR", + "organismId": 1, + "trackStatus": "live", + "entrezGeneId": 5241, + "officialSymbol": "PGR", + "officialFullName": "progesterone receptor", + "uniprotAccessionNumber": "P06401" + }, + "assayList": { + "name": "EDSP steroidogenesis", + "description": "Steroidogenesis pathway assays used in EDSP" + }, + "citations": { + "doi": "doi: 10.1093/toxsci/kfw002", + "url": "https://pubmed.ncbi.nlm.nih.gov/26781511/", + "pmid": 26781511, + "title": "High-Throughput Screening of Chemical Effects on Steroidogenesis Using H295R Human Adrenocortical Carcinoma Cells", + "author": "Karmaus AL, Toole CM, Filer DL, Lewis KC, Martin MT", + "citation": "Karmaus AL, Toole CM, Filer DL, Lewis KC, Martin MT. High-Throughput Screening of Chemical Effects on Steroidogenesis Using H295R Human Adrenocortical Carcinoma Cells. Toxicol Sci. 2016 Apr;150(2):323-32. doi: 10.1093/toxsci/kfw002. Epub 2016 Jan 18. PMID: 26781511; PMCID: PMC4809454.", + "otherId": "0", + "citationId": 245, + "otherSource": "" + } + } +] \ No newline at end of file diff --git a/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-aeid/0.json b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-aeid/0.json new file mode 100644 index 00000000..41b42e67 --- /dev/null +++ b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-aeid/0.json @@ -0,0 +1,3 @@ +[ + +] diff --git a/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-aeid/891.json b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-aeid/891.json new file mode 100644 index 00000000..632d997b --- /dev/null +++ b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-aeid/891.json @@ -0,0 +1,214 @@ +[ +{ + "mc5Param": { + "a": -0.04203307061789399, + "p": 0.5460604379820018, + "er": -2.961687340575808, + "bmr": 0.24529296780387735, + "mll": 15.548215735641588, + "top": -0.5196512704533357, + "ac50": 28.101146145905627, + "rmse": 0.06640717632156491, + "caikwt": 5.763898172614025E-7, + "hitcall": 0, + "top_over_cutoff": 0.8730733746593241 + }, + "mc6Param": { + "flag": [ + "Borderline" + ], + "mc6MthdId": [ + 11 + ] + }, + "m4id": 739899, + "spid": "TP0001111A03", + "chid": 26706, + "casn": "104-66-5", + "chnm": "1,2-Diphenoxyethane", + "dtxsid": "DTXSID5026706", + "bmad": 0.09919961779770327, + "respMax": 0.09581199409248546, + "respMin": -0.5287070328190216, + "maxMean": 0.09547397416142764, + "maxMeanConc": 0.0, + "maxMed": 0.09547397416142764, + "maxMedConc": 0.0, + "logcMax": 2.0, + "logcMin": -0.3979400086720376, + "nconc": 6, + "npts": 12, + "nrep": 2.0, + "nmedGtbl": 0, + "tmpi": 392, + "m5id": 5593614, + "modl": "pow", + "hitc": 0.0, + "fitc": 15, + "coff": 0.5951977067862196, + "actp": null, + "modelType": 2, + "chidRep": 1, + "stkc": 100.0, + "stkcUnit": "mM", + "testedConcUnit": "uM", + "mc3Param": { + "logc": [ + 0.6020599913279624, + 1.4771212547196624, + 2, + 1, + 1, + 0.6020599913279624, + 0, + -0.3979400086720376, + 0, + -0.3979400086720376, + 1.4771212547196624, + 2 + ], + "resp": [ + -0.1219088194460961, + -0.32553015793966994, + -0.5045436509136769, + -0.13466160520782172, + -0.16051042897671305, + -0.13210201379095904, + 0.09513595423036982, + -0.06785519848962922, + 0.09581199409248546, + 0.04313081806259705, + -0.22521953668839217, + -0.5287070328190216 + ] + }, + "mc4Param": { + "pow_a": -0.04203307061789399, + "pow_p": 0.5460604379820018, + "exp2_a": -135.43031969293415, + "exp2_b": 24758.2368451059, + "exp3_a": -6.590291627112856, + "exp3_b": 12168.035580209053, + "exp3_p": 0.5366736177235878, + "exp5_p": 0.8036529421613088, + "gnls_p": 1.0684453697794307, + "gnls_q": 6.162086684118666, + "hill_p": 1.0685679370984658, + "pow_er": -2.961687340575808, + "cnst_er": -1.5878944828835708, + "exp2_er": -2.466940782780456, + "exp3_er": -2.9581386432762313, + "exp4_er": -2.882848291483774, + "exp4_ga": 24.675475110420063, + "exp4_tp": -0.5449935875500249, + "exp5_er": -2.9406319348316443, + "exp5_ga": 31.92313239351669, + "exp5_tp": -0.619950410230828, + "gnls_er": -2.8940096753039195, + "gnls_ga": 30.030997000652224, + "gnls_la": 3765.8348363589794, + "gnls_tp": -0.6344484393364249, + "hill_er": -2.895092777762591, + "hill_ga": 30.02124604725821, + "hill_tp": -0.6344484375164885, + "poly1_a": -0.005482830552873358, + "poly2_a": -185.9966613313414, + "poly2_b": 34013.637361815425, + "pow_aic": -25.096431471283175, + "pow_cov": 1, + "pow_rme": 0.06640717632156491, + "pow_top": -0.5196512704533357, + "all_bmed": 0, + "cnst_aic": 3.636530654086035, + "cnst_rme": 0.2568551110914928, + "exp2_aic": -15.487349739776333, + "exp2_cov": 1, + "exp2_rme": 0.09060424792984167, + "exp2_top": -0.5481173588066438, + "exp3_aic": -23.040605732883225, + "exp3_cov": 1, + "exp3_rme": 0.0665942532085954, + "exp3_top": -0.5205153141686697, + "exp4_aic": -24.60642850057436, + "exp4_cov": 1, + "exp4_rme": 0.06378939666525871, + "exp4_top": -0.5449935875500249, + "exp5_aic": -23.453373444194582, + "exp5_cov": 1, + "exp5_rme": 0.06313350114017938, + "exp5_top": -0.619950410230828, + "gnls_aic": -18.7647385637527, + "gnls_cov": 1, + "gnls_rme": 0.06366576668916582, + "gnls_top": -0.6227904909943394, + "hill_aic": -22.76471828544939, + "hill_cov": 1, + "hill_rme": 0.06366792562809895, + "hill_top": -0.6344484375164885, + "poly1_er": -2.4676652157467536, + "poly2_er": -2.466613889582475, + "pow_a_sd": 0.0133914657021243, + "pow_ac50": 28.101146145905627, + "pow_p_sd": 0.07347202560858822, + "all_onesd": 0.1818331859183672, + "exp2_a_sd": 1010.7163320864136, + "exp2_ac50": 50.050488213605085, + "exp2_b_sd": 184433.0477767319, + "exp3_a_sd": 15.11363883316663, + "exp3_ac50": 28.465117178003663, + "exp3_b_sd": 46099.62216481522, + "exp3_p_sd": 0.08040478173494305, + "exp4_ac50": 24.675475110420063, + "exp5_ac50": 31.92313239351669, + "exp5_p_sd": 0.21502156344373555, + "gnls_ac50": 29.01551143219315, + "gnls_p_sd": 0.28582681155443485, + "gnls_q_sd": 24170.486190089636, + "hill_ac50": 30.02124604725821, + "hill_p_sd": 0.28578640913322406, + "poly1_aic": -17.505151594146362, + "poly1_cov": 1, + "poly1_rme": 0.09052914675666396, + "poly1_top": -0.5482830552873358, + "poly2_aic": -15.479306111354829, + "poly2_cov": 1, + "poly2_rme": 0.09062793747383256, + "poly2_top": -0.5484373488732158, + "pow_er_sd": 0.27488309244878134, + "exp2_er_sd": 0.240879204236971, + "exp3_er_sd": 0.27554570972330544, + "exp4_er_sd": 0.25641792933790464, + "exp4_ga_sd": 7.409116665026493, + "exp4_tp_sd": 0.05867635383553914, + "exp5_er_sd": 0.2664969387644301, + "exp5_ga_sd": 22.178936953111428, + "exp5_tp_sd": 0.18909411718852367, + "gnls_er_sd": 0.2682678139032472, + "gnls_ga_sd": 15.810589484590253, + "gnls_la_sd": 53590626.36734551, + "gnls_tp_sd": 0.13687433827156575, + "hill_er_sd": 0.2681932921461914, + "hill_ga_sd": 15.800202169448758, + "hill_tp_sd": 0.13681556112121443, + "poly1_a_sd": 0.0005582513340306865, + "poly1_ac50": 49.99999999999999, + "poly2_a_sd": 1159.027356596874, + "poly2_ac50": 50.0732843174381, + "poly2_b_sd": 211239.9663038622, + "poly1_er_sd": 0.2408012174070008, + "poly2_er_sd": 0.24088363765722565, + "pow_success": 1, + "cnst_success": 1, + "exp2_success": 1, + "exp3_success": 1, + "exp4_success": 1, + "exp5_success": 1, + "gnls_success": 1, + "hill_success": 1, + "poly1_success": 1, + "poly2_success": 1, + "gnls_ac50_loss": 3781.483601273532 + }, + "aeid": 891 + } +] \ No newline at end of file diff --git a/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-dtxsid/DTXSID7020182.json b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-dtxsid/DTXSID7020182.json new file mode 100644 index 00000000..eadfc76b --- /dev/null +++ b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-dtxsid/DTXSID7020182.json @@ -0,0 +1,204 @@ +[ + { + "mc5Param": { + "p": 7.9999998904107805, + "er": -6.079039516893902, + "ga": 10.354609389123947, + "tp": -0.04900024691370293, + "ac5": 7.478045616740115, + "bmr": 0.2104908060020537, + "mll": 16.775769134200562, + "top": -0.04900024691370293, + "ac10": 8.182109219003824, + "ac20": 8.986769021688765, + "ac50": 10.354609389123947, + "rmse": 0.004032182076102057, + "caikwt": 0.006723457623781064, + "hitcall": 1.6109606798658689E-18, + "top_over_cutoff": 0.6188365220248107 + }, + "mc6Param": { + "flag": [ + "Average number of replicates per conc is less than 2", + "Number of concentrations tested is less than 4" + ], + "mc6MthdId": [ + 13, + 14 + ] + }, + "m4id": 392721, + "spid": "TP0000077C05", + "chid": 20182, + "casn": "80-05-7", + "chnm": "Bisphenol A", + "dtxsid": "DTXSID7020182", + "bmad": 0.022749058062569997, + "respMax": 0.008, + "respMin": -0.049, + "maxMean": 0.008, + "maxMeanConc": 0.0, + "maxMed": 0.008, + "maxMedConc": 0.0, + "logcMax": 1.6020599913279623, + "logcMin": 0.0, + "nconc": 4, + "npts": 4, + "nrep": 1.0, + "nmedGtbl": 0, + "tmpi": 716, + "m5id": 4787296, + "modl": "exp5", + "hitc": 1.6109606798658689E-18, + "fitc": 13, + "coff": 0.07918124604762482, + "actp": null, + "modelType": 2, + "chidRep": 0, + "stkc": 20.0, + "stkcUnit": "mM", + "testedConcUnit": "uM", + "mc3Param": { + "logc": [ + 1, + 0, + 1.6020599913279623, + 0.6020599913279624 + ], + "resp": [ + -0.02, + 0.008, + -0.049, + 0.001 + ] + }, + "mc4Param": { + "pow_a": -0.0014427580345331586, + "pow_p": 0.9592986898174511, + "exp2_a": -4.6448208273152325, + "exp2_b": 3753.2238436112066, + "exp3_a": -0.035331051718831774, + "exp3_b": 47.31447995189462, + "exp3_p": 0.7860427020544185, + "exp5_p": 7.9999998904107805, + "gnls_p": 7.999999933861192, + "gnls_q": 2.4972121148804822, + "hill_p": 7.999999473906639, + "pow_er": -5.06801475320901, + "cnst_er": -3.866838032938705, + "exp2_er": -5.064045880660846, + "exp3_er": -4.98642447574726, + "exp4_er": -5.061595178996411, + "exp4_ga": 17.730331167133897, + "exp4_tp": -0.05879999999963083, + "exp5_er": -6.079039516893902, + "exp5_ga": 10.354609389123947, + "exp5_tp": -0.04900024691370293, + "gnls_er": -6.077957603797178, + "gnls_ga": 10.477401849788167, + "gnls_la": 686.793780954632, + "gnls_tp": -0.04904156879394911, + "hill_er": -6.077935587609875, + "hill_ga": 10.475670502006198, + "hill_tp": -0.04900137220511384, + "poly1_a": -0.0012438762051045949, + "poly2_a": -6.840495279290689, + "poly2_b": 5537.761016325804, + "pow_aic": -21.984273572297944, + "pow_cov": 1, + "pow_rme": 0.00667775191385891, + "pow_top": -0.04966466978119405, + "all_bmed": 0, + "cnst_aic": -15.560725133335415, + "cnst_rme": 0.02676751762864835, + "exp2_aic": -21.960105496726907, + "exp2_cov": 1, + "exp2_rme": 0.006694046889969263, + "exp2_top": -0.049766923417465574, + "exp3_aic": -19.53428178599764, + "exp3_cov": 1, + "exp3_rme": 0.007055301295726877, + "exp3_top": -0.04953705130823287, + "exp4_aic": -21.6706745457441, + "exp4_cov": 1, + "exp4_rme": 0.007121739796281197, + "exp4_top": -0.05879999999963083, + "exp5_aic": -25.551538268401124, + "exp5_cov": 1, + "exp5_rme": 0.004032182076102057, + "exp5_top": -0.04900024691370293, + "gnls_aic": -21.549095801020044, + "gnls_cov": 1, + "gnls_rme": 0.004032515983972862, + "gnls_top": -0.04901195987421019, + "hill_aic": -25.549090432440472, + "hill_cov": 1, + "hill_rme": 0.004032516717784591, + "hill_top": -0.04900137220511384, + "poly1_er": -5.065595039829217, + "poly2_er": -5.062727816770947, + "pow_a_sd": 0.0015787938875210603, + "pow_ac50": 19.420385066938692, + "pow_p_sd": 0.29943749087327554, + "all_onesd": 0.15603469681397605, + "exp2_a_sd": 49.92286985857353, + "exp2_ac50": 20.053287270309657, + "exp2_b_sd": 40120.04815044849, + "exp3_a_sd": 0.08977820333262714, + "exp3_ac50": 21.159764093008096, + "exp3_b_sd": 98.94007008963592, + "exp3_p_sd": 0.4298393329903503, + "exp4_ac50": 17.730331167133897, + "exp5_ac50": 10.354609389123947, + "exp5_p_sd": 12.443086816583772, + "gnls_ac50": 10.47589662455899, + "gnls_p_sd": null, + "gnls_q_sd": null, + "hill_ac50": 10.475670502006198, + "hill_p_sd": 6.757067877818015, + "poly1_aic": -23.96775222065048, + "poly1_cov": 1, + "poly1_rme": 0.006687643872573625, + "poly1_top": -0.049755048204183784, + "poly2_aic": -21.95743497107909, + "poly2_cov": 1, + "poly2_rme": 0.006696336372724192, + "poly2_top": -0.04976672041647811, + "pow_er_sd": 0.4173603932542164, + "exp2_er_sd": 0.4176038769379585, + "exp3_er_sd": 0.4298380565059921, + "exp4_er_sd": 0.48081760578742394, + "exp4_ga_sd": 9.506269879151334, + "exp4_tp_sd": 0.017318149353980967, + "exp5_er_sd": 0.6586148209441123, + "exp5_ga_sd": 0.5777095622871521, + "exp5_tp_sd": 0.0020449832072392017, + "gnls_er_sd": null, + "gnls_ga_sd": null, + "gnls_la_sd": null, + "gnls_tp_sd": null, + "hill_er_sd": 0.6590754787526507, + "hill_ga_sd": 0.4313021761339814, + "hill_tp_sd": 0.0020410788683443656, + "poly1_a_sd": 0.00014003658476212415, + "poly1_ac50": 19.999999999999996, + "poly2_a_sd": 64.8364065875001, + "poly2_ac50": 20.071712440915658, + "poly2_b_sd": 52109.84117163329, + "poly1_er_sd": 0.4173349853153968, + "poly2_er_sd": 0.417853613710997, + "pow_success": 1, + "cnst_success": 1, + "exp2_success": 1, + "exp3_success": 1, + "exp4_success": 1, + "exp5_success": 1, + "gnls_success": 1, + "hill_success": 1, + "poly1_success": 1, + "poly2_success": 1, + "gnls_ac50_loss": 687.1259538417128 + }, + "aeid": 891 + } +] \ No newline at end of file diff --git a/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-dtxsid/fakedtxsid.json b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-dtxsid/fakedtxsid.json new file mode 100644 index 00000000..41b42e67 --- /dev/null +++ b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-dtxsid/fakedtxsid.json @@ -0,0 +1,3 @@ +[ + +] diff --git a/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-m4id/0.json b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-m4id/0.json new file mode 100644 index 00000000..41b42e67 --- /dev/null +++ b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-m4id/0.json @@ -0,0 +1,3 @@ +[ + +] diff --git a/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-m4id/742051.json b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-m4id/742051.json new file mode 100644 index 00000000..f3039fb3 --- /dev/null +++ b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-m4id/742051.json @@ -0,0 +1,219 @@ +{ + "mc5Param": { + "a": 0.46153040816585506, + "p": 0.3000000129695179, + "er": -2.1489938644619224, + "ac5": 0.0004605041361306727, + "bmd": 3.0381729972311597, + "bmr": 0.6441456467828381, + "mll": 5.754150071942078, + "top": 0.9208742581259888, + "ac10": 0.004641590373765303, + "ac20": 0.04678429466205118, + "ac50": 0.9921257565800822, + "bmdl": 2.027009225969621, + "bmdu": 4.647862548676265, + "rmse": 0.13878968514546208, + "ac1sd": 1.1200550091211676, + "caikwt": 0.0000017230735265931015, + "hitcall": 0.00005554137553340851, + "top_over_cutoff": 0.7834319450546824 + }, + "mc6Param": { + "flag": [ + "Multiple points above baseline, inactive", + "Bmd > ac50, indication of high baseline variability" + ], + "mc6MthdId": [ + 8, + 9 + ] + }, + "m4id": 742051, + "spid": "TP0001055F12", + "chid": 20182, + "casn": "80-05-7", + "chnm": "Bisphenol A", + "dtxsid": "DTXSID7020182", + "bmad": 0.19590603113622784, + "respMax": 0.9164766444377165, + "respMin": -0.11247472925841268, + "maxMean": 0.8921865542151857, + "maxMeanConc": 1.0, + "maxMed": 0.8921865542151857, + "maxMedConc": 1.0, + "logcMax": 1.0, + "logcMin": -1.3979400086720375, + "nconc": 6, + "npts": 11, + "nrep": 2.0, + "nmedGtbl": 2, + "tmpi": 188, + "m5id": 5595766, + "modl": "pow", + "hitc": 5.554137553340851E-5, + "fitc": 13, + "coff": 1.175436186817367, + "actp": null, + "modelType": 2, + "chidRep": 0, + "stkc": 100.0, + "stkcUnit": "mM", + "testedConcUnit": "uM", + "mc3Param": { + "logc": [ + -0.3979400086720376, + -0.3979400086720376, + -1.3979400086720375, + -1, + 0.47712125471966244, + 1, + 0, + 1, + -1.3979400086720375, + 0, + -1 + ], + "resp": [ + 0.20163386116965043, + 0.2630344058337938, + -0.11247472925841268, + 0.35049724708413316, + 0.877744249949002, + 0.8678964639926549, + 0.3923174227787603, + 0.9164766444377165, + 0.23266075679027481, + 0.572889668420581, + 0.30742852519224706 + ] + }, + "mc4Param": { + "pow_a": 0.46153040816585506, + "pow_p": 0.3000000129695179, + "exp2_a": 493.4854150122184, + "exp2_b": 5100.6303705683395, + "exp3_a": 0.6196990339124355, + "exp3_b": 12.3801007301216, + "exp3_p": 0.30000002245078705, + "exp5_p": 0.559184008898033, + "gnls_p": 0.6966169844488359, + "gnls_q": 6.036564912084099, + "hill_p": 0.6966252703922315, + "pow_er": -2.1489938644619224, + "cnst_er": -0.7412322648286002, + "exp2_er": -1.309933099584406, + "exp3_er": -1.994302343872302, + "exp4_er": -2.1546592617003633, + "exp4_ga": 0.8212128611446451, + "exp4_tp": 0.9036408577609488, + "exp5_er": -2.1259054497387675, + "exp5_ga": 0.9064524290417632, + "exp5_tp": 0.9800445290952992, + "gnls_er": -2.0946002065058495, + "gnls_ga": 1.193177408945864, + "gnls_la": 360.2532939959973, + "gnls_tp": 1.09977197284731, + "hill_er": -2.0946137683635273, + "hill_ga": 1.1931655056915569, + "hill_tp": 1.0997719732924014, + "poly1_a": 0.09685344872787416, + "poly2_a": 687.0884983487523, + "poly2_b": 7104.757262104685, + "pow_aic": -5.508300143884156, + "pow_cov": 1, + "pow_rme": 0.13878968514546208, + "pow_top": 0.9208742581259888, + "all_bmed": 0, + "cnst_aic": 21.034498265446633, + "cnst_rme": 0.5426961091823314, + "exp2_aic": 12.367502691462542, + "exp2_cov": 1, + "exp2_rme": 0.304434826624701, + "exp2_top": 0.9684479071302802, + "exp3_aic": -0.3405205081886198, + "exp3_cov": 1, + "exp3_rme": 0.15725467669113338, + "exp3_top": 0.9634806035729844, + "exp4_aic": -5.267959950712097, + "exp4_cov": 1, + "exp4_rme": 0.1409207467299889, + "exp4_top": 0.9036408577609488, + "exp5_aic": -4.0882252836045865, + "exp5_cov": 1, + "exp5_rme": 0.12848853653680692, + "exp5_top": 0.9800445290952992, + "gnls_aic": 0.5221238653736275, + "gnls_cov": 1, + "gnls_rme": 0.13142836816523745, + "gnls_top": 1.05792490587989, + "hill_aic": -3.477876128326045, + "hill_cov": 1, + "hill_rme": 0.131428328688881, + "hill_top": 1.0997719732924014, + "poly1_er": -1.310231853290346, + "poly2_er": -1.3100832120170316, + "pow_a_sd": 0.052500833427207794, + "pow_ac50": 0.9921257565800822, + "pow_p_sd": 0.05445323316028355, + "all_onesd": 0.4774986262289386, + "exp2_a_sd": 7931.389911666789, + "exp2_ac50": 5.0024506770906205, + "exp2_b_sd": 81891.02036516219, + "exp3_a_sd": 0.4658106243069582, + "exp3_ac50": 1.958697487205632, + "exp3_b_sd": 18.96581826523416, + "exp3_p_sd": 0.15105220008228848, + "exp4_ac50": 0.8212128611446451, + "exp5_ac50": 0.9064524290417632, + "exp5_p_sd": 0.3968541905965276, + "gnls_ac50": 1.069640799028268, + "gnls_p_sd": null, + "gnls_q_sd": null, + "hill_ac50": 1.1931655056915569, + "hill_p_sd": 0.336413207545768, + "poly1_aic": 10.363619750133951, + "poly1_cov": 1, + "poly1_rme": 0.30437086562058074, + "poly1_top": 0.9685344872787416, + "poly2_aic": 12.36918759992754, + "poly2_cov": 1, + "poly2_rme": 0.30446137477875984, + "poly2_top": 0.9684434742298978, + "pow_er_sd": 0.2742600306262839, + "exp2_er_sd": 0.2620148827774744, + "exp3_er_sd": 0.4343364925218286, + "exp4_er_sd": 0.2798271608769556, + "exp4_ga_sd": 0.20046027515651813, + "exp4_tp_sd": 0.06900733105616962, + "exp5_er_sd": 0.25459801410553173, + "exp5_ga_sd": 0.9030803456678936, + "exp5_tp_sd": 0.30541269481243255, + "gnls_er_sd": null, + "gnls_ga_sd": null, + "gnls_la_sd": null, + "gnls_tp_sd": null, + "hill_er_sd": 0.2562497214754313, + "hill_ga_sd": 1.0745224730121576, + "hill_tp_sd": 0.2762986006515483, + "poly1_a_sd": 0.017687854702934096, + "poly1_ac50": 5, + "poly2_a_sd": 9236.54771190891, + "poly2_ac50": 5.003513821586468, + "poly2_b_sd": 95359.3802243155, + "poly1_er_sd": 0.2619800439124455, + "poly2_er_sd": 0.2620003562948773, + "pow_success": 1, + "cnst_success": 1, + "exp2_success": 1, + "exp3_success": 1, + "exp4_success": 1, + "exp5_success": 1, + "gnls_success": 1, + "hill_success": 1, + "poly1_success": 1, + "poly2_success": 1, + "gnls_ac50_loss": 362.6631259002045 + }, + "aeid": 891 +} diff --git a/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-spid/TP0001055F12.json b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-spid/TP0001055F12.json new file mode 100644 index 00000000..e4e6153e --- /dev/null +++ b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-spid/TP0001055F12.json @@ -0,0 +1,217 @@ +[ + { + "mc5Param": { + "a": -0.01306873535960684, + "er": -2.136507706280431, + "ac5": 0.5000000000000001, + "bmd": 18.769449457369436, + "bmr": 0.24529296780387735, + "mll": 5.563501374344404, + "top": -0.1306873535960684, + "ac10": 1.0000000000000002, + "ac20": 2.0000000000000004, + "ac50": 5, + "bmdl": 9.512878425240512, + "rmse": 0.1411355628562584, + "ac1sd": 13.913602266396914, + "caikwt": 0.5025458808263291, + "hitcall": 9.810625094754255E-8, + "top_over_cutoff": 0.2195696524130058 + }, + "mc6Param": { + "flag": [ + "Bmd > ac50, indication of high baseline variability" + ], + "mc6MthdId": [ + 9 + ] + }, + "m4id": 739695, + "spid": "TP0001055F12", + "chid": 20182, + "casn": "80-05-7", + "chnm": "Bisphenol A", + "dtxsid": "DTXSID7020182", + "bmad": 0.09919961779770327, + "respMax": 0.2791188509977269, + "respMin": -0.18810683333383918, + "maxMean": 0.16761193381969133, + "maxMeanConc": -0.3979400086720376, + "maxMed": 0.16761193381969133, + "maxMedConc": -0.3979400086720376, + "logcMax": 1.0, + "logcMin": -1.3979400086720375, + "nconc": 6, + "npts": 11, + "nrep": 2.0, + "nmedGtbl": 0, + "tmpi": 188, + "m5id": 5593410, + "modl": "poly1", + "hitc": 9.810625094754254E-8, + "fitc": 13, + "coff": 0.5951977067862196, + "actp": null, + "modelType": 2, + "chidRep": 0, + "stkc": 100.0, + "stkcUnit": "mM", + "testedConcUnit": "uM", + "mc3Param": { + "logc": [ + -0.3979400086720376, + -1, + -0.3979400086720376, + -1, + -1.3979400086720375, + 0.47712125471966244, + 1, + 0, + 1, + -1.3979400086720375, + 0 + ], + "resp": [ + 0.0561050166416558, + 0.0028243340365831197, + 0.2791188509977269, + 0.09964190007975987, + -0.05239317472308807, + 0.1364891493912145, + -0.13894349325403332, + 0.10576922249061912, + -0.18810683333383918, + -0.12643303248850363, + 0.226491395765047 + ] + }, + "mc4Param": { + "pow_a": -1.0419901452748115E-9, + "pow_p": 8.195719468765455, + "exp2_a": -0.000008020657993646346, + "exp2_b": 1.0081488305683002, + "exp3_a": -0.17851591559445268, + "exp3_b": 10.556549583626516, + "exp3_p": 7.9483694363768445, + "exp5_p": 7.999984090641454, + "gnls_p": 7.999999433512889, + "gnls_q": 7.999999868358701, + "hill_p": 7.9999898760762465, + "pow_er": -2.224154127442925, + "cnst_er": -2.0092627745700185, + "exp2_er": -2.225708040123303, + "exp3_er": -2.224425887819182, + "exp4_er": -2.1240364515371937, + "exp4_ga": 0.11792712500709591, + "exp4_tp": 0.08489455573191221, + "exp5_er": -2.171779858456515, + "exp5_ga": 0.09852824789221568, + "exp5_tp": 0.09435469694399896, + "gnls_er": -2.409215721065098, + "gnls_ga": 0.11073591633677296, + "gnls_la": 3.6159880073732737, + "gnls_tp": 0.16671079006471917, + "hill_er": -2.1720186051094537, + "hill_ga": 0.09803353623010123, + "hill_tp": 0.09440072781239386, + "poly1_a": -0.01306873535960684, + "poly2_a": -5.269417957001975E-7, + "poly2_b": 0.018313766631435816, + "pow_aic": -6.8326509459464635, + "pow_cov": 1, + "pow_rme": 0.13213200967852803, + "pow_top": -0.16352459431223682, + "all_bmed": 0, + "cnst_aic": -7.147369971314445, + "cnst_rme": 0.14940067883460073, + "exp2_aic": -6.828917132671787, + "exp2_cov": 1, + "exp2_rme": 0.13214949811009086, + "exp2_top": -0.1629406985095443, + "exp3_aic": -4.832659756139471, + "exp3_cov": 1, + "exp3_rme": 0.13213197509289465, + "exp3_top": -0.16350268198368967, + "exp4_aic": -4.925185522837284, + "exp4_cov": 1, + "exp4_rme": 0.14141900566048204, + "exp4_top": 0.08489455573191221, + "exp5_aic": -3.6320932952813663, + "exp5_cov": 1, + "exp5_rme": 0.13902699729526485, + "exp5_top": 0.09435469694399896, + "gnls_aic": -5.940065751343273, + "gnls_cov": 1, + "gnls_rme": 0.1001420603491322, + "gnls_top": 0.16671049681372982, + "hill_aic": -3.631378898610976, + "hill_cov": 1, + "hill_rme": 0.1390355254673785, + "hill_top": 0.09440072781239386, + "poly1_er": -2.136507706280431, + "poly2_er": -2.2060008475381583, + "pow_a_sd": 8.064774993426964E-7, + "pow_ac50": 9.189033846549512, + "pow_p_sd": 0.18522129164916593, + "all_onesd": 0.1818331859183672, + "exp2_a_sd": 0.0000050898964029098985, + "exp2_ac50": 9.301254102363394, + "exp2_b_sd": 0.056465976982944, + "exp3_a_sd": 3.979003442587248, + "exp3_ac50": 9.337383425640624, + "exp3_b_sd": 27.396607448018468, + "exp3_p_sd": 129.25839590180158, + "exp4_ac50": 0.11792712500709591, + "exp5_ac50": 0.09852824789221568, + "exp5_p_sd": 41.93495641250747, + "gnls_ac50": 0.11073586762173893, + "gnls_p_sd": 34.65357457194307, + "gnls_q_sd": 22.96654142812522, + "hill_ac50": 0.09803353623010123, + "hill_p_sd": 34.01111635735984, + "poly1_aic": -7.127002748688808, + "poly1_cov": 1, + "poly1_rme": 0.1411355628562584, + "poly1_top": -0.1306873535960684, + "poly2_aic": -6.451941535337074, + "poly2_cov": 1, + "poly2_rme": 0.13397873935532112, + "poly2_top": -0.15739898408828384, + "pow_er_sd": 0.2759427726798687, + "exp2_er_sd": 0.2757016914770977, + "exp3_er_sd": 0.275900255733028, + "exp4_er_sd": 0.27763409118817706, + "exp4_ga_sd": 0.15622033770694932, + "exp4_tp_sd": 0.061038452736276456, + "exp5_er_sd": 0.2828948492106326, + "exp5_ga_sd": 0.030890235852288596, + "exp5_tp_sd": 0.0576805352571672, + "gnls_er_sd": 0.2593751756378341, + "gnls_ga_sd": 0.05646638780675963, + "gnls_la_sd": 2.387358256194306, + "gnls_tp_sd": 0.05570893358002292, + "hill_er_sd": 0.2828774339235875, + "hill_ga_sd": 0.04329238363253893, + "hill_tp_sd": 0.05763006648910211, + "poly1_a_sd": 0.007769845359223608, + "poly1_ac50": 5, + "poly2_a_sd": 0.000001423027196013611, + "poly2_ac50": 7.068388784616721, + "poly2_b_sd": 0.004146833085610651, + "poly1_er_sd": 0.2737044785697688, + "poly2_er_sd": 0.27615424944167855, + "pow_success": 1, + "cnst_success": 1, + "exp2_success": 1, + "exp3_success": 1, + "exp4_success": 1, + "exp5_success": 1, + "gnls_success": 1, + "hill_success": 1, + "poly1_success": 1, + "poly2_success": 1, + "gnls_ac50_loss": 3.615989598330573 + }, + "aeid": 891 + } +] \ No newline at end of file diff --git a/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-spid/fakespid.json b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-spid/fakespid.json new file mode 100644 index 00000000..41b42e67 --- /dev/null +++ b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-spid/fakespid.json @@ -0,0 +1,3 @@ +[ + +] diff --git a/tests/testthat/test-tcplLoadData.R b/tests/testthat/test-tcplLoadData.R index d4b3d9a9..550e88de 100644 --- a/tests/testthat/test-tcplLoadData.R +++ b/tests/testthat/test-tcplLoadData.R @@ -639,4 +639,218 @@ test_that("missing val error message", { tcplLoadData(lvl = 5, type = "mc", fld = "aeid"), "'val' cannot be NULL check that a valid value was provided for the specified field" ) -}) \ No newline at end of file +}) + + +#------------------------------------------------------------------------------- +# Covers testing tcplLoadData with "API" driver +# Using httptest mocking to automatically save json responses from http requests +# NOTE -- updates to the CTX API may mean stored json files are out of date. In +# this case, delete the 'ctx' folder and rerun this ENTIRE test file (temporarily +# replacing the 'apikey' string with a valid key) to repopulate the stored +# .jsons. These will likely be huge and will need to be edited by hand to reduce +# their sizes. To do this, open the file(s) and remove all but one element of +# the outer array -- we don't need more than one endpoint-sample. When editing +# down the files, it is recommended to make sure the same aeid is present in each +# selected endpoint-sample, or assay for the saved assay.json response, to make +# sure every test has its necessary data still available. +#------------------------------------------------------------------------------- +httptest::with_mock_dir("ctx", { + apikey <- "apikey" + tcplConf(pass = apikey, + drvr = "API") + data(test_api) + test_that("level 3 API data loads by m4id", { + expect_no_error(dat <- tcplLoadData(lvl = 3, fld = "m4id", val = test_api$m4id, add.fld = FALSE)) + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 1) + expect_true(all(c("m4id", "spid", "conc", "aeid") %in% colnames(dat))) + expect_true(test_api$m4id %in% dat$m4id) + }) + test_that("level 3 API data loads by aeid", { + expect_no_error(dat <- tcplLoadData(lvl = 3, fld = "aeid", val = test_api$aeid, add.fld = FALSE)) + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 1) + expect_true(all(c("aeid", "spid", "conc") %in% colnames(dat))) + expect_true(test_api$aeid %in% dat$aeid) + }) + test_that("level 3 API data loads by dtxsid", { + expect_no_error(dat <- tcplLoadData(lvl = 3, fld = "dtxsid", val = test_api$dtxsid, add.fld = FALSE)) + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 1) + expect_true(all(c("dtxsid", "spid", "conc", "aeid") %in% colnames(dat))) + expect_true(test_api$dtxsid %in% dat$dtxsid) + }) + test_that("level 3 API data loads by spid", { + expect_no_error(dat <- tcplLoadData(lvl = 3, fld = "spid", val = test_api$spid, add.fld = FALSE)) + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 1) + expect_true(all(c("aeid", "spid", "conc") %in% colnames(dat))) + expect_true(test_api$spid %in% dat$spid) + }) + test_that("level 4 API data loads by m4id", { + expect_no_error(dat <- tcplLoadData(lvl = 4, fld = "m4id", val = test_api$m4id, add.fld = FALSE)) + expect_true(is.data.table(dat)) + expect_equal(nrow(dat), 1) + expect_true(all(c("m4id", "aeid", "bmad", "spid", "max_med", "nconc", "nrep") %in% colnames(dat))) + expect_true(test_api$m4id %in% dat$m4id) + }) + test_that("level 4 API data loads by aeid", { + expect_no_error(dat <- tcplLoadData(lvl = 4, fld = "aeid", val = test_api$aeid, add.fld = FALSE)) + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("m4id", "aeid", "spid", "bmad", "max_med", "nconc", "nrep") %in% colnames(dat))) + expect_true(test_api$aeid %in% dat$aeid) + }) + test_that("level 4 API data loads by dtxsid", { + expect_no_error(dat <- tcplLoadData(lvl = 4, fld = "dtxsid", val = test_api$dtxsid, add.fld = FALSE)) + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("dtxsid", "spid", "m4id", "aeid", "bmad", "max_med", "nconc", "nrep") %in% colnames(dat))) + expect_true(test_api$dtxsid %in% dat$dtxsid) + }) + test_that("level 4 API data loads by spid", { + expect_no_error(dat <- tcplLoadData(lvl = 4, fld = "spid", val = test_api$spid, add.fld = FALSE)) + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("spid", "m4id", "aeid", "bmad", "max_med", "nconc", "nrep") %in% colnames(dat))) + expect_true(test_api$spid %in% dat$spid) + }) + test_that("level 5 API data loads by m4id", { + expect_no_error(dat <- tcplLoadData(lvl = 5, fld = "m4id", val = test_api$m4id, add.fld = FALSE)) + expect_true(is.data.table(dat)) + expect_equal(nrow(dat), 1) + expect_true(all(c("m4id", "m5id", "aeid", "spid", "bmad", "max_med", "nconc", "nrep", "modl", "hitc", "coff", "model_type") %in% colnames(dat))) + expect_true(test_api$m4id %in% dat$m4id) + }) + test_that("level 5 API data loads by aeid", { + expect_no_error(dat <- tcplLoadData(lvl = 5, fld = "aeid", val = test_api$aeid, add.fld = FALSE)) + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("m4id", "m5id", "aeid", "spid", "bmad", "max_med", "nconc", "nrep", "modl", "hitc", "coff", "model_type") %in% colnames(dat))) + expect_true(test_api$aeid %in% dat$aeid) + }) + test_that("level 5 API data loads by dtxsid", { + expect_no_error(dat <- tcplLoadData(lvl = 5, fld = "dtxsid", val = test_api$dtxsid, add.fld = FALSE)) + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("dtxsid", "m4id", "m5id", "aeid", "spid", "bmad", "max_med", "nconc", "nrep", "modl", "hitc", "coff", "model_type") %in% colnames(dat))) + expect_true(test_api$dtxsid %in% dat$dtxsid) + }) + test_that("level 5 API data loads by spid", { + expect_no_error(dat <- tcplLoadData(lvl = 5, fld = "spid", val = test_api$spid, add.fld = FALSE)) + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("m4id", "m5id", "aeid", "spid", "bmad", "max_med", "nconc", "nrep", "modl", "hitc", "coff", "model_type") %in% colnames(dat))) + expect_true(test_api$spid %in% dat$spid) + }) + test_that("level 6 API data loads by m4id", { + expect_no_error(dat <- tcplLoadData(lvl = 6, fld = "m4id", val = test_api$m4id, add.fld = FALSE)) + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("m4id", "m5id", "aeid", "spid", "bmad", "max_med", "nconc", "nrep", "flag") %in% colnames(dat))) + expect_true(test_api$m4id %in% dat$m4id) + }) + test_that("level 6 API data loads by aeid", { + expect_no_error(dat <- tcplLoadData(lvl = 6, fld = "aeid", val = test_api$aeid, add.fld = FALSE)) + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("m4id", "m5id", "aeid", "spid", "bmad", "max_med", "nconc", "nrep", "flag") %in% colnames(dat))) + expect_true(test_api$aeid %in% dat$aeid) + }) + test_that("level 6 API data loads by dtxsid", { + expect_no_error(dat <- tcplLoadData(lvl = 6, fld = "dtxsid", val = test_api$dtxsid, add.fld = FALSE)) + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("dtxsid", "m4id", "m5id", "aeid", "spid", "bmad", "max_med", "nconc", "nrep", "flag") %in% colnames(dat))) + expect_true(test_api$dtxsid %in% dat$dtxsid) + }) + test_that("level 6 API data loads by spid", { + expect_no_error(dat <- tcplLoadData(lvl = 6, fld = "spid", val = test_api$spid, add.fld = FALSE)) + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("m4id", "m5id", "aeid", "spid", "bmad", "max_med", "nconc", "nrep", "flag") %in% colnames(dat))) + expect_true(test_api$spid %in% dat$spid) + }) + test_that("agg level API data loads by m4id", { + expect_no_error(dat <- tcplLoadData(lvl = "agg", fld = "m4id", val = test_api$m4id, add.fld = FALSE)) + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 1) + expect_true(all(c("m4id", "aeid", "spid", "bmad", "logc", "resp", "max_med", "nconc", "nrep") %in% colnames(dat))) + expect_true(test_api$m4id %in% dat$m4id) + }) + test_that("agg level API data loads by aeid", { + expect_no_error(dat <- tcplLoadData(lvl = "agg", fld = "aeid", val = test_api$aeid, add.fld = FALSE)) + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 1) + expect_true(all(c("m4id", "aeid", "spid", "bmad", "logc", "resp", "max_med", "nconc", "nrep") %in% colnames(dat))) + expect_true(test_api$aeid %in% dat$aeid) + }) + test_that("agg level API data loads by dtxsid", { + expect_no_error(dat <- tcplLoadData(lvl = "agg", fld = "dtxsid", val = test_api$dtxsid, add.fld = FALSE)) + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 1) + expect_true(all(c("dtxsid", "m4id", "aeid", "spid", "bmad", "logc", "resp", "max_med", "nconc", "nrep") %in% colnames(dat))) + expect_true(test_api$dtxsid %in% dat$dtxsid) + }) + test_that("agg level API data loads by spid", { + expect_no_error(dat <- tcplLoadData(lvl = "agg", fld = "spid", val = test_api$spid, add.fld = FALSE)) + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 1) + expect_true(all(c("m4id", "aeid", "spid", "bmad", "logc", "resp", "max_med", "nconc", "nrep") %in% colnames(dat))) + expect_true(test_api$spid %in% dat$spid) + }) + # error cases + test_that("more than one field results in error", { + expect_error(tcplLoadData(lvl = 5, fld = c("aeid", "spid"), val = list(test_api$aeid, test_api$spid), add.fld = FALSE), + "'fld' must be length 1") + }) + test_that("fields outside of dtxsid, aeid, m4id, spid result in error", { + expect_error(tcplLoadData(lvl = 3, fld = "acid", val = test_api$acid, add.fld = FALSE), + "'fld' must be one of 'AEID', 'SPID', 'm4id', or 'DTXSID'") + }) + test_that("levels other than 3-6 and 'agg' result in error", { + expect_error(tcplLoadData(lvl = 2, fld = "aeid", val = test_api$aeid, add.fld = FALSE), + "Only lvl = c(3,4,5,6) and 'agg' are supported using API data as source.", fixed = TRUE) + }) + test_that("type = 'sc' result in error", { + expect_error(tcplLoadData(type = "sc", lvl = 2, fld = "aeid", val = test_api$aeid, add.fld = FALSE), + "Only type = 'mc' is supported using API data as source.") + }) + test_that("data not found results in null data.table", { + expect_warning(dat <- tcplLoadData(lvl = 5, fld = "aeid", val = 0, add.fld = FALSE), + "Data not found for the following 'fld' and 'val' combos: +AEID: 0", fixed = TRUE) + expect_equal(nrow(dat), 0) + expect_warning(dat <- tcplLoadData(lvl = 5, fld = "spid", val = "fakespid", add.fld = FALSE), + "Data not found for the following 'fld' and 'val' combos: +SPID: fakespid", fixed = TRUE) + expect_equal(nrow(dat), 0) + expect_warning(dat <- tcplLoadData(lvl = 5, fld = "dtxsid", val = "fakedtxsid", add.fld = FALSE), + "Data not found for the following 'fld' and 'val' combos: +DTXSID: fakedtxsid", fixed = TRUE) + expect_equal(nrow(dat), 0) + expect_warning(dat <- tcplLoadData(lvl = 5, fld = "m4id", val = 0, add.fld = FALSE), + "Data not found for the following 'fld' and 'val' combos: +m4id: 0", fixed = TRUE) + expect_equal(nrow(dat), 0) + }) + test_that("some data not found results in warning", { + expect_warning(dat <- tcplLoadData(lvl = 5, fld = "aeid", val = c(0, test_api$aeid), add.fld = FALSE), + "Data not found for the following 'fld' and 'val' combos: +AEID: 0", fixed = TRUE) + expect_true(nrow(dat) > 0) + expect_warning(dat <- tcplLoadData(lvl = 5, fld = "spid", val = c("fakespid", test_api$spid), add.fld = FALSE), + "Data not found for the following 'fld' and 'val' combos: +SPID: fakespid", fixed = TRUE) + expect_true(nrow(dat) > 0) + expect_warning(dat <- tcplLoadData(lvl = 5, fld = "dtxsid", val = c("fakedtxsid", test_api$dtxsid), add.fld = FALSE), + "Data not found for the following 'fld' and 'val' combos: +DTXSID: fakedtxsid", fixed = TRUE) + expect_true(nrow(dat) > 0) + expect_warning(dat <- tcplLoadData(lvl = 5, fld = "m4id", val = c(0, test_api$m4id), add.fld = FALSE), + "Data not found for the following 'fld' and 'val' combos: +m4id: 0", fixed = TRUE) + expect_true(nrow(dat) > 0) + }) +}) diff --git a/tests/testthat/test-tcplPlot.R b/tests/testthat/test-tcplPlot.R index 986c3fcb..1f67e885 100644 --- a/tests/testthat/test-tcplPlot.R +++ b/tests/testthat/test-tcplPlot.R @@ -663,4 +663,116 @@ test_that("tcplPlot works for multiple spid/aeid compared", { fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") expect_length(fn, 1) # exactly one file created file.remove(fn) # clean up +}) + +# Stand-alone plotting +test_that("standalone plotting works in mc", { + data("mc_test") + mocked <- mc_test$plot_single_m4id + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") mc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + dat <- tcplPlotLoadData(val = mocked$m4id, flags = TRUE) + expect_no_error(suppressWarnings(tcplPlot(dat = dat, type = "mc", fld = "m4id", val = mocked$m4id, output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up +}) + +test_that("standalone advanced comparison plotting works in mc", { + data("mc_test") + mocked <- mc_test$plot_single_m4id_compare + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") mc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + dat <- tcplPlotLoadData(val = mocked$m4id, flags = TRUE) + expect_no_error(suppressWarnings(tcplPlot(dat = dat, type = "mc", fld = "m4id", val = mocked$m4id, compare.val = mocked$compare.m4id , output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up +}) + +test_that("standalone plotting works in sc", { + data("sc_test") + mocked <- sc_test$plot_single_s2id + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") sc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + dat <- tcplPlotLoadData(type = "sc", fld = "s2id", val = mocked$s2id) + expect_no_error(suppressWarnings(tcplPlot(dat = dat, type = "sc", fld = "s2id", val = mocked$s2id, output = "pdf", verbose = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up +}) + +test_that("standalone advanced comparison plotting works in sc", { + data("sc_test") + mocked <- sc_test$plot_single_s2id_compare + local_mocked_bindings( + tcplQuery = function(query, db, tbl) { + if (query == "SHOW VARIABLES LIKE 'max_allowed_packet'") sc_test$tcplConfQuery + else mocked[query][[1]] + } + ) + tcplConf(drvr = "MySQL", db = "invitrodb") # must include both + dat <- tcplPlotLoadData(type = "sc", fld = "s2id", val = mocked$s2id) + expect_no_error(suppressWarnings(tcplPlot(dat = dat, type = "sc", fld = "s2id", val = mocked$s2id, compare.val = mocked$compare.s2id , output = "pdf", verbose = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up +}) + + + +#------------------------------------------------------------------------------- +# Covers testing tcplLoadData with "API" driver +# Using httptest mocking to automatically save json responses from http requests +# NOTE -- updates to the CTX API may mean stored json files are out of date. In +# this case, delete the 'ctx' folder and rerun this ENTIRE test file (temporarily +# replacing the 'apikey' string with a valid key) to repopulate the stored +# .jsons. These will likely be huge and will need to be edited by hand to reduce +# their sizes. To do this, open the file(s) and remove all but one element of +# the outer array -- we don't need more than one endpoint-sample. +#------------------------------------------------------------------------------- +httptest::with_mock_dir("ctx", { + apikey <- "apikey" + tcplConf(pass = apikey, + drvr = "API") + data(test_api) + test_that("tcplPlot works with API data by m4id", { + expect_no_error(suppressWarnings(tcplPlot(val = test_api$m4id, output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up + }) + test_that("tcplPlot works with API data by aeid", { + expect_no_error(suppressWarnings(tcplPlot(fld = "aeid", val = test_api$aeid, output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up + }) + test_that("tcplPlot works with API data by spid", { + expect_no_error(suppressWarnings(tcplPlot(fld = "spid", val = test_api$spid, output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up + }) + test_that("tcplPlot works with API data by dtxsid", { + expect_no_error(suppressWarnings(tcplPlot(fld = "dtxsid", val = test_api$dtxsid, output = "pdf", verbose = TRUE, flags = TRUE, multi = TRUE, fileprefix = "temp_tcplPlot"))) + fn <- stringr::str_subset(list.files(), "^temp_tcplPlot") + expect_length(fn, 1) # exactly one file created + file.remove(fn) # clean up + }) }) \ No newline at end of file From bfce217686b5e6b721772cf59602217453661946 Mon Sep 17 00:00:00 2001 From: Carter Thunes Date: Tue, 13 Aug 2024 18:29:34 -0400 Subject: [PATCH 26/32] fix related bugs in load functions when ctxR returns null data.table --- R/tcplLoadChem.R | 3 +++ R/tcplLoadConcUnit.R | 6 ++++-- R/tcplLoadData.R | 22 ++++++++++++---------- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/R/tcplLoadChem.R b/R/tcplLoadChem.R index 80e1f525..7b50a7ab 100644 --- a/R/tcplLoadChem.R +++ b/R/tcplLoadChem.R @@ -59,6 +59,9 @@ tcplLoadChem <- function(field = NULL, val = NULL, exact = TRUE, if (tolower(field) != "spid") stop("When drvr option is set to 'API', only 'spid' is a valid 'field' value.") if (!exact) exact <- TRUE dat <- tcplQueryAPI(resource = "data", fld = "spid", val = val, return_flds = c("spid", "chid", "casn", "chnm", "dsstox_substance_id")) + if (!length(colnames(dat))) { + return(dat) + } setorder(dat, "spid") } else { tbl <- c("chemical", "sample") diff --git a/R/tcplLoadConcUnit.R b/R/tcplLoadConcUnit.R index 31dd8c23..b8d7f155 100644 --- a/R/tcplLoadConcUnit.R +++ b/R/tcplLoadConcUnit.R @@ -21,8 +21,10 @@ tcplLoadConcUnit <- function(spid) { if (getOption("TCPL_DRVR") == "API") { dat <- tcplQueryAPI(resource = "data", fld = "spid", val = spid, return_flds = c("spid", "tested_conc_unit")) - setnames(dat, "tested_conc_unit", "conc_unit") - setorder(dat, "spid") + if (length(colnames(dat))) { + setnames(dat, "tested_conc_unit", "conc_unit") + setorder(dat, "spid") + } return(unique(dat, by = c("spid", "conc_unit"))) } diff --git a/R/tcplLoadData.R b/R/tcplLoadData.R index a838936d..c510cb57 100644 --- a/R/tcplLoadData.R +++ b/R/tcplLoadData.R @@ -213,16 +213,18 @@ tcplLoadData <- function(lvl, fld = NULL, val = NULL, type = "mc", add.fld = TRU # query the API dat <- tcplQueryAPI(fld = fld, val = val, return_flds = cols) - if (lvl == 3 | lvl == "agg") { - dat$resp <- lapply(dat$resp, unlist) - dat$logc <- lapply(dat$logc, unlist) - if (lvl == 3) dat <- unnest_longer(dat, c(conc, logc, resp)) %>% as.data.table() - else dat <- unnest_longer(dat, c(logc, resp)) %>% as.data.table() - } - - if (lvl == 6) { - dat$flag <- lapply(dat$flag, unlist) - dat <- unnest_longer(dat, flag) %>% filter(flag != "NULL") %>% as.data.table() + if (length(colnames(dat))) { + if (lvl == 3 | lvl == "agg") { + dat$resp <- lapply(dat$resp, unlist) + dat$logc <- lapply(dat$logc, unlist) + if (lvl == 3) dat <- unnest_longer(dat, c(conc, logc, resp)) %>% as.data.table() + else dat <- unnest_longer(dat, c(logc, resp)) %>% as.data.table() + } + + if (lvl == 6) { + dat$flag <- lapply(dat$flag, unlist) + dat <- unnest_longer(dat, flag) %>% filter(flag != "NULL") %>% as.data.table() + } } return(dat) From f0f1502d845914424d6d7259044cf08e7984b535 Mon Sep 17 00:00:00 2001 From: Carter Thunes Date: Tue, 13 Aug 2024 18:30:48 -0400 Subject: [PATCH 27/32] update data/test_api.rda and -raw/ script to include aid and asid --- data-raw/test_api.R | 4 ++++ data/test_api.rda | Bin 171 -> 171 bytes 2 files changed, 4 insertions(+) diff --git a/data-raw/test_api.R b/data-raw/test_api.R index f211b2b0..db16336b 100644 --- a/data-raw/test_api.R +++ b/data-raw/test_api.R @@ -28,6 +28,8 @@ tcplConf(pass = apikey, assays <- get_all_assays(Server = paste0(getOption("TCPL_HOST"))) aeid <- assays[sample(1:nrow(assays), 1),]$aeid acid <- tcplLoadAcid(fld = "aeid", val = aeid)$acid +aid <- tcplLoadAid(fld = "aeid", val = aeid)$aid +asid <- tcplLoadAsid(fld = "aeid", val = aeid)$asid dat <- tcplLoadData(lvl = 5, fld = "aeid", val = aeid) sample <- dat[sample(1:nrow(dat), 1),] @@ -35,6 +37,8 @@ sample <- dat[sample(1:nrow(dat), 1),] test_api <- list( aeid = aeid, acid = acid, + aid = aid, + asid = asid, dtxsid = sample$dtxsid, spid = sample$spid, m4id = sample$m4id diff --git a/data/test_api.rda b/data/test_api.rda index b8de308a4c5f6b0d0b8615a8474e7eb8fbcc49cf..06fd1302d76d85f5b6dc56a3b078fa0ddad96c25 100644 GIT binary patch literal 171 zcmV;c095}%T4*^jL0KkKS-Rk3Qvd*SZ;Jo&NB~se1Rxwht|Lr9KmrH=00AHXk`&WP zpfm=6)6!@S0U}C0A+-Q#0MY6JXiAO6DPv167%^AnbKN_f@BN_$N2akauqbE(WvxlI zBU=SxLrP6015#u$AisnNz$?uGQo9045J=|i`_}p0x&jO{%aQ1gevyoj!^kN-8exHe ZUawN2iJVdO&E(&Uxgwk>NL_F-semLSMW6rx literal 171 zcmV;c095}%T4*^jL0KkKS&)c`RR92D@6!K&NC0-gMIc;2t|Lrf00;;G06+i%AOMmP zOqyr_001&+qeg&|6pb<%KmY&+jTT!WQB6e?UMLFXaLCrv7I*zH7`-}4Nh=uHlvc?X zP(y$?${o-%2_2_&p`_=ixw~X?XW=_47N#sfd^ajMtnlv!f-39}I#x^qM^kI_v6*l< ZaS)!gHdcrI3;sxcF64@Ep&=m=5UP!IKP&(M From 6ff9bd5c89642d7f493b9008b939718ecc56e9ed Mon Sep 17 00:00:00 2001 From: Carter Thunes Date: Tue, 13 Aug 2024 18:32:06 -0400 Subject: [PATCH 28/32] updated error case section of test-tcplLoadData to test each level --- tests/testthat/test-tcplLoadData.R | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/testthat/test-tcplLoadData.R b/tests/testthat/test-tcplLoadData.R index 550e88de..6565e3d0 100644 --- a/tests/testthat/test-tcplLoadData.R +++ b/tests/testthat/test-tcplLoadData.R @@ -818,11 +818,11 @@ httptest::with_mock_dir("ctx", { "Only type = 'mc' is supported using API data as source.") }) test_that("data not found results in null data.table", { - expect_warning(dat <- tcplLoadData(lvl = 5, fld = "aeid", val = 0, add.fld = FALSE), + expect_warning(dat <- tcplLoadData(lvl = 3, fld = "aeid", val = 0, add.fld = FALSE), "Data not found for the following 'fld' and 'val' combos: AEID: 0", fixed = TRUE) expect_equal(nrow(dat), 0) - expect_warning(dat <- tcplLoadData(lvl = 5, fld = "spid", val = "fakespid", add.fld = FALSE), + expect_warning(dat <- tcplLoadData(lvl = 4, fld = "spid", val = "fakespid", add.fld = FALSE), "Data not found for the following 'fld' and 'val' combos: SPID: fakespid", fixed = TRUE) expect_equal(nrow(dat), 0) @@ -830,17 +830,17 @@ SPID: fakespid", fixed = TRUE) "Data not found for the following 'fld' and 'val' combos: DTXSID: fakedtxsid", fixed = TRUE) expect_equal(nrow(dat), 0) - expect_warning(dat <- tcplLoadData(lvl = 5, fld = "m4id", val = 0, add.fld = FALSE), + expect_warning(dat <- tcplLoadData(lvl = 6, fld = "m4id", val = 0, add.fld = FALSE), "Data not found for the following 'fld' and 'val' combos: m4id: 0", fixed = TRUE) expect_equal(nrow(dat), 0) }) test_that("some data not found results in warning", { - expect_warning(dat <- tcplLoadData(lvl = 5, fld = "aeid", val = c(0, test_api$aeid), add.fld = FALSE), + expect_warning(dat <- tcplLoadData(lvl = 3, fld = "aeid", val = c(0, test_api$aeid), add.fld = FALSE), "Data not found for the following 'fld' and 'val' combos: AEID: 0", fixed = TRUE) expect_true(nrow(dat) > 0) - expect_warning(dat <- tcplLoadData(lvl = 5, fld = "spid", val = c("fakespid", test_api$spid), add.fld = FALSE), + expect_warning(dat <- tcplLoadData(lvl = 4, fld = "spid", val = c("fakespid", test_api$spid), add.fld = FALSE), "Data not found for the following 'fld' and 'val' combos: SPID: fakespid", fixed = TRUE) expect_true(nrow(dat) > 0) @@ -848,7 +848,7 @@ SPID: fakespid", fixed = TRUE) "Data not found for the following 'fld' and 'val' combos: DTXSID: fakedtxsid", fixed = TRUE) expect_true(nrow(dat) > 0) - expect_warning(dat <- tcplLoadData(lvl = 5, fld = "m4id", val = c(0, test_api$m4id), add.fld = FALSE), + expect_warning(dat <- tcplLoadData(lvl = 6, fld = "m4id", val = c(0, test_api$m4id), add.fld = FALSE), "Data not found for the following 'fld' and 'val' combos: m4id: 0", fixed = TRUE) expect_true(nrow(dat) > 0) From ec4682d8a346e4bc73b45c2dad402030e230d228 Mon Sep 17 00:00:00 2001 From: Carter Thunes Date: Tue, 13 Aug 2024 18:33:17 -0400 Subject: [PATCH 29/32] add test files for each of auxiliary load functions, for 'API' driver --- tests/testthat/test-tcplLoadAcid.R | 37 ++++++++++++++++++++++++++ tests/testthat/test-tcplLoadAeid.R | 37 ++++++++++++++++++++++++++ tests/testthat/test-tcplLoadAid.R | 37 ++++++++++++++++++++++++++ tests/testthat/test-tcplLoadAsid.R | 37 ++++++++++++++++++++++++++ tests/testthat/test-tcplLoadChem.R | 37 ++++++++++++++++++++++++++ tests/testthat/test-tcplLoadConcUnit.R | 26 ++++++++++++++++++ tests/testthat/test-tcplLoadUnit.R | 25 +++++++++++++++++ 7 files changed, 236 insertions(+) create mode 100644 tests/testthat/test-tcplLoadAcid.R create mode 100644 tests/testthat/test-tcplLoadAeid.R create mode 100644 tests/testthat/test-tcplLoadAid.R create mode 100644 tests/testthat/test-tcplLoadAsid.R create mode 100644 tests/testthat/test-tcplLoadChem.R create mode 100644 tests/testthat/test-tcplLoadConcUnit.R create mode 100644 tests/testthat/test-tcplLoadUnit.R diff --git a/tests/testthat/test-tcplLoadAcid.R b/tests/testthat/test-tcplLoadAcid.R new file mode 100644 index 00000000..254a6a8f --- /dev/null +++ b/tests/testthat/test-tcplLoadAcid.R @@ -0,0 +1,37 @@ +#------------------------------------------------------------------------------- +# Covers testing tcplLoadAcid with "API" driver +# Using httptest mocking to automatically save json responses from http requests +# NOTE -- updates to the CTX API may mean stored json files are out of date. In +# this case, delete the 'ctx' folder and follow the instructions in the test- +# tcplLoadData test file. +#------------------------------------------------------------------------------- +httptest::with_mock_dir("ctx", { + apikey <- "apikey" + tcplConf(pass = apikey, + drvr = "API") + data(test_api) + assays <- tcplQueryAPI(resource = "assay") + test_that("tcplLoadAcid works by aeid", { + expect_no_error(dat <- tcplLoadAcid(fld = "aeid", val = test_api$aeid)) + expect_true(is.data.table(dat)) + expect_equal(nrow(dat), 1) + expect_true(all(c("aeid", "acid", "acnm") %in% colnames(dat))) + expect_equal(dat$acid, test_api$acid) + }) + test_that("tcplLoadAcid works by non-id", { + expect_no_error(dat <- tcplLoadAcid(fld = c("intended_target_type", "detection_technology_type"), val = list(assays$intended_target_type[1], assays$detection_technology_type[1]))) + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("intended_target_type", "detection_technology_type", "acid", "acnm") %in% colnames(dat))) + expect_equal(unique(dat$intended_target_type), assays$intended_target_type[1]) + expect_equal(unique(dat$detection_technology_type), assays$detection_technology_type[1]) + }) + #error cases + test_that("data not found results in null data.table", { + expect_no_error(dat <- tcplLoadAcid(fld = "aeid", val = 0)) + expect_equal(nrow(dat), 0) + }) + test_that("invalid field results in error", { + expect_error(dat <- tcplLoadAcid(fld = "awid", val = 0), "Query field\\(s\\) 'awid' not available. Try using from the following:*") + }) +}) \ No newline at end of file diff --git a/tests/testthat/test-tcplLoadAeid.R b/tests/testthat/test-tcplLoadAeid.R new file mode 100644 index 00000000..1a4e0573 --- /dev/null +++ b/tests/testthat/test-tcplLoadAeid.R @@ -0,0 +1,37 @@ +#------------------------------------------------------------------------------- +# Covers testing tcplLoadAeid with "API" driver +# Using httptest mocking to automatically save json responses from http requests +# NOTE -- updates to the CTX API may mean stored json files are out of date. In +# this case, delete the 'ctx' folder and follow the instructions in the test- +# tcplLoadData test file. +#------------------------------------------------------------------------------- +httptest::with_mock_dir("ctx", { + apikey <- "apikey" + tcplConf(pass = apikey, + drvr = "API") + data(test_api) + assays <- tcplQueryAPI(resource = "assay") + test_that("tcplLoadAeid works by acid", { + expect_no_error(dat <- tcplLoadAeid(fld = "acid", val = test_api$acid)) + expect_true(is.data.table(dat)) + expect_equal(nrow(dat), 1) + expect_true(all(c("acid", "aeid", "aenm") %in% colnames(dat))) + expect_equal(dat$aeid, test_api$aeid) + }) + test_that("tcplLoadAeid works by non-id", { + expect_no_error(dat <- tcplLoadAeid(fld = c("intended_target_type", "detection_technology_type"), val = list(assays$intended_target_type[1], assays$detection_technology_type[1]))) + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("intended_target_type", "detection_technology_type", "aeid", "aenm") %in% colnames(dat))) + expect_equal(unique(dat$intended_target_type), assays$intended_target_type[1]) + expect_equal(unique(dat$detection_technology_type), assays$detection_technology_type[1]) + }) + #error cases + test_that("data not found results in null data.table", { + expect_no_error(dat <- tcplLoadAeid(fld = "acid", val = 0)) + expect_equal(nrow(dat), 0) + }) + test_that("invalid field results in error", { + expect_error(dat <- tcplLoadAeid(fld = "awid", val = 0), "Query field\\(s\\) 'awid' not available. Try using from the following:*") + }) +}) \ No newline at end of file diff --git a/tests/testthat/test-tcplLoadAid.R b/tests/testthat/test-tcplLoadAid.R new file mode 100644 index 00000000..49006709 --- /dev/null +++ b/tests/testthat/test-tcplLoadAid.R @@ -0,0 +1,37 @@ +#------------------------------------------------------------------------------- +# Covers testing tcplLoadAid with "API" driver +# Using httptest mocking to automatically save json responses from http requests +# NOTE -- updates to the CTX API may mean stored json files are out of date. In +# this case, delete the 'ctx' folder and follow the instructions in the test- +# tcplLoadData test file. +#------------------------------------------------------------------------------- +httptest::with_mock_dir("ctx", { + apikey <- "apikey" + tcplConf(pass = apikey, + drvr = "API") + data(test_api) + assays <- tcplQueryAPI(resource = "assay") + test_that("tcplLoadAid works by aeid", { + expect_no_error(dat <- tcplLoadAid(fld = "aeid", val = test_api$aeid)) + expect_true(is.data.table(dat)) + expect_equal(nrow(dat), 1) + expect_true(all(c("aeid", "aid", "anm") %in% colnames(dat))) + expect_equal(dat$aid, test_api$aid) + }) + test_that("tcplLoadAid works by non-id", { + expect_no_error(dat <- tcplLoadAid(fld = c("intended_target_type", "detection_technology_type"), val = list(assays$intended_target_type[1], assays$detection_technology_type[1]))) + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("intended_target_type", "detection_technology_type", "aid", "anm") %in% colnames(dat))) + expect_equal(unique(dat$intended_target_type), assays$intended_target_type[1]) + expect_equal(unique(dat$detection_technology_type), assays$detection_technology_type[1]) + }) + #error cases + test_that("data not found results in null data.table", { + expect_no_error(dat <- tcplLoadAid(fld = "aeid", val = 0)) + expect_equal(nrow(dat), 0) + }) + test_that("invalid field results in error", { + expect_error(dat <- tcplLoadAid(fld = "awid", val = 0), "Query field\\(s\\) 'awid' not available. Try using from the following:*") + }) +}) \ No newline at end of file diff --git a/tests/testthat/test-tcplLoadAsid.R b/tests/testthat/test-tcplLoadAsid.R new file mode 100644 index 00000000..4312dc16 --- /dev/null +++ b/tests/testthat/test-tcplLoadAsid.R @@ -0,0 +1,37 @@ +#------------------------------------------------------------------------------- +# Covers testing tcplLoadAsid with "API" driver +# Using httptest mocking to automatically save json responses from http requests +# NOTE -- updates to the CTX API may mean stored json files are out of date. In +# this case, delete the 'ctx' folder and follow the instructions in the test- +# tcplLoadData test file. +#------------------------------------------------------------------------------- +httptest::with_mock_dir("ctx", { + apikey <- "apikey" + tcplConf(pass = apikey, + drvr = "API") + data(test_api) + assays <- tcplQueryAPI(resource = "assay") + test_that("tcplLoadAsid works by aeid", { + expect_no_error(dat <- tcplLoadAsid(fld = "aeid", val = test_api$aeid)) + expect_true(is.data.table(dat)) + expect_equal(nrow(dat), 1) + expect_true(all(c("aeid", "asid", "asnm") %in% colnames(dat))) + expect_equal(dat$asid, test_api$asid) + }) + test_that("tcplLoadAsid works by non-id", { + expect_no_error(dat <- tcplLoadAsid(fld = c("intended_target_type", "detection_technology_type"), val = list(assays$intended_target_type[1], assays$detection_technology_type[1]))) + expect_true(is.data.table(dat)) + expect_true(nrow(dat) > 0) + expect_true(all(c("intended_target_type", "detection_technology_type", "asid", "asnm") %in% colnames(dat))) + expect_equal(unique(dat$intended_target_type), assays$intended_target_type[1]) + expect_equal(unique(dat$detection_technology_type), assays$detection_technology_type[1]) + }) + #error cases + test_that("data not found results in null data.table", { + expect_no_error(dat <- tcplLoadAsid(fld = "aeid", val = 0)) + expect_equal(nrow(dat), 0) + }) + test_that("invalid field results in error", { + expect_error(dat <- tcplLoadAsid(fld = "awid", val = 0), "Query field\\(s\\) 'awid' not available. Try using from the following:*") + }) +}) \ No newline at end of file diff --git a/tests/testthat/test-tcplLoadChem.R b/tests/testthat/test-tcplLoadChem.R new file mode 100644 index 00000000..fa2c9e10 --- /dev/null +++ b/tests/testthat/test-tcplLoadChem.R @@ -0,0 +1,37 @@ +#------------------------------------------------------------------------------- +# Covers testing tcplLoadChem with "API" driver +# Using httptest mocking to automatically save json responses from http requests +# NOTE -- updates to the CTX API may mean stored json files are out of date. In +# this case, delete the 'ctx' folder and follow the instructions in the test- +# tcplLoadData test file. +#------------------------------------------------------------------------------- +httptest::with_mock_dir("ctx", { + apikey <- "apikey" + tcplConf(pass = apikey, + drvr = "API") + data(test_api) + assays <- tcplQueryAPI(resource = "assay") + test_that("tcplLoadChem works by spid", { + expect_no_error(dat <- tcplLoadChem(field = "spid", val = test_api$spid)) + expect_true(is.data.table(dat)) + expect_equal(nrow(dat), 1) + expect_true(all(c("spid", "chid", "casn", "chnm", "dsstox_substance_id", "code") %in% colnames(dat))) + expect_equal(dat$spid, test_api$spid) + }) + test_that("exact is silently changed to TRUE if driver is API", { + expect_no_error(dat <- tcplLoadChem(field = "spid", val = test_api$spid, exact = FALSE)) + expect_true(is.data.table(dat)) + expect_equal(nrow(dat), 1) + expect_true(all(c("spid", "chid", "casn", "chnm", "dsstox_substance_id", "code") %in% colnames(dat))) + expect_equal(dat$spid, test_api$spid) + }) + #error cases + test_that("field can only be spid if driver is API", { + expect_error(tcplLoadChem(field = "chnm", val = "fakechnm"), "When drvr option is set to 'API', only 'spid' is a valid 'field' value.") + }) + test_that("data not found results in null data.table", { + expect_warning(dat <- tcplLoadChem(field = "spid", val = "fakespid"), "Data not found for the following 'fld' and 'val' combos: +SPID: fakespid") + expect_equal(nrow(dat), 0) + }) +}) \ No newline at end of file diff --git a/tests/testthat/test-tcplLoadConcUnit.R b/tests/testthat/test-tcplLoadConcUnit.R new file mode 100644 index 00000000..404edb82 --- /dev/null +++ b/tests/testthat/test-tcplLoadConcUnit.R @@ -0,0 +1,26 @@ +#------------------------------------------------------------------------------- +# Covers testing tcplLoadConcUnit with "API" driver +# Using httptest mocking to automatically save json responses from http requests +# NOTE -- updates to the CTX API may mean stored json files are out of date. In +# this case, delete the 'ctx' folder and follow the instructions in the test- +# tcplLoadData test file. +#------------------------------------------------------------------------------- +httptest::with_mock_dir("ctx", { + apikey <- "apikey" + tcplConf(pass = apikey, + drvr = "API") + data(test_api) + test_that("tcplLoadConcUnit works by spid", { + expect_no_error(dat <- tcplLoadConcUnit(spid = test_api$spid)) + expect_true(is.data.table(dat)) + expect_equal(nrow(dat), 1) + expect_true(all(c("spid", "conc_unit") %in% colnames(dat))) + expect_equal(dat$spid, test_api$spid) + }) + #error cases + test_that("data not found results in null data.table", { + expect_warning(dat <- tcplLoadConcUnit(spid = "fakespid"), "Data not found for the following 'fld' and 'val' combos: +SPID: fakespid") + expect_equal(nrow(dat), 0) + }) +}) \ No newline at end of file diff --git a/tests/testthat/test-tcplLoadUnit.R b/tests/testthat/test-tcplLoadUnit.R new file mode 100644 index 00000000..1ea7f402 --- /dev/null +++ b/tests/testthat/test-tcplLoadUnit.R @@ -0,0 +1,25 @@ +#------------------------------------------------------------------------------- +# Covers testing tcplLoadUnit with "API" driver +# Using httptest mocking to automatically save json responses from http requests +# NOTE -- updates to the CTX API may mean stored json files are out of date. In +# this case, delete the 'ctx' folder and follow the instructions in the test- +# tcplLoadData test file. +#------------------------------------------------------------------------------- +httptest::with_mock_dir("ctx", { + apikey <- "apikey" + tcplConf(pass = apikey, + drvr = "API") + data(test_api) + test_that("tcplLoadUnit works by aeid", { + expect_no_error(dat <- tcplLoadUnit(aeid = test_api$aeid)) + expect_true(is.data.table(dat)) + expect_equal(nrow(dat), 1) + expect_true(all(c("aeid", "resp_unit") %in% colnames(dat))) + expect_equal(dat$aeid, test_api$aeid) + }) + #error cases + test_that("data not found results in null data.table", { + expect_no_error(dat <- tcplLoadUnit(aeid = 0)) + expect_equal(nrow(dat), 0) + }) +}) \ No newline at end of file From d8d84fa42ead8e31a6f0003f0699773292e3d11f Mon Sep 17 00:00:00 2001 From: Carter Thunes Date: Tue, 13 Aug 2024 18:34:45 -0400 Subject: [PATCH 30/32] updated mocked data with new test_api ids; again shortened the jsons --- .../api-ccte.epa.gov/bioactivity/assay.json | 268 ++++++++----- .../bioactivity/data/search/by-aeid/1390.json | 372 ++++++++++++++++++ .../bioactivity/data/search/by-aeid/891.json | 214 ---------- .../data/search/by-dtxsid/DTXSID7020182.json | 204 ---------- .../data/search/by-dtxsid/DTXSID7024827.json | 217 ++++++++++ .../data/search/by-m4id/742051.json | 219 ----------- .../data/search/by-m4id/906160.json | 215 ++++++++++ .../data/search/by-spid/TP0001055F12.json | 217 ---------- .../data/search/by-spid/TX007998.json | 217 ++++++++++ 9 files changed, 1191 insertions(+), 952 deletions(-) create mode 100644 tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-aeid/1390.json delete mode 100644 tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-aeid/891.json delete mode 100644 tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-dtxsid/DTXSID7020182.json create mode 100644 tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-dtxsid/DTXSID7024827.json delete mode 100644 tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-m4id/742051.json create mode 100644 tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-m4id/906160.json delete mode 100644 tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-spid/TP0001055F12.json create mode 100644 tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-spid/TX007998.json diff --git a/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/assay.json b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/assay.json index a5eed06c..3d4de4e4 100644 --- a/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/assay.json +++ b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/assay.json @@ -1,163 +1,235 @@ [ -{ - "aeid": 891, - "assayComponentEndpointName": "CEETOX_H295R_11DCORT", + { + "aeid": 1390, + "assayComponentEndpointName": "LTEA_HepaRG_SLC22A6", "exportReady": 1, "internalReady": 1, - "assayComponentEndpointDesc": "Data from the assay component CEETOX_H295R_11DCORT was analyzed into 1 assay endpoint. This assay endpoint, CEETOX_H295R_11DCORT, was analyzed with bidirectional fitting relative to DMSO as the negative control and baseline of activity. Using a type of inducible reporter, gain or loss-of-signal activity using HPLC-MS-MS was used to understand synthesis of 11-Deoxycortisol in H295R cell line at 48hr of chemical exposure. To generalize the intended target to other relatable targets, this assay endpoint is annotated to the steroid hormone intended target family, where the subfamily is glucocorticoids.", - "assayFunctionType": "detection of steroid hormone", + "assayComponentEndpointDesc": "Data from the assay component LTEA_HepaRG_SLC22A6 was analyzed into 1 endpoint. This assay endpoint, LTEA_HepaRG_SLC22A6, was analyzed with bidirectional fitting relative to DMSO as the negative control and baseline of activity. Using a type of inducible reporter, measures of mRNA induction for gain or loss-of-signal activity can be used to understand regulation of transcription factor activity. To generalize the intended target to other relatable targets, this assay endpoint is annotated to the transporter intended target family, where the subfamily is organic anion transporter.", + "assayFunctionType": "reporter gene", "normalizedDataType": "log2_fold_induction", "burstAssay": 0, - "keyPositiveControl": "Prochloraz;Forskolin", + "keyPositiveControl": null, "signalDirection": "bidirectional", - "intendedTargetType": "molecular messenger", - "intendedTargetTypeSub": "11-Deoxycortisol", - "intendedTargetFamily": "steroid hormone", - "intendedTargetFamilySub": "glucocorticoids", + "intendedTargetType": "rna", + "intendedTargetTypeSub": "mRNA", + "intendedTargetFamily": "transporter", + "intendedTargetFamilySub": "organic anion transporter", "cellViabilityAssay": 0, "dataUsability": 1, - "acid": 586, - "assayComponentName": "CEETOX_H295R_11DCORT", - "assayComponentDesc": "CEETOX_H295R_11DCORT is one of 23 assay component(s) measured or calculated from the CEETOX_H295R assay. It is designed to make measurements of hormone induction, a form of inducible reporter, as detected with absorbance signals by HPLC-MS-MS technology.", - "assayComponentTargetDesc": null, + "acid": 957, + "assayComponentName": "LTEA_HepaRG_SLC22A6", + "assayComponentDesc": "LTEA_HepaRG_SLC22A6 is one of 102 assay component(s) measured in the LTEA HepaRG cell culture assay. It is a marker of NR mediated transport.", + "assayComponentTargetDesc": "Metabolically-competent HepaRG cell cultures were exposed to a chemical for 48 hours before cytotoxicty (LDH) and alterations in transcription were assessed.", "parameterReadoutType": "single", "assayDesignType": "inducible reporter", - "assayDesignTypeSub": "hormone induction", - "biologicalProcessTarget": "regulation of steroid hormone biosynthetic process", - "detectionTechnologyType": "Spectrophotometry", - "detectionTechnologyTypeSub": "Absorbance", - "detectionTechnology": "HPLC-MS-MS", - "keyAssayReagentType": "inducer", + "assayDesignTypeSub": "mRNA induction", + "biologicalProcessTarget": "regulation of transcription factor activity", + "detectionTechnologyType": "Fluorescence", + "detectionTechnologyTypeSub": "Fluorescence intensity", + "detectionTechnology": "Fluidigm qRT-PCR", + "keyAssayReagentType": null, "keyAssayReagent": null, - "technologicalTargetType": "molecular messenger", - "technologicalTargetTypeSub": "11-Deoxycortisol", - "aid": 370, - "assayName": "CEETOX_H295R", - "assayDesc": "CEETOX_H295R is a cell-based, multiplexed-readout assay that uses H295R, a human adrenal gland cell line, with measurements taken at 48 hours after chemical dosing in a 96-well plate.", + "technologicalTargetType": "rna", + "technologicalTargetTypeSub": "mRNA", + "aid": 371, + "assayName": "LTEA_HepaRG", + "assayDesc": "LTEA_HepaRG is a cell based, multiplexed-readout assay that uses HepaRG, a human liver cell line, with measurements taken at 48 hours after chemical dosing on a 96-well plate.", "timepointHr": 48.0, "organismId": 9606, "organism": "human", - "tissue": "adrenal gland", + "tissue": "liver", "cellFormat": "cell line", "cellFreeComponentSource": "", - "cellShortName": "H295R", + "cellShortName": "HepaRG", "cellGrowthMode": "adherent", "assayFootprint": "microplate: 96-well plate", "assayFormatType": "cell-based", "assayFormatTypeSub": "cell-based format", "contentReadoutType": "multiplexed", "dilutionSolvent": "DMSO", - "dilutionSolventPercentMax": 0.1, - "asid": 8, - "assaySourceName": "CEETOX", - "assaySourceLongName": "Ceetox/OpAns", - "assaySourceDesc": "Ceetox, a part of Cyprotex, is a Contract Research Organization (CRO) that in coordination with OpAns, an analytical laboratory, provide ADME-tox services.", + "dilutionSolventPercentMax": 0.5, + "asid": 9, + "assaySourceName": "LTEA", + "assaySourceLongName": "LifeTech/Expression Analysis", + "assaySourceDesc": "Life Technologies, acquired by Thermo Fisher, is a Contract Research Organization (CRO) that provides transcriptomics and expression screening.", "gene": { - "geneId": 145, - "geneName": "nuclear receptor subfamily 3, group C, member 1 (glucocorticoid receptor)", + "geneId": 353, + "geneName": "solute carrier family 22 (organic anion transporter), member 6", "description": null, - "geneSymbol": "NR3C1", + "geneSymbol": "SLC22A6", "organismId": 1, "trackStatus": "live", - "entrezGeneId": 2908, - "officialSymbol": "NR3C1", - "officialFullName": "nuclear receptor subfamily 3, group C, member 1 (glucocorticoid receptor)", - "uniprotAccessionNumber": "P04150" - }, - "assayList": { - "name": "EDSP steroidogenesis", - "description": "Steroidogenesis pathway assays used in EDSP" + "entrezGeneId": 9356, + "officialSymbol": "SLC22A6", + "officialFullName": "solute carrier family 22 (organic anion transporter), member 6", + "uniprotAccessionNumber": "Q4U2R8" }, + "assayList": null, "citations": { - "doi": "doi: 10.1093/toxsci/kfw002", - "url": "https://pubmed.ncbi.nlm.nih.gov/26781511/", - "pmid": 26781511, - "title": "High-Throughput Screening of Chemical Effects on Steroidogenesis Using H295R Human Adrenocortical Carcinoma Cells", - "author": "Karmaus AL, Toole CM, Filer DL, Lewis KC, Martin MT", - "citation": "Karmaus AL, Toole CM, Filer DL, Lewis KC, Martin MT. High-Throughput Screening of Chemical Effects on Steroidogenesis Using H295R Human Adrenocortical Carcinoma Cells. Toxicol Sci. 2016 Apr;150(2):323-32. doi: 10.1093/toxsci/kfw002. Epub 2016 Jan 18. PMID: 26781511; PMCID: PMC4809454.", + "doi": "doi: 10.1038/s41540-020-00166-2", + "url": "https://pubmed.ncbi.nlm.nih.gov/33504769/", + "pmid": 33504769, + "title": "High-throughput toxicogenomic screening of chemicals in the environment using metabolically competent hepatic cell cultures", + "author": "Franzosa JA, Bonzo JA, Jack J, Baker NC, Kothiya P, Witek RP, Hurban P, Siferd S, Hester S, Shah I, Ferguson SS, Houck KA, Wambaugh JF", + "citation": "Franzosa JA, Bonzo JA, Jack J, Baker NC, Kothiya P, Witek RP, Hurban P, Siferd S, Hester S, Shah I, Ferguson SS, Houck KA, Wambaugh JF. High-throughput toxicogenomic screening of chemicals in the environment using metabolically competent hepatic cell cultures. NPJ Syst Biol Appl. 2021 Jan 27;7(1):7. doi: 10.1038/s41540-020-00166-2. PMID: 33504769; PMCID: PMC7840683.", "otherId": "0", - "citationId": 245, + "citationId": 247, "otherSource": "" } }, { - "aeid": 893, - "assayComponentEndpointName": "CEETOX_H295R_OHPREG", + "aeid": 1392, + "assayComponentEndpointName": "LTEA_HepaRG_KLK3", "exportReady": 1, "internalReady": 1, - "assayComponentEndpointDesc": "Data from the assay component CEETOX_H295R_OHPREG was analyzed into 1 assay endpoint. This assay endpoint, CEETOX_H295R_OHPREG, was analyzed with bidirectional fitting relative to DMSO as the negative control and baseline of activity. Using a type of inducible reporter, gain or loss-of-signal activity using HPLC-MS-MS was used to understand synthesis of 17alpha-hydroxypregnenolone in H295R cell line at 48hr of chemical exposure. To generalize the intended target to other relatable targets, this assay endpoint is annotated to the steroid hormone intended target family, where the subfamily is progestagens.", - "assayFunctionType": "detection of steroid hormone", + "assayComponentEndpointDesc": "Data from the assay component LTEA_HepaRG_KLK3 was analyzed into 1 endpoint. This assay endpoint, LTEA_HepaRG_KLK3, was analyzed with bidirectional fitting relative to DMSO as the negative control and baseline of activity. Using a type of inducible reporter, measures of mRNA induction for gain or loss-of-signal activity can be used to understand regulation of transcription factor activity. To generalize the intended target to other relatable targets, this assay endpoint is annotated to the protease intended target family, where the subfamily is Cellular remodeling.", + "assayFunctionType": "reporter gene", "normalizedDataType": "log2_fold_induction", "burstAssay": 0, - "keyPositiveControl": "Prochloraz;Forskolin", + "keyPositiveControl": null, "signalDirection": "bidirectional", - "intendedTargetType": "molecular messenger", - "intendedTargetTypeSub": "17alpha-hydroxypregnenolone", - "intendedTargetFamily": "steroid hormone", - "intendedTargetFamilySub": "progestagens", + "intendedTargetType": "rna", + "intendedTargetTypeSub": "mRNA", + "intendedTargetFamily": "protease", + "intendedTargetFamilySub": "Cellular remodeling", "cellViabilityAssay": 0, "dataUsability": 1, - "acid": 587, - "assayComponentName": "CEETOX_H295R_OHPREG", - "assayComponentDesc": "CEETOX_H295R_OHPREG is one of 23 assay component(s) measured or calculated from the CEETOX_H295R assay. It is designed to make measurements of hormone induction, a form of inducible reporter, as detected with absorbance signals by HPLC-MS-MS technology.", - "assayComponentTargetDesc": null, + "acid": 958, + "assayComponentName": "LTEA_HepaRG_KLK3", + "assayComponentDesc": "LTEA_HepaRG_KLK3 is one of 102 assay component(s) measured in the LTEA HepaRG cell culture assay. It is a marker of Cellular remodeling.", + "assayComponentTargetDesc": "Metabolically-competent HepaRG cell cultures were exposed to a chemical for 48 hours before cytotoxicty (LDH) and alterations in transcription were assessed.", "parameterReadoutType": "single", "assayDesignType": "inducible reporter", - "assayDesignTypeSub": "hormone induction", - "biologicalProcessTarget": "regulation of steroid hormone biosynthetic process", - "detectionTechnologyType": "Spectrophotometry", - "detectionTechnologyTypeSub": "Absorbance", - "detectionTechnology": "HPLC-MS-MS", - "keyAssayReagentType": "inducer", + "assayDesignTypeSub": "mRNA induction", + "biologicalProcessTarget": "regulation of transcription factor activity", + "detectionTechnologyType": "Fluorescence", + "detectionTechnologyTypeSub": "Fluorescence intensity", + "detectionTechnology": "Fluidigm qRT-PCR", + "keyAssayReagentType": null, "keyAssayReagent": null, - "technologicalTargetType": "molecular messenger", - "technologicalTargetTypeSub": "17alpha-hydroxypregnenolone", - "aid": 370, - "assayName": "CEETOX_H295R", - "assayDesc": "CEETOX_H295R is a cell-based, multiplexed-readout assay that uses H295R, a human adrenal gland cell line, with measurements taken at 48 hours after chemical dosing in a 96-well plate.", + "technologicalTargetType": "rna", + "technologicalTargetTypeSub": "mRNA", + "aid": 371, + "assayName": "LTEA_HepaRG", + "assayDesc": "LTEA_HepaRG is a cell based, multiplexed-readout assay that uses HepaRG, a human liver cell line, with measurements taken at 48 hours after chemical dosing on a 96-well plate.", "timepointHr": 48.0, "organismId": 9606, "organism": "human", - "tissue": "adrenal gland", + "tissue": "liver", "cellFormat": "cell line", "cellFreeComponentSource": "", - "cellShortName": "H295R", + "cellShortName": "HepaRG", "cellGrowthMode": "adherent", "assayFootprint": "microplate: 96-well plate", "assayFormatType": "cell-based", "assayFormatTypeSub": "cell-based format", "contentReadoutType": "multiplexed", "dilutionSolvent": "DMSO", - "dilutionSolventPercentMax": 0.1, - "asid": 8, - "assaySourceName": "CEETOX", - "assaySourceLongName": "Ceetox/OpAns", - "assaySourceDesc": "Ceetox, a part of Cyprotex, is a Contract Research Organization (CRO) that in coordination with OpAns, an analytical laboratory, provide ADME-tox services.", + "dilutionSolventPercentMax": 0.5, + "asid": 9, + "assaySourceName": "LTEA", + "assaySourceLongName": "LifeTech/Expression Analysis", + "assaySourceDesc": "Life Technologies, acquired by Thermo Fisher, is a Contract Research Organization (CRO) that provides transcriptomics and expression screening.", "gene": { - "geneId": 235, - "geneName": "progesterone receptor", + "geneId": 25, + "geneName": "kallikrein-related peptidase 3", "description": null, - "geneSymbol": "PGR", + "geneSymbol": "KLK3", "organismId": 1, "trackStatus": "live", - "entrezGeneId": 5241, - "officialSymbol": "PGR", - "officialFullName": "progesterone receptor", - "uniprotAccessionNumber": "P06401" + "entrezGeneId": 354, + "officialSymbol": "KLK3", + "officialFullName": "kallikrein-related peptidase 3", + "uniprotAccessionNumber": "P07288" }, - "assayList": { - "name": "EDSP steroidogenesis", - "description": "Steroidogenesis pathway assays used in EDSP" + "assayList": null, + "citations": { + "doi": "doi: 10.1038/s41540-020-00166-2", + "url": "https://pubmed.ncbi.nlm.nih.gov/33504769/", + "pmid": 33504769, + "title": "High-throughput toxicogenomic screening of chemicals in the environment using metabolically competent hepatic cell cultures", + "author": "Franzosa JA, Bonzo JA, Jack J, Baker NC, Kothiya P, Witek RP, Hurban P, Siferd S, Hester S, Shah I, Ferguson SS, Houck KA, Wambaugh JF", + "citation": "Franzosa JA, Bonzo JA, Jack J, Baker NC, Kothiya P, Witek RP, Hurban P, Siferd S, Hester S, Shah I, Ferguson SS, Houck KA, Wambaugh JF. High-throughput toxicogenomic screening of chemicals in the environment using metabolically competent hepatic cell cultures. NPJ Syst Biol Appl. 2021 Jan 27;7(1):7. doi: 10.1038/s41540-020-00166-2. PMID: 33504769; PMCID: PMC7840683.", + "otherId": "0", + "citationId": 247, + "otherSource": "" + } + }, + { + "aeid": 1394, + "assayComponentEndpointName": "LTEA_HepaRG_SLC10A1", + "exportReady": 1, + "internalReady": 1, + "assayComponentEndpointDesc": "Data from the assay component LTEA_HepaRG_SLC10A1 was analyzed into 1 endpoint. This assay endpoint, LTEA_HepaRG_SLC10A1, was analyzed with bidirectional fitting relative to DMSO as the negative control and baseline of activity. Using a type of inducible reporter, measures of mRNA induction for gain or loss-of-signal activity can be used to understand regulation of transcription factor activity. To generalize the intended target to other relatable targets, this assay endpoint is annotated to the transporter intended target family, where the subfamily is sodium/bile acid cotransporter.", + "assayFunctionType": "reporter gene", + "normalizedDataType": "log2_fold_induction", + "burstAssay": 0, + "keyPositiveControl": null, + "signalDirection": "bidirectional", + "intendedTargetType": "rna", + "intendedTargetTypeSub": "mRNA", + "intendedTargetFamily": "transporter", + "intendedTargetFamilySub": "sodium/bile acid cotransporter", + "cellViabilityAssay": 0, + "dataUsability": 1, + "acid": 959, + "assayComponentName": "LTEA_HepaRG_SLC10A1", + "assayComponentDesc": "LTEA_HepaRG_SLC10A1 is one of 102 assay component(s) measured in the LTEA HepaRG cell culture assay. It is a marker of NR mediated transport.", + "assayComponentTargetDesc": "Metabolically-competent HepaRG cell cultures were exposed to a chemical for 48 hours before cytotoxicty (LDH) and alterations in transcription were assessed.", + "parameterReadoutType": "single", + "assayDesignType": "inducible reporter", + "assayDesignTypeSub": "mRNA induction", + "biologicalProcessTarget": "regulation of transcription factor activity", + "detectionTechnologyType": "Fluorescence", + "detectionTechnologyTypeSub": "Fluorescence intensity", + "detectionTechnology": "Fluidigm qRT-PCR", + "keyAssayReagentType": null, + "keyAssayReagent": null, + "technologicalTargetType": "rna", + "technologicalTargetTypeSub": "mRNA", + "aid": 371, + "assayName": "LTEA_HepaRG", + "assayDesc": "LTEA_HepaRG is a cell based, multiplexed-readout assay that uses HepaRG, a human liver cell line, with measurements taken at 48 hours after chemical dosing on a 96-well plate.", + "timepointHr": 48.0, + "organismId": 9606, + "organism": "human", + "tissue": "liver", + "cellFormat": "cell line", + "cellFreeComponentSource": "", + "cellShortName": "HepaRG", + "cellGrowthMode": "adherent", + "assayFootprint": "microplate: 96-well plate", + "assayFormatType": "cell-based", + "assayFormatTypeSub": "cell-based format", + "contentReadoutType": "multiplexed", + "dilutionSolvent": "DMSO", + "dilutionSolventPercentMax": 0.5, + "asid": 9, + "assaySourceName": "LTEA", + "assaySourceLongName": "LifeTech/Expression Analysis", + "assaySourceDesc": "Life Technologies, acquired by Thermo Fisher, is a Contract Research Organization (CRO) that provides transcriptomics and expression screening.", + "gene": { + "geneId": 299, + "geneName": "solute carrier family 10 (sodium/bile acid cotransporter), member 1", + "description": null, + "geneSymbol": "SLC10A1", + "organismId": 1, + "trackStatus": "live", + "entrezGeneId": 6554, + "officialSymbol": "SLC10A1", + "officialFullName": "solute carrier family 10 (sodium/bile acid cotransporter), member 1", + "uniprotAccessionNumber": "Q14973" }, + "assayList": null, "citations": { - "doi": "doi: 10.1093/toxsci/kfw002", - "url": "https://pubmed.ncbi.nlm.nih.gov/26781511/", - "pmid": 26781511, - "title": "High-Throughput Screening of Chemical Effects on Steroidogenesis Using H295R Human Adrenocortical Carcinoma Cells", - "author": "Karmaus AL, Toole CM, Filer DL, Lewis KC, Martin MT", - "citation": "Karmaus AL, Toole CM, Filer DL, Lewis KC, Martin MT. High-Throughput Screening of Chemical Effects on Steroidogenesis Using H295R Human Adrenocortical Carcinoma Cells. Toxicol Sci. 2016 Apr;150(2):323-32. doi: 10.1093/toxsci/kfw002. Epub 2016 Jan 18. PMID: 26781511; PMCID: PMC4809454.", + "doi": "doi: 10.1038/s41540-020-00166-2", + "url": "https://pubmed.ncbi.nlm.nih.gov/33504769/", + "pmid": 33504769, + "title": "High-throughput toxicogenomic screening of chemicals in the environment using metabolically competent hepatic cell cultures", + "author": "Franzosa JA, Bonzo JA, Jack J, Baker NC, Kothiya P, Witek RP, Hurban P, Siferd S, Hester S, Shah I, Ferguson SS, Houck KA, Wambaugh JF", + "citation": "Franzosa JA, Bonzo JA, Jack J, Baker NC, Kothiya P, Witek RP, Hurban P, Siferd S, Hester S, Shah I, Ferguson SS, Houck KA, Wambaugh JF. High-throughput toxicogenomic screening of chemicals in the environment using metabolically competent hepatic cell cultures. NPJ Syst Biol Appl. 2021 Jan 27;7(1):7. doi: 10.1038/s41540-020-00166-2. PMID: 33504769; PMCID: PMC7840683.", "otherId": "0", - "citationId": 245, + "citationId": 247, "otherSource": "" } } diff --git a/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-aeid/1390.json b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-aeid/1390.json new file mode 100644 index 00000000..98ff9665 --- /dev/null +++ b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-aeid/1390.json @@ -0,0 +1,372 @@ +[ + { + "aeid": 1390, + "m4id": 906167, + "spid": "TX009761", + "chid": 24845, + "casn": "64-86-8", + "chnm": "Colchicine", + "dtxsid": "DTXSID5024845", + "bmad": 0.9405044150032765, + "respMax": 2.60967253749995, + "respMin": 2.1440377088333484, + "maxMean": 2.3768551231666493, + "maxMeanConc": -1.5228787452803376, + "maxMed": 2.3768551231666493, + "maxMedConc": -1.5228787452803376, + "logcMax": -1.5228787452803376, + "logcMin": -1.5228787452803376, + "nconc": 1, + "npts": 2, + "nrep": 2.0, + "nmedGtbl": 0, + "tmpi": 72, + "m5id": 6384473, + "modl": "none", + "hitc": 0.0, + "fitc": 2, + "coff": 2.8215132450098297, + "actp": null, + "modelType": 2, + "chidRep": 1, + "stkc": 20.0, + "stkcUnit": "mM", + "testedConcUnit": "uM", + "mc3Param": { + "logc": [ + -1.5228787452803376, + -1.5228787452803376 + ], + "resp": [ + 2.1440377088333484, + 2.60967253749995 + ] + }, + "mc4Param": { + "pow_a": null, + "pow_p": null, + "exp2_a": null, + "exp2_b": null, + "exp3_a": null, + "exp3_b": null, + "exp3_p": null, + "exp5_p": null, + "gnls_p": null, + "gnls_q": null, + "hill_p": null, + "pow_er": null, + "cnst_er": null, + "exp2_er": null, + "exp3_er": null, + "exp4_er": null, + "exp4_ga": null, + "exp4_tp": null, + "exp5_er": null, + "exp5_ga": null, + "exp5_tp": null, + "gnls_er": null, + "gnls_ga": null, + "gnls_la": null, + "gnls_tp": null, + "hill_er": null, + "hill_ga": null, + "hill_tp": null, + "poly1_a": null, + "poly2_a": null, + "poly2_b": null, + "pow_aic": null, + "pow_cov": null, + "pow_rme": null, + "all_bmed": 0, + "cnst_aic": null, + "cnst_rme": null, + "exp2_aic": null, + "exp2_cov": null, + "exp2_rme": null, + "exp3_aic": null, + "exp3_cov": null, + "exp3_rme": null, + "exp4_aic": null, + "exp4_cov": null, + "exp4_rme": null, + "exp5_aic": null, + "exp5_cov": null, + "exp5_rme": null, + "gnls_aic": null, + "gnls_cov": null, + "gnls_rme": null, + "hill_aic": null, + "hill_cov": null, + "hill_rme": null, + "poly1_er": null, + "poly2_er": null, + "pow_a_sd": null, + "pow_p_sd": null, + "all_onesd": 1.0063376519421736, + "exp2_a_sd": null, + "exp2_b_sd": null, + "exp3_a_sd": null, + "exp3_b_sd": null, + "exp3_p_sd": null, + "exp5_p_sd": null, + "gnls_p_sd": null, + "gnls_q_sd": null, + "hill_p_sd": null, + "poly1_aic": null, + "poly1_cov": null, + "poly1_rme": null, + "poly2_aic": null, + "poly2_cov": null, + "poly2_rme": null, + "pow_er_sd": null, + "exp2_er_sd": null, + "exp3_er_sd": null, + "exp4_er_sd": null, + "exp4_ga_sd": null, + "exp4_tp_sd": null, + "exp5_er_sd": null, + "exp5_ga_sd": null, + "exp5_tp_sd": null, + "gnls_er_sd": null, + "gnls_ga_sd": null, + "gnls_la_sd": null, + "gnls_tp_sd": null, + "hill_er_sd": null, + "hill_ga_sd": null, + "hill_tp_sd": null, + "poly1_a_sd": null, + "poly2_a_sd": null, + "poly2_b_sd": null, + "poly1_er_sd": null, + "poly2_er_sd": null, + "pow_success": null, + "cnst_success": null, + "exp2_success": null, + "exp3_success": null, + "exp4_success": null, + "exp5_success": null, + "gnls_success": null, + "hill_success": null, + "poly1_success": null, + "poly2_success": null + }, + "mc5Param": { + "bmr": 1.3575494924699922, + "hitcall": 0 + }, + "mc6Param": null + }, + { + "aeid": 1390, + "m4id": 906192, + "spid": "TX012530", + "chid": 34192, + "casn": "10161-33-8", + "chnm": "17beta-Trenbolone", + "dtxsid": "DTXSID0034192", + "bmad": 0.9405044150032765, + "respMax": 2.717409684333399, + "respMin": -0.8545140676665994, + "maxMean": 1.3163384146666992, + "maxMeanConc": -1.5228787452803376, + "maxMed": 1.3163384146666992, + "maxMedConc": -1.5228787452803376, + "logcMax": 1.4771212547196624, + "logcMin": -1.5228787452803376, + "nconc": 6, + "npts": 10, + "nrep": 2.0, + "nmedGtbl": 0, + "tmpi": 97, + "m5id": 6384498, + "modl": "poly1", + "hitc": 1.5382110124750505E-5, + "fitc": 13, + "coff": 2.8215132450098297, + "actp": null, + "modelType": 2, + "chidRep": 1, + "stkc": 19.58913043530091, + "stkcUnit": "mM", + "testedConcUnit": "uM", + "mc3Param": { + "logc": [ + -1.5228787452803376, + 1.4771212547196624, + 0.47712125471966244, + -1.5228787452803376, + 0, + 0, + -0.5228787452803376, + -1, + -0.5228787452803376, + -1 + ], + "resp": [ + -0.08473285500000038, + -0.3307718959999999, + 0.2718659670000001, + 2.717409684333399, + -0.7598897116665988, + 0.616657414666701, + 0.9084294140000004, + -0.5178109723332991, + -0.8545140676665994, + -0.15577021666659974 + ] + }, + "mc4Param": { + "pow_a": -0.0000032015551244766303, + "pow_p": 3.3938876456093636, + "exp2_a": -0.0008425672205370199, + "exp2_b": 5.025952810047121, + "exp3_a": -0.3165412302939914, + "exp3_b": 32.7886760846325, + "exp3_p": 3.823113636098184, + "exp5_p": 4.521308309626776, + "gnls_p": 0.7060536922649157, + "gnls_q": 7.995803111831659, + "hill_p": 7.999995740946841, + "pow_er": -0.3948197735362726, + "cnst_er": -0.3688009411915791, + "exp2_er": -0.39189255925874833, + "exp3_er": -0.394828315652932, + "exp4_er": -0.39001576568747853, + "exp4_ga": 94.86188101488622, + "exp4_tp": -1.536218042365886, + "exp5_er": -0.3943079735577426, + "exp5_ga": 38.01553780063972, + "exp5_tp": -1.5637566207089924, + "gnls_er": -0.3888279954274361, + "gnls_ga": 0.008360957321139052, + "gnls_la": 0.26439669331621307, + "gnls_tp": -0.11011944003100936, + "hill_er": -0.3969989913318005, + "hill_ga": 0.05553142030323221, + "hill_tp": -0.14277058589126485, + "poly1_a": -0.010176546872189638, + "poly2_a": -0.00014558397574643742, + "poly2_b": 0.6414632462188614, + "pow_aic": 32.701296578338486, + "pow_cov": 1, + "pow_rme": 1.0134598100344008, + "pow_top": -0.33002326866351944, + "all_bmed": 0, + "cnst_aic": 28.986099667961145, + "cnst_rme": 1.0188398204286804, + "exp2_aic": 32.70205365440622, + "exp2_cov": 1, + "exp2_rme": 1.013472783830085, + "exp2_top": -0.3287033214604972, + "exp3_aic": 34.70116703286695, + "exp3_cov": 1, + "exp3_rme": 1.0134574027805858, + "exp3_top": -0.32852403639508787, + "exp4_aic": 32.74728386838651, + "exp4_cov": 1, + "exp4_rme": 1.0143301743393136, + "exp4_top": -1.536218042365886, + "exp5_aic": 34.70111771210726, + "exp5_cov": 1, + "exp5_rme": 1.0134565513089702, + "exp5_top": -1.5637566207089924, + "gnls_aic": 38.93400660033059, + "gnls_cov": 1, + "gnls_rme": 1.034443341409848, + "gnls_top": -0.09639462099752036, + "hill_aic": 34.71752150835012, + "hill_cov": 1, + "hill_rme": 1.0156361325302317, + "hill_top": -0.14277058589126485, + "poly1_er": -0.3904282715639928, + "poly2_er": -0.3885113969429605, + "pow_a_sd": 0.000007635522959665768, + "pow_ac50": 24.458147755686916, + "pow_p_sd": 0.639975040113934, + "all_onesd": 1.0063376519421736, + "exp2_a_sd": 0.02555615257745943, + "exp2_ac50": 26.529108697337612, + "exp2_b_sd": 25.57941425563839, + "exp3_a_sd": null, + "exp3_ac50": 26.099812908926182, + "exp3_b_sd": null, + "exp3_p_sd": null, + "exp4_ac50": 94.86188101488622, + "exp5_ac50": 38.01553780063972, + "exp5_p_sd": 175.1469903178518, + "gnls_ac50": 0.005863101227685299, + "gnls_p_sd": null, + "gnls_q_sd": null, + "hill_ac50": 0.05553142030323221, + "hill_p_sd": 33.18967248654182, + "poly1_aic": 30.74302350258141, + "poly1_cov": 1, + "poly1_rme": 1.0142482587192818, + "poly1_top": -0.3052964061656891, + "poly2_aic": 32.706800555191634, + "poly2_cov": 1, + "poly2_rme": 1.0135546465438303, + "poly2_top": -0.3252376206529743, + "pow_er_sd": 0.3056178894168387, + "exp2_er_sd": 0.30593434754216753, + "exp3_er_sd": null, + "exp4_er_sd": 0.30493315529014337, + "exp4_ga_sd": 1415.862995217581, + "exp4_tp_sd": 20.95632072022936, + "exp5_er_sd": 0.30568017455861324, + "exp5_ga_sd": 1717.327449801869, + "exp5_tp_sd": 256.65062953004656, + "gnls_er_sd": null, + "gnls_ga_sd": null, + "gnls_la_sd": null, + "gnls_tp_sd": null, + "hill_er_sd": 0.3082074518503941, + "hill_ga_sd": 0.1384923679951287, + "hill_tp_sd": 0.27120396237793026, + "poly1_a_sd": 0.02009033680518044, + "poly1_ac50": 14.999999999999998, + "poly2_a_sd": 0.0044102960138753585, + "poly2_ac50": 21.12046278082584, + "poly2_b_sd": 9.884046203612312, + "poly1_er_sd": 0.30494359178836106, + "poly2_er_sd": 0.306194068294261, + "pow_success": 1, + "cnst_success": 1, + "exp2_success": 1, + "exp3_success": 1, + "exp4_success": 1, + "exp5_success": 1, + "gnls_success": 1, + "hill_success": 1, + "poly1_success": 1, + "poly2_success": 1, + "gnls_ac50_loss": 0.2676524754092505 + }, + "mc5Param": { + "a": -0.010176546872189638, + "er": -0.3904282715639928, + "ac5": 1.4999999999999998, + "bmd": 133.399817199279, + "bmr": 1.3575494924699922, + "mll": -13.371511751290704, + "top": -0.3052964061656891, + "ac10": 2.9999999999999996, + "ac20": 5.999999999999999, + "ac50": 14.999999999999998, + "bmdl": 28.55532213605833, + "rmse": 1.0142482587192818, + "ac1sd": 98.88792972518829, + "caikwt": 0.7065033912112693, + "hitcall": 0.000015382110124750505, + "top_over_cutoff": 0.10820307390214838 + }, + "mc6Param": { + "flag": [ + "Bmd > ac50, indication of high baseline variability" + ], + "mc6MthdId": [ + 9 + ] + } + } +] \ No newline at end of file diff --git a/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-aeid/891.json b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-aeid/891.json deleted file mode 100644 index 632d997b..00000000 --- a/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-aeid/891.json +++ /dev/null @@ -1,214 +0,0 @@ -[ -{ - "mc5Param": { - "a": -0.04203307061789399, - "p": 0.5460604379820018, - "er": -2.961687340575808, - "bmr": 0.24529296780387735, - "mll": 15.548215735641588, - "top": -0.5196512704533357, - "ac50": 28.101146145905627, - "rmse": 0.06640717632156491, - "caikwt": 5.763898172614025E-7, - "hitcall": 0, - "top_over_cutoff": 0.8730733746593241 - }, - "mc6Param": { - "flag": [ - "Borderline" - ], - "mc6MthdId": [ - 11 - ] - }, - "m4id": 739899, - "spid": "TP0001111A03", - "chid": 26706, - "casn": "104-66-5", - "chnm": "1,2-Diphenoxyethane", - "dtxsid": "DTXSID5026706", - "bmad": 0.09919961779770327, - "respMax": 0.09581199409248546, - "respMin": -0.5287070328190216, - "maxMean": 0.09547397416142764, - "maxMeanConc": 0.0, - "maxMed": 0.09547397416142764, - "maxMedConc": 0.0, - "logcMax": 2.0, - "logcMin": -0.3979400086720376, - "nconc": 6, - "npts": 12, - "nrep": 2.0, - "nmedGtbl": 0, - "tmpi": 392, - "m5id": 5593614, - "modl": "pow", - "hitc": 0.0, - "fitc": 15, - "coff": 0.5951977067862196, - "actp": null, - "modelType": 2, - "chidRep": 1, - "stkc": 100.0, - "stkcUnit": "mM", - "testedConcUnit": "uM", - "mc3Param": { - "logc": [ - 0.6020599913279624, - 1.4771212547196624, - 2, - 1, - 1, - 0.6020599913279624, - 0, - -0.3979400086720376, - 0, - -0.3979400086720376, - 1.4771212547196624, - 2 - ], - "resp": [ - -0.1219088194460961, - -0.32553015793966994, - -0.5045436509136769, - -0.13466160520782172, - -0.16051042897671305, - -0.13210201379095904, - 0.09513595423036982, - -0.06785519848962922, - 0.09581199409248546, - 0.04313081806259705, - -0.22521953668839217, - -0.5287070328190216 - ] - }, - "mc4Param": { - "pow_a": -0.04203307061789399, - "pow_p": 0.5460604379820018, - "exp2_a": -135.43031969293415, - "exp2_b": 24758.2368451059, - "exp3_a": -6.590291627112856, - "exp3_b": 12168.035580209053, - "exp3_p": 0.5366736177235878, - "exp5_p": 0.8036529421613088, - "gnls_p": 1.0684453697794307, - "gnls_q": 6.162086684118666, - "hill_p": 1.0685679370984658, - "pow_er": -2.961687340575808, - "cnst_er": -1.5878944828835708, - "exp2_er": -2.466940782780456, - "exp3_er": -2.9581386432762313, - "exp4_er": -2.882848291483774, - "exp4_ga": 24.675475110420063, - "exp4_tp": -0.5449935875500249, - "exp5_er": -2.9406319348316443, - "exp5_ga": 31.92313239351669, - "exp5_tp": -0.619950410230828, - "gnls_er": -2.8940096753039195, - "gnls_ga": 30.030997000652224, - "gnls_la": 3765.8348363589794, - "gnls_tp": -0.6344484393364249, - "hill_er": -2.895092777762591, - "hill_ga": 30.02124604725821, - "hill_tp": -0.6344484375164885, - "poly1_a": -0.005482830552873358, - "poly2_a": -185.9966613313414, - "poly2_b": 34013.637361815425, - "pow_aic": -25.096431471283175, - "pow_cov": 1, - "pow_rme": 0.06640717632156491, - "pow_top": -0.5196512704533357, - "all_bmed": 0, - "cnst_aic": 3.636530654086035, - "cnst_rme": 0.2568551110914928, - "exp2_aic": -15.487349739776333, - "exp2_cov": 1, - "exp2_rme": 0.09060424792984167, - "exp2_top": -0.5481173588066438, - "exp3_aic": -23.040605732883225, - "exp3_cov": 1, - "exp3_rme": 0.0665942532085954, - "exp3_top": -0.5205153141686697, - "exp4_aic": -24.60642850057436, - "exp4_cov": 1, - "exp4_rme": 0.06378939666525871, - "exp4_top": -0.5449935875500249, - "exp5_aic": -23.453373444194582, - "exp5_cov": 1, - "exp5_rme": 0.06313350114017938, - "exp5_top": -0.619950410230828, - "gnls_aic": -18.7647385637527, - "gnls_cov": 1, - "gnls_rme": 0.06366576668916582, - "gnls_top": -0.6227904909943394, - "hill_aic": -22.76471828544939, - "hill_cov": 1, - "hill_rme": 0.06366792562809895, - "hill_top": -0.6344484375164885, - "poly1_er": -2.4676652157467536, - "poly2_er": -2.466613889582475, - "pow_a_sd": 0.0133914657021243, - "pow_ac50": 28.101146145905627, - "pow_p_sd": 0.07347202560858822, - "all_onesd": 0.1818331859183672, - "exp2_a_sd": 1010.7163320864136, - "exp2_ac50": 50.050488213605085, - "exp2_b_sd": 184433.0477767319, - "exp3_a_sd": 15.11363883316663, - "exp3_ac50": 28.465117178003663, - "exp3_b_sd": 46099.62216481522, - "exp3_p_sd": 0.08040478173494305, - "exp4_ac50": 24.675475110420063, - "exp5_ac50": 31.92313239351669, - "exp5_p_sd": 0.21502156344373555, - "gnls_ac50": 29.01551143219315, - "gnls_p_sd": 0.28582681155443485, - "gnls_q_sd": 24170.486190089636, - "hill_ac50": 30.02124604725821, - "hill_p_sd": 0.28578640913322406, - "poly1_aic": -17.505151594146362, - "poly1_cov": 1, - "poly1_rme": 0.09052914675666396, - "poly1_top": -0.5482830552873358, - "poly2_aic": -15.479306111354829, - "poly2_cov": 1, - "poly2_rme": 0.09062793747383256, - "poly2_top": -0.5484373488732158, - "pow_er_sd": 0.27488309244878134, - "exp2_er_sd": 0.240879204236971, - "exp3_er_sd": 0.27554570972330544, - "exp4_er_sd": 0.25641792933790464, - "exp4_ga_sd": 7.409116665026493, - "exp4_tp_sd": 0.05867635383553914, - "exp5_er_sd": 0.2664969387644301, - "exp5_ga_sd": 22.178936953111428, - "exp5_tp_sd": 0.18909411718852367, - "gnls_er_sd": 0.2682678139032472, - "gnls_ga_sd": 15.810589484590253, - "gnls_la_sd": 53590626.36734551, - "gnls_tp_sd": 0.13687433827156575, - "hill_er_sd": 0.2681932921461914, - "hill_ga_sd": 15.800202169448758, - "hill_tp_sd": 0.13681556112121443, - "poly1_a_sd": 0.0005582513340306865, - "poly1_ac50": 49.99999999999999, - "poly2_a_sd": 1159.027356596874, - "poly2_ac50": 50.0732843174381, - "poly2_b_sd": 211239.9663038622, - "poly1_er_sd": 0.2408012174070008, - "poly2_er_sd": 0.24088363765722565, - "pow_success": 1, - "cnst_success": 1, - "exp2_success": 1, - "exp3_success": 1, - "exp4_success": 1, - "exp5_success": 1, - "gnls_success": 1, - "hill_success": 1, - "poly1_success": 1, - "poly2_success": 1, - "gnls_ac50_loss": 3781.483601273532 - }, - "aeid": 891 - } -] \ No newline at end of file diff --git a/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-dtxsid/DTXSID7020182.json b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-dtxsid/DTXSID7020182.json deleted file mode 100644 index eadfc76b..00000000 --- a/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-dtxsid/DTXSID7020182.json +++ /dev/null @@ -1,204 +0,0 @@ -[ - { - "mc5Param": { - "p": 7.9999998904107805, - "er": -6.079039516893902, - "ga": 10.354609389123947, - "tp": -0.04900024691370293, - "ac5": 7.478045616740115, - "bmr": 0.2104908060020537, - "mll": 16.775769134200562, - "top": -0.04900024691370293, - "ac10": 8.182109219003824, - "ac20": 8.986769021688765, - "ac50": 10.354609389123947, - "rmse": 0.004032182076102057, - "caikwt": 0.006723457623781064, - "hitcall": 1.6109606798658689E-18, - "top_over_cutoff": 0.6188365220248107 - }, - "mc6Param": { - "flag": [ - "Average number of replicates per conc is less than 2", - "Number of concentrations tested is less than 4" - ], - "mc6MthdId": [ - 13, - 14 - ] - }, - "m4id": 392721, - "spid": "TP0000077C05", - "chid": 20182, - "casn": "80-05-7", - "chnm": "Bisphenol A", - "dtxsid": "DTXSID7020182", - "bmad": 0.022749058062569997, - "respMax": 0.008, - "respMin": -0.049, - "maxMean": 0.008, - "maxMeanConc": 0.0, - "maxMed": 0.008, - "maxMedConc": 0.0, - "logcMax": 1.6020599913279623, - "logcMin": 0.0, - "nconc": 4, - "npts": 4, - "nrep": 1.0, - "nmedGtbl": 0, - "tmpi": 716, - "m5id": 4787296, - "modl": "exp5", - "hitc": 1.6109606798658689E-18, - "fitc": 13, - "coff": 0.07918124604762482, - "actp": null, - "modelType": 2, - "chidRep": 0, - "stkc": 20.0, - "stkcUnit": "mM", - "testedConcUnit": "uM", - "mc3Param": { - "logc": [ - 1, - 0, - 1.6020599913279623, - 0.6020599913279624 - ], - "resp": [ - -0.02, - 0.008, - -0.049, - 0.001 - ] - }, - "mc4Param": { - "pow_a": -0.0014427580345331586, - "pow_p": 0.9592986898174511, - "exp2_a": -4.6448208273152325, - "exp2_b": 3753.2238436112066, - "exp3_a": -0.035331051718831774, - "exp3_b": 47.31447995189462, - "exp3_p": 0.7860427020544185, - "exp5_p": 7.9999998904107805, - "gnls_p": 7.999999933861192, - "gnls_q": 2.4972121148804822, - "hill_p": 7.999999473906639, - "pow_er": -5.06801475320901, - "cnst_er": -3.866838032938705, - "exp2_er": -5.064045880660846, - "exp3_er": -4.98642447574726, - "exp4_er": -5.061595178996411, - "exp4_ga": 17.730331167133897, - "exp4_tp": -0.05879999999963083, - "exp5_er": -6.079039516893902, - "exp5_ga": 10.354609389123947, - "exp5_tp": -0.04900024691370293, - "gnls_er": -6.077957603797178, - "gnls_ga": 10.477401849788167, - "gnls_la": 686.793780954632, - "gnls_tp": -0.04904156879394911, - "hill_er": -6.077935587609875, - "hill_ga": 10.475670502006198, - "hill_tp": -0.04900137220511384, - "poly1_a": -0.0012438762051045949, - "poly2_a": -6.840495279290689, - "poly2_b": 5537.761016325804, - "pow_aic": -21.984273572297944, - "pow_cov": 1, - "pow_rme": 0.00667775191385891, - "pow_top": -0.04966466978119405, - "all_bmed": 0, - "cnst_aic": -15.560725133335415, - "cnst_rme": 0.02676751762864835, - "exp2_aic": -21.960105496726907, - "exp2_cov": 1, - "exp2_rme": 0.006694046889969263, - "exp2_top": -0.049766923417465574, - "exp3_aic": -19.53428178599764, - "exp3_cov": 1, - "exp3_rme": 0.007055301295726877, - "exp3_top": -0.04953705130823287, - "exp4_aic": -21.6706745457441, - "exp4_cov": 1, - "exp4_rme": 0.007121739796281197, - "exp4_top": -0.05879999999963083, - "exp5_aic": -25.551538268401124, - "exp5_cov": 1, - "exp5_rme": 0.004032182076102057, - "exp5_top": -0.04900024691370293, - "gnls_aic": -21.549095801020044, - "gnls_cov": 1, - "gnls_rme": 0.004032515983972862, - "gnls_top": -0.04901195987421019, - "hill_aic": -25.549090432440472, - "hill_cov": 1, - "hill_rme": 0.004032516717784591, - "hill_top": -0.04900137220511384, - "poly1_er": -5.065595039829217, - "poly2_er": -5.062727816770947, - "pow_a_sd": 0.0015787938875210603, - "pow_ac50": 19.420385066938692, - "pow_p_sd": 0.29943749087327554, - "all_onesd": 0.15603469681397605, - "exp2_a_sd": 49.92286985857353, - "exp2_ac50": 20.053287270309657, - "exp2_b_sd": 40120.04815044849, - "exp3_a_sd": 0.08977820333262714, - "exp3_ac50": 21.159764093008096, - "exp3_b_sd": 98.94007008963592, - "exp3_p_sd": 0.4298393329903503, - "exp4_ac50": 17.730331167133897, - "exp5_ac50": 10.354609389123947, - "exp5_p_sd": 12.443086816583772, - "gnls_ac50": 10.47589662455899, - "gnls_p_sd": null, - "gnls_q_sd": null, - "hill_ac50": 10.475670502006198, - "hill_p_sd": 6.757067877818015, - "poly1_aic": -23.96775222065048, - "poly1_cov": 1, - "poly1_rme": 0.006687643872573625, - "poly1_top": -0.049755048204183784, - "poly2_aic": -21.95743497107909, - "poly2_cov": 1, - "poly2_rme": 0.006696336372724192, - "poly2_top": -0.04976672041647811, - "pow_er_sd": 0.4173603932542164, - "exp2_er_sd": 0.4176038769379585, - "exp3_er_sd": 0.4298380565059921, - "exp4_er_sd": 0.48081760578742394, - "exp4_ga_sd": 9.506269879151334, - "exp4_tp_sd": 0.017318149353980967, - "exp5_er_sd": 0.6586148209441123, - "exp5_ga_sd": 0.5777095622871521, - "exp5_tp_sd": 0.0020449832072392017, - "gnls_er_sd": null, - "gnls_ga_sd": null, - "gnls_la_sd": null, - "gnls_tp_sd": null, - "hill_er_sd": 0.6590754787526507, - "hill_ga_sd": 0.4313021761339814, - "hill_tp_sd": 0.0020410788683443656, - "poly1_a_sd": 0.00014003658476212415, - "poly1_ac50": 19.999999999999996, - "poly2_a_sd": 64.8364065875001, - "poly2_ac50": 20.071712440915658, - "poly2_b_sd": 52109.84117163329, - "poly1_er_sd": 0.4173349853153968, - "poly2_er_sd": 0.417853613710997, - "pow_success": 1, - "cnst_success": 1, - "exp2_success": 1, - "exp3_success": 1, - "exp4_success": 1, - "exp5_success": 1, - "gnls_success": 1, - "hill_success": 1, - "poly1_success": 1, - "poly2_success": 1, - "gnls_ac50_loss": 687.1259538417128 - }, - "aeid": 891 - } -] \ No newline at end of file diff --git a/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-dtxsid/DTXSID7024827.json b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-dtxsid/DTXSID7024827.json new file mode 100644 index 00000000..021c2671 --- /dev/null +++ b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-dtxsid/DTXSID7024827.json @@ -0,0 +1,217 @@ +[ + { + "aeid": 1390, + "m4id": 906160, + "spid": "TX007998", + "chid": 24827, + "casn": "69-09-0", + "chnm": "Chlorpromazine hydrochloride", + "dtxsid": "DTXSID7024827", + "bmad": 0.9405044150032765, + "respMax": 1.8515926973332988, + "respMin": -1.4281684306667, + "maxMean": 1.8515926973332988, + "maxMeanConc": 0.47712125471966244, + "maxMed": 1.8515926973332988, + "maxMedConc": 0.47712125471966244, + "logcMax": 1.4771212547196624, + "logcMin": -1.5228787452803376, + "nconc": 7, + "npts": 11, + "nrep": 2.0, + "nmedGtbl": 0, + "tmpi": 65, + "m5id": 6384466, + "modl": "poly1", + "hitc": 0.0024578389852192156, + "fitc": 13, + "coff": 2.8215132450098297, + "actp": null, + "modelType": 2, + "chidRep": 1, + "stkc": 20.0, + "stkcUnit": "mM", + "testedConcUnit": "uM", + "mc3Param": { + "logc": [ + -1.5228787452803376, + 1.4771212547196624, + 1, + 1, + 0, + -0.5228787452803376, + -1, + 0, + -0.5228787452803376, + -1, + 0.47712125471966244 + ], + "resp": [ + -0.9813260029999995, + 1.5374573823333009, + -1.4281684306667, + -0.32735703500000035, + -1.3241634073333994, + -1.0260995583333994, + -1.0514509676666997, + -0.5339457896666993, + 0.12475134633329965, + 0.19027474800000022, + 1.8515926973332988 + ] + }, + "mc4Param": { + "pow_a": -0.12566043650192105, + "pow_p": 0.3000000760970656, + "exp2_a": 0.00005409723692181811, + "exp2_b": 2.926433605638978, + "exp3_a": 0.0860553861034103, + "exp3_b": 25.39417577173585, + "exp3_p": 6.462227914321612, + "exp5_p": 7.999995501143407, + "gnls_p": 7.999999766002532, + "gnls_q": 5.893182343508286, + "hill_p": 7.999977254660707, + "pow_er": -0.02668788798634633, + "cnst_er": -0.00005587395876571964, + "exp2_er": -0.14143509239759122, + "exp3_er": -0.13812042333901542, + "exp4_er": -0.16122837373604454, + "exp4_ga": 0.0030000004459148624, + "exp4_tp": -0.4810580307329651, + "exp5_er": -0.014805216328310444, + "exp5_ga": 2.1980811936727713, + "exp5_tp": 0.531614971877592, + "gnls_er": -0.1375957170803842, + "gnls_ga": 27.127146335911107, + "gnls_la": 2743.9146424667124, + "gnls_tp": 2.2219107252768273, + "hill_er": -0.13751350433218543, + "hill_ga": 27.12725380446655, + "hill_tp": 2.221910837751462, + "poly1_a": 0.034174465728783694, + "poly2_a": 0.00000581387559022372, + "poly2_b": 0.0613437971523207, + "pow_aic": 40.730575914149746, + "pow_cov": 1, + "pow_rme": 1.108005849297976, + "pow_top": -0.34860615663608846, + "all_bmed": 0, + "cnst_aic": 36.88069322285861, + "cnst_rme": 1.0933976567217754, + "exp2_aic": 38.30484249916912, + "exp2_cov": 1, + "exp2_rme": 0.990514101299949, + "exp2_top": 1.5320750752034935, + "exp3_aic": 40.29939443038798, + "exp3_cov": 1, + "exp3_rme": 0.9903013443725064, + "exp3_top": 1.5355429734335535, + "exp4_aic": 38.95205323487634, + "exp4_cov": 1, + "exp4_rme": 1.0804367450037984, + "exp4_top": -0.4810580307329651, + "exp5_aic": 42.41773720168884, + "exp5_cov": 1, + "exp5_rme": 1.0680140469043815, + "exp5_top": 0.531614971877592, + "gnls_aic": 44.30150704437108, + "gnls_cov": 1, + "gnls_rme": 0.9903897984324356, + "gnls_top": 2.221910034969751, + "hill_aic": 40.301507223703744, + "hill_cov": 1, + "hill_rme": 0.9903898000887952, + "hill_top": 2.221910837751462, + "poly1_er": -0.04768893180125318, + "poly2_er": -0.1076996570720005, + "pow_a_sd": null, + "pow_ac50": 2.9763787168112, + "pow_p_sd": null, + "all_onesd": 1.0063376519421736, + "exp2_a_sd": 0.0005773152369056387, + "exp2_ac50": 27.9716541234155, + "exp2_b_sd": 3.052516069810458, + "exp3_a_sd": null, + "exp3_ac50": 28.87725370503856, + "exp3_b_sd": null, + "exp3_p_sd": null, + "exp4_ac50": 0.0030000004459148624, + "exp5_ac50": 2.1980811936727713, + "exp5_p_sd": 27.739007083026586, + "gnls_ac50": 27.127144229078343, + "gnls_p_sd": 29.579967451529043, + "gnls_q_sd": 1225546.386380094, + "hill_ac50": 27.12725380446655, + "hill_p_sd": 29.553198047151273, + "poly1_aic": 37.96640788888903, + "poly1_cov": 1, + "poly1_rme": 1.0561318921086802, + "poly1_top": 1.0252339718635106, + "poly2_aic": 38.922635208397416, + "poly2_cov": 1, + "poly2_rme": 1.0160491957368996, + "poly2_top": 1.3933302600334307, + "pow_er_sd": null, + "exp2_er_sd": 0.2650852722288604, + "exp3_er_sd": null, + "exp4_er_sd": 0.2857915198655576, + "exp4_ga_sd": 0.02653437280711767, + "exp4_tp_sd": 0.3119497794295538, + "exp5_er_sd": 0.25462944166653867, + "exp5_ga_sd": 3.03566950705641, + "exp5_tp_sd": 0.7757908917924725, + "gnls_er_sd": 0.2654683915084613, + "gnls_ga_sd": 84.57292159743136, + "gnls_la_sd": 3264804642.55479, + "gnls_tp_sd": 18.273240826272417, + "hill_er_sd": 0.265475852091525, + "hill_ga_sd": 84.26162495005872, + "hill_tp_sd": 18.20715964440844, + "poly1_a_sd": 0.03019381035149349, + "poly1_ac50": 14.999999999999996, + "poly2_a_sd": 0.000005527708582237654, + "poly2_ac50": 21.204230920194803, + "poly2_b_sd": 0.022513901449174135, + "poly1_er_sd": 0.2597243178031879, + "poly2_er_sd": 0.26562527897815486, + "pow_success": 1, + "cnst_success": 1, + "exp2_success": 1, + "exp3_success": 1, + "exp4_success": 1, + "exp5_success": 1, + "gnls_success": 1, + "hill_success": 1, + "poly1_success": 1, + "poly2_success": 1, + "gnls_ac50_loss": 2743.9149317779675 + }, + "mc5Param": { + "a": 0.034174465728783694, + "er": -0.04768893180125318, + "ac5": 1.4999999999999998, + "bmd": 39.724088248922826, + "bmr": 1.3575494924699922, + "mll": -16.983203944444515, + "top": 1.0252339718635106, + "ac10": 2.9999999999999996, + "ac20": 5.999999999999999, + "ac50": 14.999999999999996, + "bmdl": 16.683323649719604, + "rmse": 1.0561318921086802, + "ac1sd": 29.44706319416073, + "caikwt": 0.6324768555183732, + "hitcall": 0.0024578389852192156, + "top_over_cutoff": 0.3633631611252418 + }, + "mc6Param": { + "flag": [ + "Bmd > ac50, indication of high baseline variability" + ], + "mc6MthdId": [ + 9 + ] + } + } +] diff --git a/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-m4id/742051.json b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-m4id/742051.json deleted file mode 100644 index f3039fb3..00000000 --- a/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-m4id/742051.json +++ /dev/null @@ -1,219 +0,0 @@ -{ - "mc5Param": { - "a": 0.46153040816585506, - "p": 0.3000000129695179, - "er": -2.1489938644619224, - "ac5": 0.0004605041361306727, - "bmd": 3.0381729972311597, - "bmr": 0.6441456467828381, - "mll": 5.754150071942078, - "top": 0.9208742581259888, - "ac10": 0.004641590373765303, - "ac20": 0.04678429466205118, - "ac50": 0.9921257565800822, - "bmdl": 2.027009225969621, - "bmdu": 4.647862548676265, - "rmse": 0.13878968514546208, - "ac1sd": 1.1200550091211676, - "caikwt": 0.0000017230735265931015, - "hitcall": 0.00005554137553340851, - "top_over_cutoff": 0.7834319450546824 - }, - "mc6Param": { - "flag": [ - "Multiple points above baseline, inactive", - "Bmd > ac50, indication of high baseline variability" - ], - "mc6MthdId": [ - 8, - 9 - ] - }, - "m4id": 742051, - "spid": "TP0001055F12", - "chid": 20182, - "casn": "80-05-7", - "chnm": "Bisphenol A", - "dtxsid": "DTXSID7020182", - "bmad": 0.19590603113622784, - "respMax": 0.9164766444377165, - "respMin": -0.11247472925841268, - "maxMean": 0.8921865542151857, - "maxMeanConc": 1.0, - "maxMed": 0.8921865542151857, - "maxMedConc": 1.0, - "logcMax": 1.0, - "logcMin": -1.3979400086720375, - "nconc": 6, - "npts": 11, - "nrep": 2.0, - "nmedGtbl": 2, - "tmpi": 188, - "m5id": 5595766, - "modl": "pow", - "hitc": 5.554137553340851E-5, - "fitc": 13, - "coff": 1.175436186817367, - "actp": null, - "modelType": 2, - "chidRep": 0, - "stkc": 100.0, - "stkcUnit": "mM", - "testedConcUnit": "uM", - "mc3Param": { - "logc": [ - -0.3979400086720376, - -0.3979400086720376, - -1.3979400086720375, - -1, - 0.47712125471966244, - 1, - 0, - 1, - -1.3979400086720375, - 0, - -1 - ], - "resp": [ - 0.20163386116965043, - 0.2630344058337938, - -0.11247472925841268, - 0.35049724708413316, - 0.877744249949002, - 0.8678964639926549, - 0.3923174227787603, - 0.9164766444377165, - 0.23266075679027481, - 0.572889668420581, - 0.30742852519224706 - ] - }, - "mc4Param": { - "pow_a": 0.46153040816585506, - "pow_p": 0.3000000129695179, - "exp2_a": 493.4854150122184, - "exp2_b": 5100.6303705683395, - "exp3_a": 0.6196990339124355, - "exp3_b": 12.3801007301216, - "exp3_p": 0.30000002245078705, - "exp5_p": 0.559184008898033, - "gnls_p": 0.6966169844488359, - "gnls_q": 6.036564912084099, - "hill_p": 0.6966252703922315, - "pow_er": -2.1489938644619224, - "cnst_er": -0.7412322648286002, - "exp2_er": -1.309933099584406, - "exp3_er": -1.994302343872302, - "exp4_er": -2.1546592617003633, - "exp4_ga": 0.8212128611446451, - "exp4_tp": 0.9036408577609488, - "exp5_er": -2.1259054497387675, - "exp5_ga": 0.9064524290417632, - "exp5_tp": 0.9800445290952992, - "gnls_er": -2.0946002065058495, - "gnls_ga": 1.193177408945864, - "gnls_la": 360.2532939959973, - "gnls_tp": 1.09977197284731, - "hill_er": -2.0946137683635273, - "hill_ga": 1.1931655056915569, - "hill_tp": 1.0997719732924014, - "poly1_a": 0.09685344872787416, - "poly2_a": 687.0884983487523, - "poly2_b": 7104.757262104685, - "pow_aic": -5.508300143884156, - "pow_cov": 1, - "pow_rme": 0.13878968514546208, - "pow_top": 0.9208742581259888, - "all_bmed": 0, - "cnst_aic": 21.034498265446633, - "cnst_rme": 0.5426961091823314, - "exp2_aic": 12.367502691462542, - "exp2_cov": 1, - "exp2_rme": 0.304434826624701, - "exp2_top": 0.9684479071302802, - "exp3_aic": -0.3405205081886198, - "exp3_cov": 1, - "exp3_rme": 0.15725467669113338, - "exp3_top": 0.9634806035729844, - "exp4_aic": -5.267959950712097, - "exp4_cov": 1, - "exp4_rme": 0.1409207467299889, - "exp4_top": 0.9036408577609488, - "exp5_aic": -4.0882252836045865, - "exp5_cov": 1, - "exp5_rme": 0.12848853653680692, - "exp5_top": 0.9800445290952992, - "gnls_aic": 0.5221238653736275, - "gnls_cov": 1, - "gnls_rme": 0.13142836816523745, - "gnls_top": 1.05792490587989, - "hill_aic": -3.477876128326045, - "hill_cov": 1, - "hill_rme": 0.131428328688881, - "hill_top": 1.0997719732924014, - "poly1_er": -1.310231853290346, - "poly2_er": -1.3100832120170316, - "pow_a_sd": 0.052500833427207794, - "pow_ac50": 0.9921257565800822, - "pow_p_sd": 0.05445323316028355, - "all_onesd": 0.4774986262289386, - "exp2_a_sd": 7931.389911666789, - "exp2_ac50": 5.0024506770906205, - "exp2_b_sd": 81891.02036516219, - "exp3_a_sd": 0.4658106243069582, - "exp3_ac50": 1.958697487205632, - "exp3_b_sd": 18.96581826523416, - "exp3_p_sd": 0.15105220008228848, - "exp4_ac50": 0.8212128611446451, - "exp5_ac50": 0.9064524290417632, - "exp5_p_sd": 0.3968541905965276, - "gnls_ac50": 1.069640799028268, - "gnls_p_sd": null, - "gnls_q_sd": null, - "hill_ac50": 1.1931655056915569, - "hill_p_sd": 0.336413207545768, - "poly1_aic": 10.363619750133951, - "poly1_cov": 1, - "poly1_rme": 0.30437086562058074, - "poly1_top": 0.9685344872787416, - "poly2_aic": 12.36918759992754, - "poly2_cov": 1, - "poly2_rme": 0.30446137477875984, - "poly2_top": 0.9684434742298978, - "pow_er_sd": 0.2742600306262839, - "exp2_er_sd": 0.2620148827774744, - "exp3_er_sd": 0.4343364925218286, - "exp4_er_sd": 0.2798271608769556, - "exp4_ga_sd": 0.20046027515651813, - "exp4_tp_sd": 0.06900733105616962, - "exp5_er_sd": 0.25459801410553173, - "exp5_ga_sd": 0.9030803456678936, - "exp5_tp_sd": 0.30541269481243255, - "gnls_er_sd": null, - "gnls_ga_sd": null, - "gnls_la_sd": null, - "gnls_tp_sd": null, - "hill_er_sd": 0.2562497214754313, - "hill_ga_sd": 1.0745224730121576, - "hill_tp_sd": 0.2762986006515483, - "poly1_a_sd": 0.017687854702934096, - "poly1_ac50": 5, - "poly2_a_sd": 9236.54771190891, - "poly2_ac50": 5.003513821586468, - "poly2_b_sd": 95359.3802243155, - "poly1_er_sd": 0.2619800439124455, - "poly2_er_sd": 0.2620003562948773, - "pow_success": 1, - "cnst_success": 1, - "exp2_success": 1, - "exp3_success": 1, - "exp4_success": 1, - "exp5_success": 1, - "gnls_success": 1, - "hill_success": 1, - "poly1_success": 1, - "poly2_success": 1, - "gnls_ac50_loss": 362.6631259002045 - }, - "aeid": 891 -} diff --git a/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-m4id/906160.json b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-m4id/906160.json new file mode 100644 index 00000000..a845c4a4 --- /dev/null +++ b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-m4id/906160.json @@ -0,0 +1,215 @@ +{ + "aeid": 1390, + "m4id": 906160, + "spid": "TX007998", + "chid": 24827, + "casn": "69-09-0", + "chnm": "Chlorpromazine hydrochloride", + "dtxsid": "DTXSID7024827", + "bmad": 0.9405044150032765, + "respMax": 1.8515926973332988, + "respMin": -1.4281684306667, + "maxMean": 1.8515926973332988, + "maxMeanConc": 0.47712125471966244, + "maxMed": 1.8515926973332988, + "maxMedConc": 0.47712125471966244, + "logcMax": 1.4771212547196624, + "logcMin": -1.5228787452803376, + "nconc": 7, + "npts": 11, + "nrep": 2.0, + "nmedGtbl": 0, + "tmpi": 65, + "m5id": 6384466, + "modl": "poly1", + "hitc": 0.0024578389852192156, + "fitc": 13, + "coff": 2.8215132450098297, + "actp": null, + "modelType": 2, + "chidRep": 1, + "stkc": 20.0, + "stkcUnit": "mM", + "testedConcUnit": "uM", + "mc3Param": { + "logc": [ + -1.5228787452803376, + 1.4771212547196624, + 1, + 1, + 0, + -0.5228787452803376, + -1, + 0, + -0.5228787452803376, + -1, + 0.47712125471966244 + ], + "resp": [ + -0.9813260029999995, + 1.5374573823333009, + -1.4281684306667, + -0.32735703500000035, + -1.3241634073333994, + -1.0260995583333994, + -1.0514509676666997, + -0.5339457896666993, + 0.12475134633329965, + 0.19027474800000022, + 1.8515926973332988 + ] + }, + "mc4Param": { + "pow_a": -0.12566043650192105, + "pow_p": 0.3000000760970656, + "exp2_a": 0.00005409723692181811, + "exp2_b": 2.926433605638978, + "exp3_a": 0.0860553861034103, + "exp3_b": 25.39417577173585, + "exp3_p": 6.462227914321612, + "exp5_p": 7.999995501143407, + "gnls_p": 7.999999766002532, + "gnls_q": 5.893182343508286, + "hill_p": 7.999977254660707, + "pow_er": -0.02668788798634633, + "cnst_er": -0.00005587395876571964, + "exp2_er": -0.14143509239759122, + "exp3_er": -0.13812042333901542, + "exp4_er": -0.16122837373604454, + "exp4_ga": 0.0030000004459148624, + "exp4_tp": -0.4810580307329651, + "exp5_er": -0.014805216328310444, + "exp5_ga": 2.1980811936727713, + "exp5_tp": 0.531614971877592, + "gnls_er": -0.1375957170803842, + "gnls_ga": 27.127146335911107, + "gnls_la": 2743.9146424667124, + "gnls_tp": 2.2219107252768273, + "hill_er": -0.13751350433218543, + "hill_ga": 27.12725380446655, + "hill_tp": 2.221910837751462, + "poly1_a": 0.034174465728783694, + "poly2_a": 0.00000581387559022372, + "poly2_b": 0.0613437971523207, + "pow_aic": 40.730575914149746, + "pow_cov": 1, + "pow_rme": 1.108005849297976, + "pow_top": -0.34860615663608846, + "all_bmed": 0, + "cnst_aic": 36.88069322285861, + "cnst_rme": 1.0933976567217754, + "exp2_aic": 38.30484249916912, + "exp2_cov": 1, + "exp2_rme": 0.990514101299949, + "exp2_top": 1.5320750752034935, + "exp3_aic": 40.29939443038798, + "exp3_cov": 1, + "exp3_rme": 0.9903013443725064, + "exp3_top": 1.5355429734335535, + "exp4_aic": 38.95205323487634, + "exp4_cov": 1, + "exp4_rme": 1.0804367450037984, + "exp4_top": -0.4810580307329651, + "exp5_aic": 42.41773720168884, + "exp5_cov": 1, + "exp5_rme": 1.0680140469043815, + "exp5_top": 0.531614971877592, + "gnls_aic": 44.30150704437108, + "gnls_cov": 1, + "gnls_rme": 0.9903897984324356, + "gnls_top": 2.221910034969751, + "hill_aic": 40.301507223703744, + "hill_cov": 1, + "hill_rme": 0.9903898000887952, + "hill_top": 2.221910837751462, + "poly1_er": -0.04768893180125318, + "poly2_er": -0.1076996570720005, + "pow_a_sd": null, + "pow_ac50": 2.9763787168112, + "pow_p_sd": null, + "all_onesd": 1.0063376519421736, + "exp2_a_sd": 0.0005773152369056387, + "exp2_ac50": 27.9716541234155, + "exp2_b_sd": 3.052516069810458, + "exp3_a_sd": null, + "exp3_ac50": 28.87725370503856, + "exp3_b_sd": null, + "exp3_p_sd": null, + "exp4_ac50": 0.0030000004459148624, + "exp5_ac50": 2.1980811936727713, + "exp5_p_sd": 27.739007083026586, + "gnls_ac50": 27.127144229078343, + "gnls_p_sd": 29.579967451529043, + "gnls_q_sd": 1225546.386380094, + "hill_ac50": 27.12725380446655, + "hill_p_sd": 29.553198047151273, + "poly1_aic": 37.96640788888903, + "poly1_cov": 1, + "poly1_rme": 1.0561318921086802, + "poly1_top": 1.0252339718635106, + "poly2_aic": 38.922635208397416, + "poly2_cov": 1, + "poly2_rme": 1.0160491957368996, + "poly2_top": 1.3933302600334307, + "pow_er_sd": null, + "exp2_er_sd": 0.2650852722288604, + "exp3_er_sd": null, + "exp4_er_sd": 0.2857915198655576, + "exp4_ga_sd": 0.02653437280711767, + "exp4_tp_sd": 0.3119497794295538, + "exp5_er_sd": 0.25462944166653867, + "exp5_ga_sd": 3.03566950705641, + "exp5_tp_sd": 0.7757908917924725, + "gnls_er_sd": 0.2654683915084613, + "gnls_ga_sd": 84.57292159743136, + "gnls_la_sd": 3264804642.55479, + "gnls_tp_sd": 18.273240826272417, + "hill_er_sd": 0.265475852091525, + "hill_ga_sd": 84.26162495005872, + "hill_tp_sd": 18.20715964440844, + "poly1_a_sd": 0.03019381035149349, + "poly1_ac50": 14.999999999999996, + "poly2_a_sd": 0.000005527708582237654, + "poly2_ac50": 21.204230920194803, + "poly2_b_sd": 0.022513901449174135, + "poly1_er_sd": 0.2597243178031879, + "poly2_er_sd": 0.26562527897815486, + "pow_success": 1, + "cnst_success": 1, + "exp2_success": 1, + "exp3_success": 1, + "exp4_success": 1, + "exp5_success": 1, + "gnls_success": 1, + "hill_success": 1, + "poly1_success": 1, + "poly2_success": 1, + "gnls_ac50_loss": 2743.9149317779675 + }, + "mc5Param": { + "a": 0.034174465728783694, + "er": -0.04768893180125318, + "ac5": 1.4999999999999998, + "bmd": 39.724088248922826, + "bmr": 1.3575494924699922, + "mll": -16.983203944444515, + "top": 1.0252339718635106, + "ac10": 2.9999999999999996, + "ac20": 5.999999999999999, + "ac50": 14.999999999999996, + "bmdl": 16.683323649719604, + "rmse": 1.0561318921086802, + "ac1sd": 29.44706319416073, + "caikwt": 0.6324768555183732, + "hitcall": 0.0024578389852192156, + "top_over_cutoff": 0.3633631611252418 + }, + "mc6Param": { + "flag": [ + "Bmd > ac50, indication of high baseline variability" + ], + "mc6MthdId": [ + 9 + ] + } +} diff --git a/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-spid/TP0001055F12.json b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-spid/TP0001055F12.json deleted file mode 100644 index e4e6153e..00000000 --- a/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-spid/TP0001055F12.json +++ /dev/null @@ -1,217 +0,0 @@ -[ - { - "mc5Param": { - "a": -0.01306873535960684, - "er": -2.136507706280431, - "ac5": 0.5000000000000001, - "bmd": 18.769449457369436, - "bmr": 0.24529296780387735, - "mll": 5.563501374344404, - "top": -0.1306873535960684, - "ac10": 1.0000000000000002, - "ac20": 2.0000000000000004, - "ac50": 5, - "bmdl": 9.512878425240512, - "rmse": 0.1411355628562584, - "ac1sd": 13.913602266396914, - "caikwt": 0.5025458808263291, - "hitcall": 9.810625094754255E-8, - "top_over_cutoff": 0.2195696524130058 - }, - "mc6Param": { - "flag": [ - "Bmd > ac50, indication of high baseline variability" - ], - "mc6MthdId": [ - 9 - ] - }, - "m4id": 739695, - "spid": "TP0001055F12", - "chid": 20182, - "casn": "80-05-7", - "chnm": "Bisphenol A", - "dtxsid": "DTXSID7020182", - "bmad": 0.09919961779770327, - "respMax": 0.2791188509977269, - "respMin": -0.18810683333383918, - "maxMean": 0.16761193381969133, - "maxMeanConc": -0.3979400086720376, - "maxMed": 0.16761193381969133, - "maxMedConc": -0.3979400086720376, - "logcMax": 1.0, - "logcMin": -1.3979400086720375, - "nconc": 6, - "npts": 11, - "nrep": 2.0, - "nmedGtbl": 0, - "tmpi": 188, - "m5id": 5593410, - "modl": "poly1", - "hitc": 9.810625094754254E-8, - "fitc": 13, - "coff": 0.5951977067862196, - "actp": null, - "modelType": 2, - "chidRep": 0, - "stkc": 100.0, - "stkcUnit": "mM", - "testedConcUnit": "uM", - "mc3Param": { - "logc": [ - -0.3979400086720376, - -1, - -0.3979400086720376, - -1, - -1.3979400086720375, - 0.47712125471966244, - 1, - 0, - 1, - -1.3979400086720375, - 0 - ], - "resp": [ - 0.0561050166416558, - 0.0028243340365831197, - 0.2791188509977269, - 0.09964190007975987, - -0.05239317472308807, - 0.1364891493912145, - -0.13894349325403332, - 0.10576922249061912, - -0.18810683333383918, - -0.12643303248850363, - 0.226491395765047 - ] - }, - "mc4Param": { - "pow_a": -1.0419901452748115E-9, - "pow_p": 8.195719468765455, - "exp2_a": -0.000008020657993646346, - "exp2_b": 1.0081488305683002, - "exp3_a": -0.17851591559445268, - "exp3_b": 10.556549583626516, - "exp3_p": 7.9483694363768445, - "exp5_p": 7.999984090641454, - "gnls_p": 7.999999433512889, - "gnls_q": 7.999999868358701, - "hill_p": 7.9999898760762465, - "pow_er": -2.224154127442925, - "cnst_er": -2.0092627745700185, - "exp2_er": -2.225708040123303, - "exp3_er": -2.224425887819182, - "exp4_er": -2.1240364515371937, - "exp4_ga": 0.11792712500709591, - "exp4_tp": 0.08489455573191221, - "exp5_er": -2.171779858456515, - "exp5_ga": 0.09852824789221568, - "exp5_tp": 0.09435469694399896, - "gnls_er": -2.409215721065098, - "gnls_ga": 0.11073591633677296, - "gnls_la": 3.6159880073732737, - "gnls_tp": 0.16671079006471917, - "hill_er": -2.1720186051094537, - "hill_ga": 0.09803353623010123, - "hill_tp": 0.09440072781239386, - "poly1_a": -0.01306873535960684, - "poly2_a": -5.269417957001975E-7, - "poly2_b": 0.018313766631435816, - "pow_aic": -6.8326509459464635, - "pow_cov": 1, - "pow_rme": 0.13213200967852803, - "pow_top": -0.16352459431223682, - "all_bmed": 0, - "cnst_aic": -7.147369971314445, - "cnst_rme": 0.14940067883460073, - "exp2_aic": -6.828917132671787, - "exp2_cov": 1, - "exp2_rme": 0.13214949811009086, - "exp2_top": -0.1629406985095443, - "exp3_aic": -4.832659756139471, - "exp3_cov": 1, - "exp3_rme": 0.13213197509289465, - "exp3_top": -0.16350268198368967, - "exp4_aic": -4.925185522837284, - "exp4_cov": 1, - "exp4_rme": 0.14141900566048204, - "exp4_top": 0.08489455573191221, - "exp5_aic": -3.6320932952813663, - "exp5_cov": 1, - "exp5_rme": 0.13902699729526485, - "exp5_top": 0.09435469694399896, - "gnls_aic": -5.940065751343273, - "gnls_cov": 1, - "gnls_rme": 0.1001420603491322, - "gnls_top": 0.16671049681372982, - "hill_aic": -3.631378898610976, - "hill_cov": 1, - "hill_rme": 0.1390355254673785, - "hill_top": 0.09440072781239386, - "poly1_er": -2.136507706280431, - "poly2_er": -2.2060008475381583, - "pow_a_sd": 8.064774993426964E-7, - "pow_ac50": 9.189033846549512, - "pow_p_sd": 0.18522129164916593, - "all_onesd": 0.1818331859183672, - "exp2_a_sd": 0.0000050898964029098985, - "exp2_ac50": 9.301254102363394, - "exp2_b_sd": 0.056465976982944, - "exp3_a_sd": 3.979003442587248, - "exp3_ac50": 9.337383425640624, - "exp3_b_sd": 27.396607448018468, - "exp3_p_sd": 129.25839590180158, - "exp4_ac50": 0.11792712500709591, - "exp5_ac50": 0.09852824789221568, - "exp5_p_sd": 41.93495641250747, - "gnls_ac50": 0.11073586762173893, - "gnls_p_sd": 34.65357457194307, - "gnls_q_sd": 22.96654142812522, - "hill_ac50": 0.09803353623010123, - "hill_p_sd": 34.01111635735984, - "poly1_aic": -7.127002748688808, - "poly1_cov": 1, - "poly1_rme": 0.1411355628562584, - "poly1_top": -0.1306873535960684, - "poly2_aic": -6.451941535337074, - "poly2_cov": 1, - "poly2_rme": 0.13397873935532112, - "poly2_top": -0.15739898408828384, - "pow_er_sd": 0.2759427726798687, - "exp2_er_sd": 0.2757016914770977, - "exp3_er_sd": 0.275900255733028, - "exp4_er_sd": 0.27763409118817706, - "exp4_ga_sd": 0.15622033770694932, - "exp4_tp_sd": 0.061038452736276456, - "exp5_er_sd": 0.2828948492106326, - "exp5_ga_sd": 0.030890235852288596, - "exp5_tp_sd": 0.0576805352571672, - "gnls_er_sd": 0.2593751756378341, - "gnls_ga_sd": 0.05646638780675963, - "gnls_la_sd": 2.387358256194306, - "gnls_tp_sd": 0.05570893358002292, - "hill_er_sd": 0.2828774339235875, - "hill_ga_sd": 0.04329238363253893, - "hill_tp_sd": 0.05763006648910211, - "poly1_a_sd": 0.007769845359223608, - "poly1_ac50": 5, - "poly2_a_sd": 0.000001423027196013611, - "poly2_ac50": 7.068388784616721, - "poly2_b_sd": 0.004146833085610651, - "poly1_er_sd": 0.2737044785697688, - "poly2_er_sd": 0.27615424944167855, - "pow_success": 1, - "cnst_success": 1, - "exp2_success": 1, - "exp3_success": 1, - "exp4_success": 1, - "exp5_success": 1, - "gnls_success": 1, - "hill_success": 1, - "poly1_success": 1, - "poly2_success": 1, - "gnls_ac50_loss": 3.615989598330573 - }, - "aeid": 891 - } -] \ No newline at end of file diff --git a/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-spid/TX007998.json b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-spid/TX007998.json new file mode 100644 index 00000000..021c2671 --- /dev/null +++ b/tests/testthat/ctx/api-ccte.epa.gov/bioactivity/data/search/by-spid/TX007998.json @@ -0,0 +1,217 @@ +[ + { + "aeid": 1390, + "m4id": 906160, + "spid": "TX007998", + "chid": 24827, + "casn": "69-09-0", + "chnm": "Chlorpromazine hydrochloride", + "dtxsid": "DTXSID7024827", + "bmad": 0.9405044150032765, + "respMax": 1.8515926973332988, + "respMin": -1.4281684306667, + "maxMean": 1.8515926973332988, + "maxMeanConc": 0.47712125471966244, + "maxMed": 1.8515926973332988, + "maxMedConc": 0.47712125471966244, + "logcMax": 1.4771212547196624, + "logcMin": -1.5228787452803376, + "nconc": 7, + "npts": 11, + "nrep": 2.0, + "nmedGtbl": 0, + "tmpi": 65, + "m5id": 6384466, + "modl": "poly1", + "hitc": 0.0024578389852192156, + "fitc": 13, + "coff": 2.8215132450098297, + "actp": null, + "modelType": 2, + "chidRep": 1, + "stkc": 20.0, + "stkcUnit": "mM", + "testedConcUnit": "uM", + "mc3Param": { + "logc": [ + -1.5228787452803376, + 1.4771212547196624, + 1, + 1, + 0, + -0.5228787452803376, + -1, + 0, + -0.5228787452803376, + -1, + 0.47712125471966244 + ], + "resp": [ + -0.9813260029999995, + 1.5374573823333009, + -1.4281684306667, + -0.32735703500000035, + -1.3241634073333994, + -1.0260995583333994, + -1.0514509676666997, + -0.5339457896666993, + 0.12475134633329965, + 0.19027474800000022, + 1.8515926973332988 + ] + }, + "mc4Param": { + "pow_a": -0.12566043650192105, + "pow_p": 0.3000000760970656, + "exp2_a": 0.00005409723692181811, + "exp2_b": 2.926433605638978, + "exp3_a": 0.0860553861034103, + "exp3_b": 25.39417577173585, + "exp3_p": 6.462227914321612, + "exp5_p": 7.999995501143407, + "gnls_p": 7.999999766002532, + "gnls_q": 5.893182343508286, + "hill_p": 7.999977254660707, + "pow_er": -0.02668788798634633, + "cnst_er": -0.00005587395876571964, + "exp2_er": -0.14143509239759122, + "exp3_er": -0.13812042333901542, + "exp4_er": -0.16122837373604454, + "exp4_ga": 0.0030000004459148624, + "exp4_tp": -0.4810580307329651, + "exp5_er": -0.014805216328310444, + "exp5_ga": 2.1980811936727713, + "exp5_tp": 0.531614971877592, + "gnls_er": -0.1375957170803842, + "gnls_ga": 27.127146335911107, + "gnls_la": 2743.9146424667124, + "gnls_tp": 2.2219107252768273, + "hill_er": -0.13751350433218543, + "hill_ga": 27.12725380446655, + "hill_tp": 2.221910837751462, + "poly1_a": 0.034174465728783694, + "poly2_a": 0.00000581387559022372, + "poly2_b": 0.0613437971523207, + "pow_aic": 40.730575914149746, + "pow_cov": 1, + "pow_rme": 1.108005849297976, + "pow_top": -0.34860615663608846, + "all_bmed": 0, + "cnst_aic": 36.88069322285861, + "cnst_rme": 1.0933976567217754, + "exp2_aic": 38.30484249916912, + "exp2_cov": 1, + "exp2_rme": 0.990514101299949, + "exp2_top": 1.5320750752034935, + "exp3_aic": 40.29939443038798, + "exp3_cov": 1, + "exp3_rme": 0.9903013443725064, + "exp3_top": 1.5355429734335535, + "exp4_aic": 38.95205323487634, + "exp4_cov": 1, + "exp4_rme": 1.0804367450037984, + "exp4_top": -0.4810580307329651, + "exp5_aic": 42.41773720168884, + "exp5_cov": 1, + "exp5_rme": 1.0680140469043815, + "exp5_top": 0.531614971877592, + "gnls_aic": 44.30150704437108, + "gnls_cov": 1, + "gnls_rme": 0.9903897984324356, + "gnls_top": 2.221910034969751, + "hill_aic": 40.301507223703744, + "hill_cov": 1, + "hill_rme": 0.9903898000887952, + "hill_top": 2.221910837751462, + "poly1_er": -0.04768893180125318, + "poly2_er": -0.1076996570720005, + "pow_a_sd": null, + "pow_ac50": 2.9763787168112, + "pow_p_sd": null, + "all_onesd": 1.0063376519421736, + "exp2_a_sd": 0.0005773152369056387, + "exp2_ac50": 27.9716541234155, + "exp2_b_sd": 3.052516069810458, + "exp3_a_sd": null, + "exp3_ac50": 28.87725370503856, + "exp3_b_sd": null, + "exp3_p_sd": null, + "exp4_ac50": 0.0030000004459148624, + "exp5_ac50": 2.1980811936727713, + "exp5_p_sd": 27.739007083026586, + "gnls_ac50": 27.127144229078343, + "gnls_p_sd": 29.579967451529043, + "gnls_q_sd": 1225546.386380094, + "hill_ac50": 27.12725380446655, + "hill_p_sd": 29.553198047151273, + "poly1_aic": 37.96640788888903, + "poly1_cov": 1, + "poly1_rme": 1.0561318921086802, + "poly1_top": 1.0252339718635106, + "poly2_aic": 38.922635208397416, + "poly2_cov": 1, + "poly2_rme": 1.0160491957368996, + "poly2_top": 1.3933302600334307, + "pow_er_sd": null, + "exp2_er_sd": 0.2650852722288604, + "exp3_er_sd": null, + "exp4_er_sd": 0.2857915198655576, + "exp4_ga_sd": 0.02653437280711767, + "exp4_tp_sd": 0.3119497794295538, + "exp5_er_sd": 0.25462944166653867, + "exp5_ga_sd": 3.03566950705641, + "exp5_tp_sd": 0.7757908917924725, + "gnls_er_sd": 0.2654683915084613, + "gnls_ga_sd": 84.57292159743136, + "gnls_la_sd": 3264804642.55479, + "gnls_tp_sd": 18.273240826272417, + "hill_er_sd": 0.265475852091525, + "hill_ga_sd": 84.26162495005872, + "hill_tp_sd": 18.20715964440844, + "poly1_a_sd": 0.03019381035149349, + "poly1_ac50": 14.999999999999996, + "poly2_a_sd": 0.000005527708582237654, + "poly2_ac50": 21.204230920194803, + "poly2_b_sd": 0.022513901449174135, + "poly1_er_sd": 0.2597243178031879, + "poly2_er_sd": 0.26562527897815486, + "pow_success": 1, + "cnst_success": 1, + "exp2_success": 1, + "exp3_success": 1, + "exp4_success": 1, + "exp5_success": 1, + "gnls_success": 1, + "hill_success": 1, + "poly1_success": 1, + "poly2_success": 1, + "gnls_ac50_loss": 2743.9149317779675 + }, + "mc5Param": { + "a": 0.034174465728783694, + "er": -0.04768893180125318, + "ac5": 1.4999999999999998, + "bmd": 39.724088248922826, + "bmr": 1.3575494924699922, + "mll": -16.983203944444515, + "top": 1.0252339718635106, + "ac10": 2.9999999999999996, + "ac20": 5.999999999999999, + "ac50": 14.999999999999996, + "bmdl": 16.683323649719604, + "rmse": 1.0561318921086802, + "ac1sd": 29.44706319416073, + "caikwt": 0.6324768555183732, + "hitcall": 0.0024578389852192156, + "top_over_cutoff": 0.3633631611252418 + }, + "mc6Param": { + "flag": [ + "Bmd > ac50, indication of high baseline variability" + ], + "mc6MthdId": [ + 9 + ] + } + } +] From c509953bcccd940d59eeff02f04da2321c9739e1 Mon Sep 17 00:00:00 2001 From: Carter Thunes Date: Wed, 14 Aug 2024 12:06:13 -0400 Subject: [PATCH 31/32] Added data.R descriptions for each of the 3 new stored .rdas --- R/data.R | 256 +++++++++++++++++++++++++++++++++++++++++++++++- man/mc_test.Rd | 154 +++++++++++++++++++++++++++++ man/sc_test.Rd | 114 +++++++++++++++++++++ man/test_api.Rd | 30 ++++++ 4 files changed, 553 insertions(+), 1 deletion(-) create mode 100644 man/mc_test.Rd create mode 100644 man/sc_test.Rd create mode 100644 man/test_api.Rd diff --git a/R/data.R b/R/data.R index 7e34358e..b5da029c 100644 --- a/R/data.R +++ b/R/data.R @@ -490,4 +490,258 @@ #' \item{scagg}{Column names returned requesting sc lvl "agg" data} #' } #' @source ToxCast database -"load_data_columns" \ No newline at end of file +"load_data_columns" + + +#' List of lists containing queries sent to tcplQuery associated with each test +#' case. Each list also contains the associated ids with each case. Only meant +#' to be used with automated testing with mocking for mc data. +#' @format A list with 30 items: +#' \describe{ +#' \item{tcplConfQuery}{Data table with 1 row and 2 columns used for each test +#' case for establishing connection using tcplConf. This data table mocks the +#' response one would get from connecting with invitrodb.} +#' \item{mc0_by_m0id}{List containing the queries used for loading mc0 data by +#' m0id via tcplLoadData. Each query has an associated data table response for +#' mocking an actual connection. Contains one 'm0id' labeled item storing the +#' id used to load the data, for use in tests.} +#' \item{mc0_by_acid}{List containing the queries used for loading mc0 data by +#' acid via tcplLoadData. Each query has an associated data table response for +#' mocking an actual connection. Contains one 'acid' labeled item storing the +#' id used to load the data, for use in tests.} +#' \item{mc1_by_m1id}{List containing the queries used for loading mc1 data by +#' m1id via tcplLoadData. Each query has an associated data table response for +#' mocking an actual connection. Contains one 'm1id' labeled item storing the +#' id used to load the data, for use in tests.} +#' \item{mc1_by_acid}{List containing the queries used for loading mc1 data by +#' acid via tcplLoadData. Each query has an associated data table response for +#' mocking an actual connection. Contains one 'acid' labeled item storing the +#' id used to load the data, for use in tests.} +#' \item{mc2_by_m2id}{List containing the queries used for loading mc2 data by +#' m2id via tcplLoadData. Each query has an associated data table response for +#' mocking an actual connection. Contains one 'm2id' labeled item storing the +#' id used to load the data, for use in tests.} +#' \item{mc2_by_acid}{List containing the queries used for loading mc2 data by +#' acid via tcplLoadData. Each query has an associated data table response for +#' mocking an actual connection. Contains one 'acid' labeled item storing the +#' id used to load the data, for use in tests.} +#' \item{mc3_by_m3id}{List containing the queries used for loading mc3 data by +#' m3id via tcplLoadData. Each query has an associated data table response for +#' mocking an actual connection. Contains one 'm3id' labeled item storing the +#' id used to load the data, for use in tests.} +#' \item{mc3_by_aeid}{List containing the queries used for loading mc3 data by +#' aeid via tcplLoadData. Each query has an associated data table response for +#' mocking an actual connection. Contains one 'aeid' labeled item storing the +#' id used to load the data, for use in tests.} +#' \item{mc4_by_m4id}{List containing the queries used for loading mc4 data by +#' m4id via tcplLoadData. Each query has an associated data table response for +#' mocking an actual connection. Contains one 'm4id' labeled item storing the +#' id used to load the data, for use in tests.} +#' \item{mc4_by_aeid}{List containing the queries used for loading mc4 data by +#' aeid via tcplLoadData. Each query has an associated data table response for +#' mocking an actual connection. Contains one 'aeid' labeled item storing the +#' id used to load the data, for use in tests.} +#' \item{mc5_by_m5id}{List containing the queries used for loading mc5 data by +#' m5id via tcplLoadData. Each query has an associated data table response for +#' mocking an actual connection. Contains one 'm5id' labeled item storing the +#' id used to load the data, for use in tests.} +#' \item{mc5_by_aeid}{List containing the queries used for loading mc5 data by +#' aeid via tcplLoadData. Each query has an associated data table response for +#' mocking an actual connection. Contains one 'aeid' labeled item storing the +#' id used to load the data, for use in tests.} +#' \item{mc6_by_m6id}{List containing the queries used for loading mc6 data by +#' m6id via tcplLoadData. Each query has an associated data table response for +#' mocking an actual connection. Contains one 'm6id' labeled item storing the +#' id used to load the data, for use in tests.} +#' \item{mc6_by_aeid}{List containing the queries used for loading mc6 data by +#' aeid via tcplLoadData. Each query has an associated data table response for +#' mocking an actual connection. Contains one 'aeid' labeled item storing the +#' id used to load the data, for use in tests.} +#' \item{mc7_by_m7id}{List containing the queries used for loading mc7 data by +#' m7id via tcplLoadData. Each query has an associated data table response for +#' mocking an actual connection. Contains one 'm7id' labeled item storing the +#' id used to load the data, for use in tests.} +#' \item{mc7_by_aeid}{List containing the queries used for loading mc7 data by +#' aeid via tcplLoadData. Each query has an associated data table response for +#' mocking an actual connection. Contains one 'aeid' labeled item storing the +#' id used to load the data, for use in tests.} +#' \item{mcagg_by_aeid}{List containing the queries used for loading mc 'agg' +#' data by aeid via tcplLoadData. Each query has an associated data table +#' response for mocking an actual connection. Contains one 'aeid' labeled item +#' storing the id used to load the data, for use in tests.} +#' \item{plot_single_m4id}{List containing the queries used for loading and +#' plotting mc data by m4id via tcplPlot. Each query has an associated data +#' table response for mocking an actual connection. Contains one 'm4id' +#' labeled item storing the id used to load the data, for use in tests.} +#' \item{plot_multiple_m4id}{List containing the queries used for loading and +#' plotting mc data by multiple m4ids via tcplPlot. Each query has an +#' associated data table response for mocking an actual connection. Contains +#' one 'm4id' labeled item storing the ids used to load the data, for use in +#' tests.} +#' \item{plot_single_aeid}{List containing the queries used for loading and +#' plotting mc data by aeid via tcplPlot. Each query has an associated data +#' table response for mocking an actual connection. Contains one 'aeid' +#' labeled item storing the id used to load the data, for use in tests.} +#' \item{plot_multiple_aeid}{List containing the queries used for loading and +#' plotting mc data by multiple aeids via tcplPlot. Each query has an +#' associated data table response for mocking an actual connection. Contains +#' one 'aeid' labeled item storing the ids used to load the data, for use in +#' tests.} +#' \item{plot_single_spid}{List containing the queries used for loading and +#' plotting mc data by spid/aeid via tcplPlot. Each query has an associated +#' data table response for mocking an actual connection. Contains 'spid' and +#' 'aeid' labeled items storing the ids used to load the data, for use in +#' tests.} +#' \item{plot_multiple_spid}{List containing the queries used for loading and +#' plotting mc data by multiple spids/aeid via tcplPlot. Each query has an +#' associated data table response for mocking an actual connection. Contains +#' 'spid' and 'aeid' labeled items storing the ids used to load the data, for +#' use in tests.} +#' \item{plot_single_m4id_compare}{List containing the queries used for +#' loading and plotting compared mc data by m4id via tcplPlot. Each query has +#' an associated data table response for mocking an actual connection. +#' Contains 'm4id' and 'compare.m4id' labeled items storing the ids used to +#' load the data, for use in tests.} +#' \item{plot_multiple_m4id_compare}{List containing the queries used for loading and +#' plotting compared mc data by multiple m4ids via tcplPlot. Each query has an +#' associated data table response for mocking an actual connection. Contains +#' 'm4id' and 'compare.m4id' labeled items storing the ids used to load the +#' data, for use in tests.} +#' \item{plot_single_aeid_compare}{List containing the queries used for +#' loading and plotting compared mc data by aeid via tcplPlot. Each query has +#' an associated data table response for mocking an actual connection. +#' Contains 'aeid' and 'compare.aeid' labeled items storing the ids used to +#' load the data, for use in tests.} +#' \item{plot_multiple_aeid_compare}{List containing the queries used for +#' loading and plotting compared mc data by multiple aeids via tcplPlot. Each +#' query has an associated data table response for mocking an actual +#' connection. Contains 'aeid' and 'compare.aeid' labeled items storing the +#' ids used to load the data, for use in tests.} +#' \item{plot_single_spid_compare}{List containing the queries used for +#' loading and plotting compared mc data by spid/aeid via tcplPlot. Each query +#' has an associated data table response for mocking an actual connection. +#' Contains 'spid', 'compare.spid', 'aeid', and 'compare.aeid' labeled items +#' storing the ids used to load the data, for use in tests.} +#' \item{plot_multiple_spid_compare}{List containing the queries used for +#' loading and plotting compared mc data by multiple spids/aeid via tcplPlot. +#' Each query has an associated data table response for mocking an actual +#' connection. Contains 'spid', 'compare.spid', 'aeid', and 'compare.aeid' +#' labeled items storing the ids used to load the data, for use in tests.} +#' } +#' @source ToxCast database +"mc_test" + + +#' List of lists containing queries sent to tcplQuery associated with each test +#' case. Each list also contains the associated ids with each case. Only meant +#' to be used with automated testing with mocking for sc data. +#' @format A list with 20 items: +#' \describe{ +#' \item{tcplConfQuery}{Data table with 1 row and 2 columns used for each test +#' case for establishing connection using tcplConf. This data table mocks the +#' response one would get from connecting with invitrodb.} +#' \item{sc0_by_s0id}{List containing the queries used for loading sc0 data by +#' s0id via tcplLoadData. Each query has an associated data table response for +#' mocking an actual connection. Contains one 's0id' labeled item storing the +#' id used to load the data, for use in tests.} +#' \item{sc0_by_acid}{List containing the queries used for loading sc0 data by +#' acid via tcplLoadData. Each query has an associated data table response for +#' mocking an actual connection. Contains one 'acid' labeled item storing the +#' id used to load the data, for use in tests.} +#' \item{sc1_by_s1id}{List containing the queries used for loading sc1 data by +#' s1id via tcplLoadData. Each query has an associated data table response for +#' mocking an actual connection. Contains one 's1id' labeled item storing the +#' id used to load the data, for use in tests.} +#' \item{sc1_by_acid}{List containing the queries used for loading sc1 data by +#' acid via tcplLoadData. Each query has an associated data table response for +#' mocking an actual connection. Contains one 'acid' labeled item storing the +#' id used to load the data, for use in tests.} +#' \item{sc2_by_s2id}{List containing the queries used for loading sc2 data by +#' s2id via tcplLoadData. Each query has an associated data table response for +#' mocking an actual connection. Contains one 's2id' labeled item storing the +#' id used to load the data, for use in tests.} +#' \item{sc2_by_aeid}{List containing the queries used for loading sc2 data by +#' aeid via tcplLoadData. Each query has an associated data table response for +#' mocking an actual connection. Contains one 'aeid' labeled item storing the +#' id used to load the data, for use in tests.} +#' \item{scagg_by_aeid}{List containing the queries used for loading sc 'agg' +#' data by aeid via tcplLoadData. Each query has an associated data table +#' response for mocking an actual connection. Contains one 'aeid' labeled item +#' storing the id used to load the data, for use in tests.} +#' \item{plot_single_s2id}{List containing the queries used for loading and +#' plotting sc data by s2id via tcplPlot. Each query has an associated data +#' table response for mocking an actual connection. Contains one 's2id' +#' labeled item storing the id used to load the data, for use in tests.} +#' \item{plot_multiple_s2id}{List containing the queries used for loading and +#' plotting sc data by multiple s2ids via tcplPlot. Each query has an +#' associated data table response for mocking an actual connection. Contains +#' one 's2id' labeled item storing the ids used to load the data, for use in +#' tests.} +#' \item{plot_single_aeid}{List containing the queries used for loading and +#' plotting sc data by aeid via tcplPlot. Each query has an associated data +#' table response for mocking an actual connection. Contains one 'aeid' +#' labeled item storing the id used to load the data, for use in tests.} +#' \item{plot_multiple_aeid}{List containing the queries used for loading and +#' plotting sc data by multiple aeids via tcplPlot. Each query has an +#' associated data table response for mocking an actual connection. Contains +#' one 'aeid' labeled item storing the ids used to load the data, for use in +#' tests.} +#' \item{plot_single_spid}{List containing the queries used for loading and +#' plotting sc data by spid/aeid via tcplPlot. Each query has an associated +#' data table response for mocking an actual connection. Contains 'spid' and +#' 'aeid' labeled items storing the ids used to load the data, for use in +#' tests.} +#' \item{plot_multiple_spid}{List containing the queries used for loading and +#' plotting sc data by multiple spids/aeid via tcplPlot. Each query has an +#' associated data table response for mocking an actual connection. Contains +#' 'spid' and 'aeid' labeled items storing the ids used to load the data, for +#' use in tests.} +#' \item{plot_single_s2id_compare}{List containing the queries used for +#' loading and plotting compared sc data by s2id via tcplPlot. Each query has +#' an associated data table response for mocking an actual connection. +#' Contains 's2id' and 'compare.s2id' labeled items storing the ids used to +#' load the data, for use in tests.} +#' \item{plot_multiple_s2id_compare}{List containing the queries used for loading and +#' plotting compared sc data by multiple s2ids via tcplPlot. Each query has an +#' associated data table response for mocking an actual connection. Contains +#' 's2id' and 'compare.s2id' labeled items storing the ids used to load the +#' data, for use in tests.} +#' \item{plot_single_aeid_compare}{List containing the queries used for +#' loading and plotting compared sc data by aeid via tcplPlot. Each query has +#' an associated data table response for mocking an actual connection. +#' Contains 'aeid' and 'compare.aeid' labeled items storing the ids used to +#' load the data, for use in tests.} +#' \item{plot_multiple_aeid_compare}{List containing the queries used for +#' loading and plotting compared sc data by multiple aeids via tcplPlot. Each +#' query has an associated data table response for mocking an actual +#' connection. Contains 'aeid' and 'compare.aeid' labeled items storing the +#' ids used to load the data, for use in tests.} +#' \item{plot_single_spid_compare}{List containing the queries used for +#' loading and plotting compared sc data by spid/aeid via tcplPlot. Each query +#' has an associated data table response for mocking an actual connection. +#' Contains 'spid', 'compare.spid', 'aeid', and 'compare.aeid' labeled items +#' storing the ids used to load the data, for use in tests.} +#' \item{plot_multiple_spid_compare}{List containing the queries used for +#' loading and plotting compared sc data by multiple spids/aeid via tcplPlot. +#' Each query has an associated data table response for mocking an actual +#' connection. Contains 'spid', 'compare.spid', 'aeid', and 'compare.aeid' +#' labeled items storing the ids used to load the data, for use in tests.} +#' } +#' @source ToxCast database +"sc_test" + + +#' List containing ids used for different automated tests of tcpl integration +#' with the CTX APIs, randomly selected from what is available via API. +#' @format A list with 7 items: +#' \describe{ +#' \item{aeid}{Randomly selected assay component endpoint id} +#' \item{acid}{Assay component id associated with the above aeid} +#' \item{aid}{Assay id associated with the above aeid} +#' \item{asid}{Assay source id associated with the above aeid} +#' \item{dtxsid}{dsstox substance id of one sample from the above aeid} +#' \item{spid}{Sample id of one (the same) sample from the above aeid} +#' \item{m4id}{Level 4 id of one (the same) sample from the above aeid} +#' } +#' @source CTX Bioactivity API +"test_api" \ No newline at end of file diff --git a/man/mc_test.Rd b/man/mc_test.Rd new file mode 100644 index 00000000..b98db1de --- /dev/null +++ b/man/mc_test.Rd @@ -0,0 +1,154 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/data.R +\docType{data} +\name{mc_test} +\alias{mc_test} +\title{List of lists containing queries sent to tcplQuery associated with each test +case. Each list also contains the associated ids with each case. Only meant +to be used with automated testing with mocking for mc data.} +\format{ +A list with 30 items: +\describe{ + \item{tcplConfQuery}{Data table with 1 row and 2 columns used for each test + case for establishing connection using tcplConf. This data table mocks the + response one would get from connecting with invitrodb.} + \item{mc0_by_m0id}{List containing the queries used for loading mc0 data by + m0id via tcplLoadData. Each query has an associated data table response for + mocking an actual connection. Contains one 'm0id' labeled item storing the + id used to load the data, for use in tests.} + \item{mc0_by_acid}{List containing the queries used for loading mc0 data by + acid via tcplLoadData. Each query has an associated data table response for + mocking an actual connection. Contains one 'acid' labeled item storing the + id used to load the data, for use in tests.} + \item{mc1_by_m1id}{List containing the queries used for loading mc1 data by + m1id via tcplLoadData. Each query has an associated data table response for + mocking an actual connection. Contains one 'm1id' labeled item storing the + id used to load the data, for use in tests.} + \item{mc1_by_acid}{List containing the queries used for loading mc1 data by + acid via tcplLoadData. Each query has an associated data table response for + mocking an actual connection. Contains one 'acid' labeled item storing the + id used to load the data, for use in tests.} + \item{mc2_by_m2id}{List containing the queries used for loading mc2 data by + m2id via tcplLoadData. Each query has an associated data table response for + mocking an actual connection. Contains one 'm2id' labeled item storing the + id used to load the data, for use in tests.} + \item{mc2_by_acid}{List containing the queries used for loading mc2 data by + acid via tcplLoadData. Each query has an associated data table response for + mocking an actual connection. Contains one 'acid' labeled item storing the + id used to load the data, for use in tests.} + \item{mc3_by_m3id}{List containing the queries used for loading mc3 data by + m3id via tcplLoadData. Each query has an associated data table response for + mocking an actual connection. Contains one 'm3id' labeled item storing the + id used to load the data, for use in tests.} + \item{mc3_by_aeid}{List containing the queries used for loading mc3 data by + aeid via tcplLoadData. Each query has an associated data table response for + mocking an actual connection. Contains one 'aeid' labeled item storing the + id used to load the data, for use in tests.} + \item{mc4_by_m4id}{List containing the queries used for loading mc4 data by + m4id via tcplLoadData. Each query has an associated data table response for + mocking an actual connection. Contains one 'm4id' labeled item storing the + id used to load the data, for use in tests.} + \item{mc4_by_aeid}{List containing the queries used for loading mc4 data by + aeid via tcplLoadData. Each query has an associated data table response for + mocking an actual connection. Contains one 'aeid' labeled item storing the + id used to load the data, for use in tests.} + \item{mc5_by_m5id}{List containing the queries used for loading mc5 data by + m5id via tcplLoadData. Each query has an associated data table response for + mocking an actual connection. Contains one 'm5id' labeled item storing the + id used to load the data, for use in tests.} + \item{mc5_by_aeid}{List containing the queries used for loading mc5 data by + aeid via tcplLoadData. Each query has an associated data table response for + mocking an actual connection. Contains one 'aeid' labeled item storing the + id used to load the data, for use in tests.} + \item{mc6_by_m6id}{List containing the queries used for loading mc6 data by + m6id via tcplLoadData. Each query has an associated data table response for + mocking an actual connection. Contains one 'm6id' labeled item storing the + id used to load the data, for use in tests.} + \item{mc6_by_aeid}{List containing the queries used for loading mc6 data by + aeid via tcplLoadData. Each query has an associated data table response for + mocking an actual connection. Contains one 'aeid' labeled item storing the + id used to load the data, for use in tests.} + \item{mc7_by_m7id}{List containing the queries used for loading mc7 data by + m7id via tcplLoadData. Each query has an associated data table response for + mocking an actual connection. Contains one 'm7id' labeled item storing the + id used to load the data, for use in tests.} + \item{mc7_by_aeid}{List containing the queries used for loading mc7 data by + aeid via tcplLoadData. Each query has an associated data table response for + mocking an actual connection. Contains one 'aeid' labeled item storing the + id used to load the data, for use in tests.} + \item{mcagg_by_aeid}{List containing the queries used for loading mc 'agg' + data by aeid via tcplLoadData. Each query has an associated data table + response for mocking an actual connection. Contains one 'aeid' labeled item + storing the id used to load the data, for use in tests.} + \item{plot_single_m4id}{List containing the queries used for loading and + plotting mc data by m4id via tcplPlot. Each query has an associated data + table response for mocking an actual connection. Contains one 'm4id' + labeled item storing the id used to load the data, for use in tests.} + \item{plot_multiple_m4id}{List containing the queries used for loading and + plotting mc data by multiple m4ids via tcplPlot. Each query has an + associated data table response for mocking an actual connection. Contains + one 'm4id' labeled item storing the ids used to load the data, for use in + tests.} + \item{plot_single_aeid}{List containing the queries used for loading and + plotting mc data by aeid via tcplPlot. Each query has an associated data + table response for mocking an actual connection. Contains one 'aeid' + labeled item storing the id used to load the data, for use in tests.} + \item{plot_multiple_aeid}{List containing the queries used for loading and + plotting mc data by multiple aeids via tcplPlot. Each query has an + associated data table response for mocking an actual connection. Contains + one 'aeid' labeled item storing the ids used to load the data, for use in + tests.} + \item{plot_single_spid}{List containing the queries used for loading and + plotting mc data by spid/aeid via tcplPlot. Each query has an associated + data table response for mocking an actual connection. Contains 'spid' and + 'aeid' labeled items storing the ids used to load the data, for use in + tests.} + \item{plot_multiple_spid}{List containing the queries used for loading and + plotting mc data by multiple spids/aeid via tcplPlot. Each query has an + associated data table response for mocking an actual connection. Contains + 'spid' and 'aeid' labeled items storing the ids used to load the data, for + use in tests.} + \item{plot_single_m4id_compare}{List containing the queries used for + loading and plotting compared mc data by m4id via tcplPlot. Each query has + an associated data table response for mocking an actual connection. + Contains 'm4id' and 'compare.m4id' labeled items storing the ids used to + load the data, for use in tests.} + \item{plot_multiple_m4id_compare}{List containing the queries used for loading and + plotting compared mc data by multiple m4ids via tcplPlot. Each query has an + associated data table response for mocking an actual connection. Contains + 'm4id' and 'compare.m4id' labeled items storing the ids used to load the + data, for use in tests.} + \item{plot_single_aeid_compare}{List containing the queries used for + loading and plotting compared mc data by aeid via tcplPlot. Each query has + an associated data table response for mocking an actual connection. + Contains 'aeid' and 'compare.aeid' labeled items storing the ids used to + load the data, for use in tests.} + \item{plot_multiple_aeid_compare}{List containing the queries used for + loading and plotting compared mc data by multiple aeids via tcplPlot. Each + query has an associated data table response for mocking an actual + connection. Contains 'aeid' and 'compare.aeid' labeled items storing the + ids used to load the data, for use in tests.} + \item{plot_single_spid_compare}{List containing the queries used for + loading and plotting compared mc data by spid/aeid via tcplPlot. Each query + has an associated data table response for mocking an actual connection. + Contains 'spid', 'compare.spid', 'aeid', and 'compare.aeid' labeled items + storing the ids used to load the data, for use in tests.} + \item{plot_multiple_spid_compare}{List containing the queries used for + loading and plotting compared mc data by multiple spids/aeid via tcplPlot. + Each query has an associated data table response for mocking an actual + connection. Contains 'spid', 'compare.spid', 'aeid', and 'compare.aeid' + labeled items storing the ids used to load the data, for use in tests.} +} +} +\source{ +ToxCast database +} +\usage{ +mc_test +} +\description{ +List of lists containing queries sent to tcplQuery associated with each test +case. Each list also contains the associated ids with each case. Only meant +to be used with automated testing with mocking for mc data. +} +\keyword{datasets} diff --git a/man/sc_test.Rd b/man/sc_test.Rd new file mode 100644 index 00000000..841e9a41 --- /dev/null +++ b/man/sc_test.Rd @@ -0,0 +1,114 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/data.R +\docType{data} +\name{sc_test} +\alias{sc_test} +\title{List of lists containing queries sent to tcplQuery associated with each test +case. Each list also contains the associated ids with each case. Only meant +to be used with automated testing with mocking for sc data.} +\format{ +A list with 20 items: +\describe{ + \item{tcplConfQuery}{Data table with 1 row and 2 columns used for each test + case for establishing connection using tcplConf. This data table mocks the + response one would get from connecting with invitrodb.} + \item{sc0_by_s0id}{List containing the queries used for loading sc0 data by + s0id via tcplLoadData. Each query has an associated data table response for + mocking an actual connection. Contains one 's0id' labeled item storing the + id used to load the data, for use in tests.} + \item{sc0_by_acid}{List containing the queries used for loading sc0 data by + acid via tcplLoadData. Each query has an associated data table response for + mocking an actual connection. Contains one 'acid' labeled item storing the + id used to load the data, for use in tests.} + \item{sc1_by_s1id}{List containing the queries used for loading sc1 data by + s1id via tcplLoadData. Each query has an associated data table response for + mocking an actual connection. Contains one 's1id' labeled item storing the + id used to load the data, for use in tests.} + \item{sc1_by_acid}{List containing the queries used for loading sc1 data by + acid via tcplLoadData. Each query has an associated data table response for + mocking an actual connection. Contains one 'acid' labeled item storing the + id used to load the data, for use in tests.} + \item{sc2_by_s2id}{List containing the queries used for loading sc2 data by + s2id via tcplLoadData. Each query has an associated data table response for + mocking an actual connection. Contains one 's2id' labeled item storing the + id used to load the data, for use in tests.} + \item{sc2_by_aeid}{List containing the queries used for loading sc2 data by + aeid via tcplLoadData. Each query has an associated data table response for + mocking an actual connection. Contains one 'aeid' labeled item storing the + id used to load the data, for use in tests.} + \item{scagg_by_aeid}{List containing the queries used for loading sc 'agg' + data by aeid via tcplLoadData. Each query has an associated data table + response for mocking an actual connection. Contains one 'aeid' labeled item + storing the id used to load the data, for use in tests.} + \item{plot_single_s2id}{List containing the queries used for loading and + plotting sc data by s2id via tcplPlot. Each query has an associated data + table response for mocking an actual connection. Contains one 's2id' + labeled item storing the id used to load the data, for use in tests.} + \item{plot_multiple_s2id}{List containing the queries used for loading and + plotting sc data by multiple s2ids via tcplPlot. Each query has an + associated data table response for mocking an actual connection. Contains + one 's2id' labeled item storing the ids used to load the data, for use in + tests.} + \item{plot_single_aeid}{List containing the queries used for loading and + plotting sc data by aeid via tcplPlot. Each query has an associated data + table response for mocking an actual connection. Contains one 'aeid' + labeled item storing the id used to load the data, for use in tests.} + \item{plot_multiple_aeid}{List containing the queries used for loading and + plotting sc data by multiple aeids via tcplPlot. Each query has an + associated data table response for mocking an actual connection. Contains + one 'aeid' labeled item storing the ids used to load the data, for use in + tests.} + \item{plot_single_spid}{List containing the queries used for loading and + plotting sc data by spid/aeid via tcplPlot. Each query has an associated + data table response for mocking an actual connection. Contains 'spid' and + 'aeid' labeled items storing the ids used to load the data, for use in + tests.} + \item{plot_multiple_spid}{List containing the queries used for loading and + plotting sc data by multiple spids/aeid via tcplPlot. Each query has an + associated data table response for mocking an actual connection. Contains + 'spid' and 'aeid' labeled items storing the ids used to load the data, for + use in tests.} + \item{plot_single_s2id_compare}{List containing the queries used for + loading and plotting compared sc data by s2id via tcplPlot. Each query has + an associated data table response for mocking an actual connection. + Contains 's2id' and 'compare.s2id' labeled items storing the ids used to + load the data, for use in tests.} + \item{plot_multiple_s2id_compare}{List containing the queries used for loading and + plotting compared sc data by multiple s2ids via tcplPlot. Each query has an + associated data table response for mocking an actual connection. Contains + 's2id' and 'compare.s2id' labeled items storing the ids used to load the + data, for use in tests.} + \item{plot_single_aeid_compare}{List containing the queries used for + loading and plotting compared sc data by aeid via tcplPlot. Each query has + an associated data table response for mocking an actual connection. + Contains 'aeid' and 'compare.aeid' labeled items storing the ids used to + load the data, for use in tests.} + \item{plot_multiple_aeid_compare}{List containing the queries used for + loading and plotting compared sc data by multiple aeids via tcplPlot. Each + query has an associated data table response for mocking an actual + connection. Contains 'aeid' and 'compare.aeid' labeled items storing the + ids used to load the data, for use in tests.} + \item{plot_single_spid_compare}{List containing the queries used for + loading and plotting compared sc data by spid/aeid via tcplPlot. Each query + has an associated data table response for mocking an actual connection. + Contains 'spid', 'compare.spid', 'aeid', and 'compare.aeid' labeled items + storing the ids used to load the data, for use in tests.} + \item{plot_multiple_spid_compare}{List containing the queries used for + loading and plotting compared sc data by multiple spids/aeid via tcplPlot. + Each query has an associated data table response for mocking an actual + connection. Contains 'spid', 'compare.spid', 'aeid', and 'compare.aeid' + labeled items storing the ids used to load the data, for use in tests.} +} +} +\source{ +ToxCast database +} +\usage{ +sc_test +} +\description{ +List of lists containing queries sent to tcplQuery associated with each test +case. Each list also contains the associated ids with each case. Only meant +to be used with automated testing with mocking for sc data. +} +\keyword{datasets} diff --git a/man/test_api.Rd b/man/test_api.Rd new file mode 100644 index 00000000..9f352c5d --- /dev/null +++ b/man/test_api.Rd @@ -0,0 +1,30 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/data.R +\docType{data} +\name{test_api} +\alias{test_api} +\title{List containing ids used for different automated tests of tcpl integration +with the CTX APIs, randomly selected from what is available via API.} +\format{ +A list with 7 items: +\describe{ + \item{aeid}{Randomly selected assay component endpoint id} + \item{acid}{Assay component id associated with the above aeid} + \item{aid}{Assay id associated with the above aeid} + \item{asid}{Assay source id associated with the above aeid} + \item{dtxsid}{dsstox substance id of one sample from the above aeid} + \item{spid}{Sample id of one (the same) sample from the above aeid} + \item{m4id}{Level 4 id of one (the same) sample from the above aeid} +} +} +\source{ +CTX Bioactivity API +} +\usage{ +test_api +} +\description{ +List containing ids used for different automated tests of tcpl integration +with the CTX APIs, randomly selected from what is available via API. +} +\keyword{datasets} From f489c040c40f14366392947315321db54e9f8806 Mon Sep 17 00:00:00 2001 From: Jason Brown Date: Tue, 20 Aug 2024 15:50:08 -0400 Subject: [PATCH 32/32] skipping old snapshot style test --- .../_snaps/tcplPlot/test-output-482273.svg | 738 ------------------ tests/testthat/test-tcplPlot.R | 2 +- 2 files changed, 1 insertion(+), 739 deletions(-) delete mode 100644 tests/testthat/_snaps/tcplPlot/test-output-482273.svg diff --git a/tests/testthat/_snaps/tcplPlot/test-output-482273.svg b/tests/testthat/_snaps/tcplPlot/test-output-482273.svg deleted file mode 100644 index 7f91b287..00000000 --- a/tests/testthat/_snaps/tcplPlot/test-output-482273.svg +++ /dev/null @@ -1,738 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -0.0 -0.3 -0.6 - - - - - - - -0.1 -1.0 -10.0 -100.0 -Concentration (uM) -Log2 Fold Induction - - - - - - - - - - - - - - - - - - - -Winning Model -(exp2) -Losing Models -Cutoff -BMD -AC50 -DTXSID80379721 1H,1H,6H,6H-Perfluorohexane-1,6-diol diacrylate -SPID:01504209 AEID:80 AENM:ATG_GLI_CIS -M4ID:7918855 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Hitcall - - - - -0.999 - - - - -model - - - - -poly2 - - - - -BMD - - - - -49.542 - - - - -aic - - - - -exp2 - - - - -AC50 - - - - -81.061 - - - - -rme - - - - -pow - - - - -hill - - - - -exp3 - - - - -exp5 - - - - -gnls - - - - -poly1 - - - - -exp4 - - - - -cnst - - - - --2.1e+01 - - - - --2.1e+01 - - - - --2.0e+01 - - - - --1.9e+01 - - - - --1.9e+01 - - - - --1.9e+01 - - - - --1.5e+01 - - - - --1.4e+01 - - - - --6.0e+00 - - - - -4.350 - - - - -0.095 - - - - -0.093 - - - - -0.096 - - - - -0.094 - - - - -0.094 - - - - -0.094 - - - - -0.094 - - - - -0.122 - - - - -0.149 - - - - -0.332 - - - - diff --git a/tests/testthat/test-tcplPlot.R b/tests/testthat/test-tcplPlot.R index 1f67e885..8b28419a 100644 --- a/tests/testthat/test-tcplPlot.R +++ b/tests/testthat/test-tcplPlot.R @@ -13,7 +13,7 @@ test_that("round_n function works", { test_that("one m4id tcplPlot works", { - skip_on_ci() + skip() lvl = 5 verbose = TRUE l4 <- tcplLoadData(lvl = 4, type = "mc", add.fld = TRUE)