Skip to content
Snippets Groups Projects
Commit 0d172aa9 authored by Cedric Midoux's avatar Cedric Midoux
Browse files

hotfix negative counts for heatmap

parent 0eaa13c8
No related branches found
No related tags found
No related merge requests found
Pipeline #172157 passed
......@@ -76,7 +76,7 @@ mod_heatmap_ui <- function(id) {
#'
#' @noRd
#' @importFrom ggplot2 element_blank element_text facet_grid theme theme_bw vars
#' @importFrom phyloseq plot_heatmap
#' @importFrom phyloseq otu_table plot_heatmap
#' @importFrom plotly renderPlotly
#' @importFrom rlang .data is_null
#' @importFrom shiny moduleServer need observeEvent reactive validate
......@@ -87,6 +87,7 @@ mod_heatmap_server <- function(id, r) {
output$heatmap <- renderPlotly({
validate(
need(slot_phyloseq(r$physeq), message = "Requires an abundance dataset"),
need(min(otu_table(r$physeq)) >= 0, message = "Transformation introduced negative counts"),
need(slot_phyloseq(r$physeq, "tax_table"), message = "Requires tax_table")
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment