From aa59828ce5dc723ab2cf94c997654e0c0f23f3ef Mon Sep 17 00:00:00 2001 From: TuomasBorman Date: Wed, 9 Oct 2024 15:00:48 +0300 Subject: [PATCH] up --- R/plotAbundance.R | 3 +++ 1 file changed, 3 insertions(+) diff --git a/R/plotAbundance.R b/R/plotAbundance.R index e3a6bed..63d2574 100644 --- a/R/plotAbundance.R +++ b/R/plotAbundance.R @@ -222,6 +222,9 @@ setMethod("plotAbundance", signature = c("SummarizedExperiment"), function( "the names.\nThe following names are not allowed: '", paste0(not_allowed, collapse = "', '"), "'", call. = FALSE) } + # Leave order.col.by out of the comparison, if it specifies a feature + order.col.by <- if(order.col.by %in% colnames(colData(x))) order.col.by else + NULL all_vars <- unique(c(order.col.by, col.var)) if( sum(colnames(colData(x)) %in% all_vars) != length(all_vars) ){ stop("colData(x) must have unique colnames.", call. = FALSE)