Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update paramSweep.R #176

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Camila-goclowski
Copy link

recieve error: "$ operator not defined for this S4 class" when previously trying to run paramSweep function.
Change:
seu@assays$RNA@counts
instead of
seu@assays$RNA$counts made this work

recieve error: "$ operator not defined for this S4 class" when previously trying to run paramSweep function. 
Change: 
seu@assays$RNA@counts instead of seu@assays$RNA$counts made this work
same change as in paramSweep
seu@assasys$RNA@counts instead of seu@assays$RNA$counts
@jennieli421
Copy link

Hi, Is this issue resolved? I installed doubletfinder yesterday and was experiencing this error:

> paramSweep(s, PCs = 1:10, sct = FALSE)
Error in seu@assays$RNA$counts : $ operator not defined for this S4 class

However when I try to update doubletfinder, it seems like I'm already on the newest version

> remotes::install_github('chris-mcginnis-ucsf/DoubletFinder')
Using github PAT from envvar GITHUB_PAT
Skipping install of 'DoubletFinder' from a github remote, the SHA1 (853e2de1) has not changed since last install.
  Use `force = TRUE` to force installation

@Camila-goclowski
Copy link
Author

@jennieli421 I was having the same issue, I think the error is new with the recent update. I grabbed the function code from the github page, corrected the error (in two locations for paramSweep() and one for doubletFinder()), and manually created my "own" function to run the analysis. Hope that helps and I imagine the package itself will be updated soon with the correction.

@RoseString
Copy link

Will it be easier to use getAssayData(seu, assay = 'RNA', slot = 'counts') to avoid future code change due to different Seurat versions?

@Camila-goclowski
Copy link
Author

Camila-goclowski commented Jan 2, 2024

@RoseString Very good point, I agree

with Seurat's layer organization I was able to get this to run smoothly by using GetAssayData(seu, layer = "counts") which seemed to work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants