Skip to content

Commit

Permalink
Fix Version Comparison for Seurat Package
Browse files Browse the repository at this point in the history
To compare versions explicitly it is necessary to do it through another object of the type package_version in R versions >= 4.4 (#54)
  • Loading branch information
andchamorro authored Jun 25, 2024
1 parent 13c4f3f commit 3969460
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/util.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ select_assay <- function(obj) {
#'
#' @export
counts_matrix_from_assay <- function(assay) {
if (packageVersion("Seurat") >= 5) {
if (packageVersion("Seurat") >= package_version("5.0.0")) {
return(assay$counts)
} else {
if (is(assay, 'Assay5')) {
Expand Down

0 comments on commit 3969460

Please sign in to comment.