Skip to content

Error with DetectUTRLengthShift: GetAssayData() slot argument is defunct in SeuratObject 5.0.0+ #73

@Shun-Yasui

Description

@Shun-Yasui

Error with DetectUTRLengthShift: GetAssayData() slot argument is defunct in SeuratObject 5.0.0+

Description

I'm encountering an error when running DetectUTRLengthShift() with the latest versions of Seurat and SeuratObject. The error indicates that the slot argument in GetAssayData() has been deprecated and is now defunct in SeuratObject 5.0.0+.

Error Message

Error:
! The `slot` argument of `GetAssayData()` was deprecated in SeuratObject 5.0.0 and is now defunct.
ℹ Please use the `layer` argument instead.

Reproducible Example

library(Sierra)
library(Seurat)

# Running DetectUTRLengthShift
utr_shift_all <- DetectUTRLengthShift(
  peaks.object = PeakSeurat_996989_non_neuron,
  gtf_gr = gtf_gr,
  gtf_TxDb = gtf_TxDb,
  population.1 = population_NLGF_all,
  population.2 = population_WT_all
)

Environment

  • Sierra version: 0.99.27
  • Seurat version: 5.4.0
  • SeuratObject version: 5.3.0
  • R version: 4.2.0 (2022-04-22)

Expected Behavior

DetectUTRLengthShift() should run successfully and detect UTR length shifts between the two populations.

Actual Behavior

The function fails with an error about the defunct slot argument in GetAssayData().

Additional Context

This issue appears to be due to SeuratObject 5.0.0+ replacing the slot argument with layer in GetAssayData(). The Sierra package seems to still be using the old slot argument, which causes compatibility issues with newer versions of SeuratObject.

Temporary Workaround Attempted

I tried downgrading to SeuratObject 4.x, but this created additional compatibility issues with my Seurat objects that were created with version 5.x.

Suggested Fix

Update all instances of GetAssayData(..., slot = "...") to GetAssayData(..., layer = "...") throughout the Sierra package to ensure compatibility with SeuratObject 5.0.0+.


Thank you for maintaining this package! Please let me know if you need any additional information.

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