Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RiboRings committed Jun 19, 2024
1 parent 11033d1 commit 4b95e54
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
9 changes: 5 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: iSEEtree
Version: 0.99.0
Version: 0.99.1
Authors@R:
c(person(given = "Giulio", family = "Benedetti", role = c("aut", "cre"),
email = "[email protected]",
Expand All @@ -15,12 +15,13 @@ Description:
TreeSummarizedExperiment objects. Not surprisingly, it also depends on the
generic panels from iSEE.
biocViews: Microbiome, Software, Visualization, DataImport
License: Artistic-2.0
License: Artistic-2.0 + file LICENSE
Encoding: UTF-8
Depends:
R (>= 4.0),
iSEE
Imports:
grDevices,
methods,
miaViz,
S4Vectors,
Expand All @@ -29,7 +30,8 @@ Imports:
shinyWidgets,
SingleCellExperiment,
SummarizedExperiment,
TreeSummarizedExperiment
TreeSummarizedExperiment,
utils
Suggests:
BiocStyle,
knitr,
Expand All @@ -38,7 +40,6 @@ Suggests:
rmarkdown,
scater,
testthat (>= 3.0.0),
utils,
vegan
URL: https://github.com/microbiome/iSEEtree
BugReports: https://github.com/microbiome/iSEEtree/issues
Expand Down
8 changes: 4 additions & 4 deletions R/class-RDAPlot.R
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ setMethod("initialize", "RDAPlot", function(.Object, ...) {
args <- .emptyDefault(args, "colour_by", NA_character_)
args <- .emptyDefault(args, "add.vectors", TRUE)
args <- .emptyDefault(args, "vec.text", TRUE)
args <- .emptyDefault(args, "visual_parameters", "None")
args <- .emptyDefault(args, "visual_parameters", NA_character_)
args <- .emptyDefault(args, "add.expl.var", TRUE)
args <- .emptyDefault(args, "add.significance", TRUE)
args <- .emptyDefault(args, "ellipse.alpha", 0.2)
Expand Down Expand Up @@ -301,11 +301,12 @@ setMethod(".definePanelTour", "RDAPlot", function(x) {
callNextMethod())
})

#' @importFrom SummarizedExperiment colData
#' @importFrom grDevices rainbow
#' @importFrom methods slot
#' @importFrom iSEE .getEncodedName .selectInput.iSEE .checkboxInput.iSEE .sliderInput.iSEE
#' .conditionalOnCheckSolo .checkboxGroupInput.iSEE .conditionalOnCheckGroup
#' .numericInput.iSEE
#' @importFrom methods slot
#' @importFrom SummarizedExperiment colData
.create_visual_box_for_rda <- function(x, se) {
panel_name <- .getEncodedName(x)

Expand Down Expand Up @@ -382,7 +383,6 @@ setMethod(".definePanelTour", "RDAPlot", function(x) {
"_visual_parameters"), intro = "Here, we can choose
the visual parameters to adjust")))})


# Define what parameters the user can adjust
collapseBox(paste0(panel_name, "_Visual"),
title="Visual parameters", open=FALSE,
Expand Down
8 changes: 4 additions & 4 deletions R/class-RowTreePlot.R
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ setMethod("initialize", "RowTreePlot", function(.Object, ...) {
args <- .emptyDefault(args, "node_colour_by", NA_character_)
args <- .emptyDefault(args, "node_size_by", NA_character_)
args <- .emptyDefault(args, "node_shape_by", NA_character_)
args <- .emptyDefault(args, "visual_parameters", "None")
args <- .emptyDefault(args, "colour_parameters", "None")
args <- .emptyDefault(args, "shape_parameters", "None")
args <- .emptyDefault(args, "size_parameters", "None")
args <- .emptyDefault(args, "visual_parameters", NA_character_)
args <- .emptyDefault(args, "colour_parameters", NA_character_)
args <- .emptyDefault(args, "shape_parameters", NA_character_)
args <- .emptyDefault(args, "size_parameters", NA_character_)
args <- .emptyDefault(args, "order_tree", FALSE)

do.call(callNextMethod, c(list(.Object), args))
Expand Down
5 changes: 3 additions & 2 deletions tests/testthat/test-RDAPlot.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ test_that("RDAPlot", {

expect_s3_class(.defineOutput(panel), "shiny.tag.list")
expect_match(.generateOutput(panel, tse)[["commands"]][["fun"]],
'p <- miaViz::plotRDA(se, dimred="RDA", colour_by="ClinicalStatus",
confidence.level=0.95, add.expl.var=TRUE, add.significance=TRUE)', fixed = TRUE)
'p <- miaViz::plotRDA(se, dimred="RDA", colour_by="ClinicalStatus",\n ',
'confidence.level=0.95, add.expl.var=TRUE, add.significance=TRUE)',
fixed = TRUE)

expect_true(.hideInterface(panel, "RowSelectionSource"))
expect_false(.multiSelectionResponsive(panel, "row"))
Expand Down

0 comments on commit 4b95e54

Please sign in to comment.