Skip to content

Commit

Permalink
abort if heatmap has order
Browse files Browse the repository at this point in the history
  • Loading branch information
Yunuuuu committed Jul 17, 2024
1 parent 17256ff commit c012eea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions R/htanno-group.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
4 changes: 2 additions & 2 deletions R/htanno-kmeans.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit c012eea

Please sign in to comment.