Skip to content

Commit

Permalink
check matrix is compatible with heatmap matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
Yunuuuu committed Jun 26, 2024
1 parent 029f973 commit ac5ef34
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions R/eanno.R
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,13 @@ methods::setMethod(
))
}
)
if (nrow(mat) != nrow(data)) {
cli::cli_abort(paste(
"{.fn @matrix} of {id} must a {.cls matrix}",
"with {nrow(mat)} observation{?s}, but the heatmap",
"contain {nrow(data)} for {which} annotation."
))
}
object@n <- nrow(mat)
}
object@matrix <- mat
Expand Down

0 comments on commit ac5ef34

Please sign in to comment.