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

介绍一种简单可行的V4的Seruat安装方案 #4134

Closed
ixxmu opened this issue Nov 19, 2023 · 1 comment
Closed

介绍一种简单可行的V4的Seruat安装方案 #4134

ixxmu opened this issue Nov 19, 2023 · 1 comment

Comments

@ixxmu
Copy link
Owner

ixxmu commented Nov 19, 2023

https://mp.weixin.qq.com/s/NJ5lIeJ9qUVWaz_tXZtk1A

@ixxmu
Copy link
Owner Author

ixxmu commented Nov 19, 2023

介绍一种简单可行的V4的Seruat安装方案 by 果子学生信

目前Seurat的版本从V4升级到了V5,由于一些变化,导致当年取巧,使用@获取数据的方法都无法在V5中使用。

建议在操作前重启下Rstudio(或更确切的说是R)!!!

建议在操作前重启下Rstudio(或更确切的说是R)!!!

建议在操作前重启下Rstudio(或更确切的说是R)!!!

那么如何确保自己能够安装V4的Seurat呢?

首先,我们需要先安装V5版本,让他帮我把一系列的依赖问题都给解决掉

install.packages('Seurat')
# 检查版本
# packageVersion("Seurat")
# [1] ‘5.0.0’

接着,过河拆桥,把V5版本的Seurat和SeuratObject卸载掉

remove.packages(c("Seurat","SeuratObject"))

然后,我们去安装V4的Seurat,这里要指定repos。

install.packages('Seurat', repos = c('https://satijalab.r-universe.dev'))
# 检查版本
# packageVersion("Seurat")
# [1] ‘4.4.0’

该方法在Windows,Linux服务器,M芯片的Mac中中都测试过(其中Linux的Seurat需要编译)。

稍微进阶一些,我们也不需要卸载V5,也可以做到使用V4,只需要在安装的时候,指定一个新的安装路径

dir.create("~/SeuratV4")
# 然后安装的时候,指定安装目录
install.packages('Seurat', repos = c('https://satijalab.r-universe.dev'), lib = "~/SeuratV4")

在使用的时候,.libPaths配置好路径,使得library加载的时候,能够先加载到V4。

.libPaths(c("~/SeuratV4", .libPaths()))
library(Seurat)

> packageVersion("Seurat")
[1] ‘4.3.0


@ixxmu ixxmu changed the title archive_request 介绍一种简单可行的V4的Seruat安装方案 Nov 19, 2023
@ixxmu ixxmu closed this as completed Nov 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant