Skip to content

Commit

Permalink
Update preprocessing.py (#402)
Browse files Browse the repository at this point in the history
Ensure essential packages are not detached.

Co-authored-by: Michaela Müller <[email protected]>
  • Loading branch information
zhongzheng1999 and mumichae authored Aug 7, 2024
1 parent 9271d92 commit 3d982c4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scib/preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,11 +345,11 @@ def normalize(

# Free memory in R
ro.r("rm(list=ls())")
ro.r("lapply(names(sessionInfo()$loadedOnly), require, character.only = TRUE)")
ro.r(
'invisible(lapply(paste0("package:", names(sessionInfo()$otherPkgs)), '
"detach, character.only=TRUE, unload=TRUE))"
)
# ro.r("lapply(names(sessionInfo()$loadedOnly), require, character.only = TRUE)")
# ro.r(
# 'invisible(lapply(paste0("package:", names(sessionInfo()$otherPkgs)), '
# "detach, character.only=TRUE, unload=TRUE))"
# )
ro.r("gc()")

anndata2ri.deactivate()
Expand Down

0 comments on commit 3d982c4

Please sign in to comment.