Skip to content

Commit

Permalink
Only suggest Seurat; check if it's installed in the as.Seurat() function
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick-Eagles committed Oct 14, 2024
1 parent c7c9552 commit ea7164f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Suggests:
RefManageR,
rmarkdown,
sessioninfo,
Seurat,
SingleCellExperiment,
testthat (>= 3.0.0)
Config/testthat/edition: 3
Expand All @@ -54,7 +55,6 @@ Imports:
readr,
rjson,
S4Vectors,
Seurat,
spatialLIBD (>= 1.17.8),
stringr,
SummarizedExperiment,
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import(SpatialExperiment)
import(dplyr)
import(spatialLIBD)
import(xml2)
importFrom(BiocBaseUtils,checkInstalled)
importFrom(BiocGenerics,cbind)
importFrom(Matrix,Matrix)
importFrom(S4Vectors,DataFrame)
Expand Down
4 changes: 4 additions & 0 deletions R/as.Seurat.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#' @importFrom SummarizedExperiment colData
#' @importFrom grDevices col2rgb
#' @importFrom methods new
#' @importFrom BiocBaseUtils checkInstalled
#'
#' @examples
#' ## Download some example data
Expand Down Expand Up @@ -59,6 +60,9 @@ as.Seurat <- function(
"imagecol" = "pxl_col_in_fullres"
),
verbose = TRUE) {
# Seurat is only suggested
BiocBaseUtils::checkInstalled('Seurat')

SPOT_DIAMETER <- 55e-6

# Ensure all necessary columns are present in colData
Expand Down

0 comments on commit ea7164f

Please sign in to comment.