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

Ensure essential packages are not detached! #402

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

zhongzheng1999
Copy link

In this branch, I removed the part detaching packages in scib.pp.normalize because it would lead to unpredictable errors when using rpy2 to run R code.
After learning from my own experience, I want to advise against detaching R packages casually. Instead, after deleting rm(list=ls()), running gc() usually suffices.
A simple example: in the final part of scib.pp.normalize, detaching most R packages, including scran and its dependency package S4Vector, would result in errors such as "cannot coerce class 'integer' to a DataFrame" if a loop code block is set up. Even if you reload scran (which depends on S4Vector) or S4Vector, the error persists and can only be resolved by restarting your kernel. Next, I'll demonstrate this issue with a simple example.

example.md

Ensure essential packages are not detached.
@mumichae mumichae requested review from LuckyMD and removed request for xlancelottx April 17, 2024 18:51
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.

None yet

2 participants