diff --git a/DESCRIPTION b/DESCRIPTION index cbcf341..7c4a51c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -38,6 +38,7 @@ Suggests: RefManageR, rmarkdown, sessioninfo, + Seurat, SingleCellExperiment, testthat (>= 3.0.0) Config/testthat/edition: 3 @@ -54,7 +55,6 @@ Imports: readr, rjson, S4Vectors, - Seurat, spatialLIBD (>= 1.17.8), stringr, SummarizedExperiment, diff --git a/NAMESPACE b/NAMESPACE index 2f314a6..7960efa 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -14,6 +14,7 @@ import(SpatialExperiment) import(dplyr) import(spatialLIBD) import(xml2) +importFrom(BiocBaseUtils,checkInstalled) importFrom(BiocGenerics,cbind) importFrom(Matrix,Matrix) importFrom(S4Vectors,DataFrame) diff --git a/R/as.Seurat.R b/R/as.Seurat.R index f1d2467..ce81a88 100644 --- a/R/as.Seurat.R +++ b/R/as.Seurat.R @@ -27,6 +27,7 @@ #' @importFrom SummarizedExperiment colData #' @importFrom grDevices col2rgb #' @importFrom methods new +#' @importFrom BiocBaseUtils checkInstalled #' #' @examples #' ## Download some example data @@ -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