Skip to content

glmpca wrapper uses GetAssayData() which has been deprecated in SeuratObject 5.0.0 #216

@lcolladotor

Description

@lcolladotor

Hi,

The RunGLMPCA() wrapper for glmpca by @willtownes is not working with the latest versions of Seurat and SeuratWrappers. I'm aware thanks to willtownes/glmpca@0536890 that Will Townes hasn't had as much availability as he used to to maintain glmpca. However, hopefully this is something that the Seurat maintainers can help resolve.

There's also a minor typo in the example of RunGLMPCA(): redunction -> reduction.

library("Seurat")
#> Loading required package: SeuratObject
#> Loading required package: sp
#> 
#> Attaching package: 'SeuratObject'
#> The following objects are masked from 'package:base':
#> 
#>     intersect, t
library("SeuratWrappers")
library("sessioninfo")

## Run example from
## https://github.com/satijalab/seurat-wrappers/blob/a1eb0d8b039ad6d5ef0ff1332fd8eb1c0c223553/R/glmpca.R#L24-L26

pbmc_small
#> An object of class Seurat 
#> 230 features across 80 samples within 1 assay 
#> Active assay: RNA (230 features, 20 variable features)
#>  3 layers present: counts, data, scale.data
#>  2 dimensional reductions calculated: pca, tsne
pbmc_small <- RunGLMPCA(pbmc_small)
#> Warning: The `slot` argument of `GetAssayData()` is deprecated as of SeuratObject 5.0.0.
#> ℹ Please use the `layer` argument instead.
#> ℹ The deprecated feature was likely used in the SeuratWrappers package.
#>   Please report the issue to the authors.
#> This warning is displayed once every 8 hours.
#> Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated.
#> Sparse matrices are not supported for minibatch='none'. Coercing to dense matrix. If this exhausts memory, consider setting minibatch to 'stochastic' or 'memoized'.
DimPlot(pbmc_small, redunction = 'glmpca')
#> Error in DimPlot(pbmc_small, redunction = "glmpca"): unused argument (redunction = "glmpca")

## Reproducibility information
print("Reproducibility information:")
#> [1] "Reproducibility information:"
Sys.time()
#> [1] "2025-07-03 13:54:43 EDT"
proc.time()
#>    user  system elapsed 
#>   2.030   0.209   5.004
options(width = 120)
session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────────────────────────────────────────────
#>  setting  value
#>  version  R version 4.5.0 (2025-04-11)
#>  os       macOS Sequoia 15.5
#>  system   aarch64, darwin20
#>  ui       X11
#>  language (EN)
#>  collate  en_US.UTF-8
#>  ctype    en_US.UTF-8
#>  tz       America/New_York
#>  date     2025-07-03
#>  pandoc   3.2 @ /opt/homebrew/bin/ (via rmarkdown)
#>  quarto   1.4.550 @ /usr/local/bin/quarto
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────
#>  package          * version date (UTC) lib source
#>  abind              1.4-8   2024-09-12 [1] CRAN (R 4.5.0)
#>  BiocManager        1.30.26 2025-06-05 [1] CRAN (R 4.5.0)
#>  cli                3.6.5   2025-04-23 [1] CRAN (R 4.5.0)
#>  cluster            2.1.8.1 2025-03-12 [1] CRAN (R 4.5.0)
#>  codetools          0.2-20  2024-03-31 [1] CRAN (R 4.5.0)
#>  colorspace         2.1-1   2024-07-26 [1] CRAN (R 4.5.0)
#>  cowplot            1.1.3   2024-01-22 [1] CRAN (R 4.5.0)
#>  data.table         1.17.6  2025-06-17 [1] CRAN (R 4.5.0)
#>  deldir             2.0-4   2024-02-28 [1] CRAN (R 4.5.0)
#>  dichromat          2.0-0.1 2022-05-02 [1] CRAN (R 4.5.0)
#>  digest             0.6.37  2024-08-19 [1] CRAN (R 4.5.0)
#>  dotCall64          1.2     2024-10-04 [1] CRAN (R 4.5.0)
#>  dplyr              1.1.4   2023-11-17 [1] CRAN (R 4.5.0)
#>  evaluate           1.0.4   2025-06-18 [1] CRAN (R 4.5.0)
#>  farver             2.1.2   2024-05-13 [1] CRAN (R 4.5.0)
#>  fastDummies        1.7.5   2025-01-20 [1] CRAN (R 4.5.0)
#>  fastmap            1.2.0   2024-05-15 [1] CRAN (R 4.5.0)
#>  fitdistrplus       1.2-2   2025-01-07 [1] CRAN (R 4.5.0)
#>  fs                 1.6.6   2025-04-12 [1] CRAN (R 4.5.0)
#>  future             1.58.0  2025-06-05 [1] CRAN (R 4.5.0)
#>  future.apply       1.20.0  2025-06-06 [1] CRAN (R 4.5.0)
#>  generics           0.1.4   2025-05-09 [1] CRAN (R 4.5.0)
#>  ggplot2            3.5.2   2025-04-09 [1] CRAN (R 4.5.0)
#>  ggrepel            0.9.6   2024-09-07 [1] CRAN (R 4.5.0)
#>  ggridges           0.5.6   2024-01-23 [1] CRAN (R 4.5.0)
#>  glmpca             0.2.0   2020-07-18 [1] CRAN (R 4.5.0)
#>  globals            0.18.0  2025-05-08 [1] CRAN (R 4.5.0)
#>  glue               1.8.0   2024-09-30 [1] CRAN (R 4.5.0)
#>  goftest            1.2-3   2021-10-07 [1] CRAN (R 4.5.0)
#>  gridExtra          2.3     2017-09-09 [1] CRAN (R 4.5.0)
#>  gtable             0.3.6   2024-10-25 [1] CRAN (R 4.5.0)
#>  htmltools          0.5.8.1 2024-04-04 [1] CRAN (R 4.5.0)
#>  htmlwidgets        1.6.4   2023-12-06 [1] CRAN (R 4.5.0)
#>  httpuv             1.6.16  2025-04-16 [1] CRAN (R 4.5.0)
#>  httr               1.4.7   2023-08-15 [1] CRAN (R 4.5.0)
#>  ica                1.0-3   2022-07-08 [1] CRAN (R 4.5.0)
#>  igraph             2.1.4   2025-01-23 [1] CRAN (R 4.5.0)
#>  irlba              2.3.5.1 2022-10-03 [1] CRAN (R 4.5.0)
#>  jsonlite           2.0.0   2025-03-27 [1] CRAN (R 4.5.0)
#>  KernSmooth         2.23-26 2025-01-01 [1] CRAN (R 4.5.0)
#>  knitr              1.50    2025-03-16 [1] CRAN (R 4.5.0)
#>  later              1.4.2   2025-04-08 [1] CRAN (R 4.5.0)
#>  lattice            0.22-7  2025-04-02 [1] CRAN (R 4.5.0)
#>  lazyeval           0.2.2   2019-03-15 [1] CRAN (R 4.5.0)
#>  lifecycle          1.0.4   2023-11-07 [1] CRAN (R 4.5.0)
#>  listenv            0.9.1   2024-01-29 [1] CRAN (R 4.5.0)
#>  lmtest             0.9-40  2022-03-21 [1] CRAN (R 4.5.0)
#>  magrittr           2.0.3   2022-03-30 [1] CRAN (R 4.5.0)
#>  MASS               7.3-65  2025-02-28 [1] CRAN (R 4.5.0)
#>  Matrix             1.7-3   2025-03-11 [1] CRAN (R 4.5.0)
#>  matrixStats        1.5.0   2025-01-07 [1] CRAN (R 4.5.0)
#>  mime               0.13    2025-03-17 [1] CRAN (R 4.5.0)
#>  miniUI             0.1.2   2025-04-17 [1] CRAN (R 4.5.0)
#>  nlme               3.1-168 2025-03-31 [1] CRAN (R 4.5.0)
#>  parallelly         1.45.0  2025-06-02 [1] CRAN (R 4.5.0)
#>  patchwork          1.3.1   2025-06-21 [1] CRAN (R 4.5.0)
#>  pbapply            1.7-2   2023-06-27 [1] CRAN (R 4.5.0)
#>  pillar             1.10.2  2025-04-05 [1] CRAN (R 4.5.0)
#>  pkgconfig          2.0.3   2019-09-22 [1] CRAN (R 4.5.0)
#>  plotly             4.11.0  2025-06-19 [1] CRAN (R 4.5.0)
#>  plyr               1.8.9   2023-10-02 [1] CRAN (R 4.5.0)
#>  png                0.1-8   2022-11-29 [1] CRAN (R 4.5.0)
#>  polyclip           1.10-7  2024-07-23 [1] CRAN (R 4.5.0)
#>  progressr          0.15.1  2024-11-22 [1] CRAN (R 4.5.0)
#>  promises           1.3.3   2025-05-29 [1] CRAN (R 4.5.0)
#>  purrr              1.0.4   2025-02-05 [1] CRAN (R 4.5.0)
#>  R.methodsS3        1.8.2   2022-06-13 [1] CRAN (R 4.5.0)
#>  R.oo               1.27.1  2025-05-02 [1] CRAN (R 4.5.0)
#>  R.utils            2.13.0  2025-02-24 [1] CRAN (R 4.5.0)
#>  R6                 2.6.1   2025-02-15 [1] CRAN (R 4.5.0)
#>  RANN               2.6.2   2024-08-25 [1] CRAN (R 4.5.0)
#>  RColorBrewer       1.1-3   2022-04-03 [1] CRAN (R 4.5.0)
#>  Rcpp               1.0.14  2025-01-12 [1] CRAN (R 4.5.0)
#>  RcppAnnoy          0.0.22  2024-01-23 [1] CRAN (R 4.5.0)
#>  RcppHNSW           0.6.0   2024-02-04 [1] CRAN (R 4.5.0)
#>  remotes            2.5.0   2024-03-17 [1] CRAN (R 4.5.0)
#>  reprex             2.1.1   2024-07-06 [1] CRAN (R 4.5.0)
#>  reshape2           1.4.4   2020-04-09 [1] CRAN (R 4.5.0)
#>  reticulate         1.42.0  2025-03-25 [1] CRAN (R 4.5.0)
#>  rlang              1.1.6   2025-04-11 [1] CRAN (R 4.5.0)
#>  rmarkdown          2.29    2024-11-04 [1] CRAN (R 4.5.0)
#>  ROCR               1.0-11  2020-05-02 [1] CRAN (R 4.5.0)
#>  RSpectra           0.16-2  2024-07-18 [1] CRAN (R 4.5.0)
#>  rsvd               1.0.5   2021-04-16 [1] CRAN (R 4.5.0)
#>  Rtsne              0.17    2023-12-07 [1] CRAN (R 4.5.0)
#>  scales             1.4.0   2025-04-24 [1] CRAN (R 4.5.0)
#>  scattermore        1.2     2023-06-12 [1] CRAN (R 4.5.0)
#>  sctransform        0.4.2   2025-04-30 [1] CRAN (R 4.5.0)
#>  sessioninfo      * 1.2.3   2025-02-05 [1] CRAN (R 4.5.0)
#>  Seurat           * 5.3.0   2025-04-23 [1] CRAN (R 4.5.0)
#>  SeuratObject     * 5.1.0   2025-04-22 [1] CRAN (R 4.5.0)
#>  SeuratWrappers   * 0.4.0   2025-07-03 [1] Github (satijalab/seurat-wrappers@a1eb0d8)
#>  shiny              1.10.0  2024-12-14 [1] CRAN (R 4.5.0)
#>  sp               * 2.2-0   2025-02-01 [1] CRAN (R 4.5.0)
#>  spam               2.11-1  2025-01-20 [1] CRAN (R 4.5.0)
#>  spatstat.data      3.1-6   2025-03-17 [1] CRAN (R 4.5.0)
#>  spatstat.explore   3.4-3   2025-05-21 [1] CRAN (R 4.5.0)
#>  spatstat.geom      3.4-1   2025-05-20 [1] CRAN (R 4.5.0)
#>  spatstat.random    3.4-1   2025-05-20 [1] CRAN (R 4.5.0)
#>  spatstat.sparse    3.1-0   2024-06-21 [1] CRAN (R 4.5.0)
#>  spatstat.univar    3.1-3   2025-05-08 [1] CRAN (R 4.5.0)
#>  spatstat.utils     3.1-4   2025-05-15 [1] CRAN (R 4.5.0)
#>  stringi            1.8.7   2025-03-27 [1] CRAN (R 4.5.0)
#>  stringr            1.5.1   2023-11-14 [1] CRAN (R 4.5.0)
#>  survival           3.8-3   2024-12-17 [1] CRAN (R 4.5.0)
#>  tensor             1.5.1   2025-06-17 [1] CRAN (R 4.5.0)
#>  tibble             3.3.0   2025-06-08 [1] CRAN (R 4.5.0)
#>  tidyr              1.3.1   2024-01-24 [1] CRAN (R 4.5.0)
#>  tidyselect         1.2.1   2024-03-11 [1] CRAN (R 4.5.0)
#>  uwot               0.2.3   2025-02-24 [1] CRAN (R 4.5.0)
#>  vctrs              0.6.5   2023-12-01 [1] CRAN (R 4.5.0)
#>  viridisLite        0.4.2   2023-05-02 [1] CRAN (R 4.5.0)
#>  withr              3.0.2   2024-10-28 [1] CRAN (R 4.5.0)
#>  xfun               0.52    2025-04-02 [1] CRAN (R 4.5.0)
#>  xtable             1.8-4   2019-04-21 [1] CRAN (R 4.5.0)
#>  yaml               2.3.10  2024-07-26 [1] CRAN (R 4.5.0)
#>  zoo                1.8-14  2025-04-10 [1] CRAN (R 4.5.0)
#> 
#>  [1] /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library
#>  * ── Packages attached to the search path.
#> 
#> ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Created on 2025-07-03 with reprex v2.1.1

Note that in version 4.4.0 of Seurat my colleague Jisu Ha was getting the following error:

Invalid class "DimReduc" object: invalid object for slot "misc" in class "Dimeduc": got class "glmpca", should be or extend class "list"

I'll ask him to provide the reprex::reprex() output for the following R code:

library("Seurat")
library("SeuratWrappers")
library("sessioninfo")

## Run example from
## https://github.com/satijalab/seurat-wrappers/blob/a1eb0d8b039ad6d5ef0ff1332fd8eb1c0c223553/R/glmpca.R#L24-L26

pbmc_small
pbmc_small <- RunGLMPCA(pbmc_small)
DimPlot(pbmc_small, redunction = 'glmpca')

## Reproducibility information
print("Reproducibility information:")
Sys.time()
proc.time()
options(width = 120)
session_info()

Best,
Leo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions