Skip to content

Commit

Permalink
Nebulosa temp fix
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel-marsh committed Feb 27, 2024
1 parent b742d0b commit 21e9e1b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions R/Nebulosa_Plotting.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#' @concept other_seurat_plotting
#'
#' @examples
#' \donttest{
#' \dontrun{
#' library(Seurat)
#' Plot_Density_Custom(seurat_object = pbmc_small, features = "CD3E")
#' }
Expand Down Expand Up @@ -64,6 +64,11 @@ Plot_Density_Custom <- function(
))
}

# temp ggplot2 version check
if (packageVersion(pkg = 'ggplot2') >= "3.5.0") {
cli_abort(message = c("Due to error in Nebulosa package and ggplot2 v3.5.0 {.field Plot_Density_Custom} functionality is currently restricted to ggplot v3.4.4 or lower."))
}

# Check Seurat
Is_Seurat(seurat_object = seurat_object)

Expand Down Expand Up @@ -141,7 +146,7 @@ Plot_Density_Custom <- function(
#' @concept other_seurat_plotting
#'
#' @examples
#' \donttest{
#' \dontrun{
#' library(Seurat)
#' Plot_Density_Joint_Only(seurat_object = pbmc_small, features = c("CD8A", "CD3E"))
#' }
Expand Down Expand Up @@ -170,6 +175,11 @@ Plot_Density_Joint_Only <- function(
))
}

# temp ggplot2 version check
if (packageVersion(pkg = 'ggplot2') >= "3.5.0") {
cli_abort(message = c("Due to error in Nebulosa package and ggplot2 v3.5.0 {.field Plot_Density_Joint_Only} functionality is currently restricted to ggplot v3.4.4 or lower."))
}

# Check Seurat
Is_Seurat(seurat_object = seurat_object)

Expand Down

0 comments on commit 21e9e1b

Please sign in to comment.