From c012eea04d590fcd07d7bd79e70a6b354bc7c5de Mon Sep 17 00:00:00 2001 From: yun Date: Thu, 18 Jul 2024 01:06:08 +0800 Subject: [PATCH] abort if heatmap has order --- R/htanno-group.R | 4 ++-- R/htanno-kmeans.R | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/R/htanno-group.R b/R/htanno-group.R index fbff0f00..38743ae8 100644 --- a/R/htanno-group.R +++ b/R/htanno-group.R @@ -38,11 +38,11 @@ HtannoGroup <- ggplot2::ggproto("HtannoGroup", HtannoProto, ), call = self$call) } if (!is.null(index)) { - cli::cli_warn(sprintf( + cli::cli_abort(sprintf( "{.fn {snake_class(self)}} will disrupt the previously %s %s", "established order of the heatmap", to_matrix_axis(position) - )) + ), call = self$call) } list(group, index) } diff --git a/R/htanno-kmeans.R b/R/htanno-kmeans.R index 55f20cb7..e353fd2e 100644 --- a/R/htanno-kmeans.R +++ b/R/htanno-kmeans.R @@ -48,11 +48,11 @@ HtannKmeans <- ggplot2::ggproto("HtannKmeans", HtannoProto, ), call = self$call) } if (!is.null(index)) { - cli::cli_warn(sprintf( + cli::cli_abort(sprintf( "{.fn {snake_class(self)}} will disrupt the previously %s %s", "established order of the heatmap", to_matrix_axis(position) - )) + ), call = self$call) } list(statistics$cluster, index) }