前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >BPCells package 安装问题

BPCells package 安装问题

原创
作者头像
JJJJack
发布2023-11-10 07:21:53
4210
发布2023-11-10 07:21:53
举报

一百万细胞或更多细胞的单细胞转录组分析在数据整合方面非常消耗电脑内存,我在单位32G 内存的iMac上跑,经常会出现R session abortion。然后发现Seurat官方给出了v5,即更新版的。

根据官网的说明,一步步安装,在安装到BPCells这个package的时候,开始出问题,前后折腾了差不多快5天。现在这里做一个分享:

代码语言:txt
复制
1. install BPCells package
remotes::install_github("bnprks/BPCells")    
#error: unable to locate libhdf5.
代码语言:txt
复制
2. 通过查阅官网发现需要先安装hdf5:
“..., before installing BPCells, we must have the HDF5 library installed and accessible on the system.”
代码语言:txt
复制
3. Two solutions: homebrew install hdf5 or conda install hdf5. For MacOS, installing hdf5 through homebrew seems to be most reliable: brew install hdf5.
代码语言:txt
复制
4. So, we need to install homebrew first before installing hdf5. I ran the below code in the Mac terminal, not Rstudio console.
mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
eval "$(homebrew/bin/brew shellenv)"
brew update --force --quiet
chmod -R go-w "$(brew --prefix)/share/zsh"
代码语言:txt
复制
5. Then, I start to install hdf5 using brew command in the terminal, where the brew locates at /homebrew/bin/.
brew install hdf5
代码语言:txt
复制
6. Sometimes, it will end with error:
#Error: Your Command Line Tools are too outdated.
#how to figure this out???
#The output of this run will give you below suggestion to figure it out. So, I run the below code in the Mac terminal with sudo access.
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
代码语言:txt
复制
7. Create .R directory in your $home (/Users/jiajia) and touch a Makevars file in it. It looks like:
/Users/jiajia/.R/Makevars.
代码语言:txt
复制
8. edit the Makevars file with below information:
{
CC=/Users/jiajia/homebrew/Cellar/llvm/17.0.4/bin/clang-17
CXX=/Users/jiajia/homebrew/Cellar/llvm/17.0.4/bin/clang++
CFLAGS=-I/Users/jiajia/homebrew/Cellar/hdf5/1.14.3/include
CXXFLAGS=-I/Users/jiajia/homebrew/Cellar/hdf5/1.14.3/include
LDFLAGS=-L/Users/jiajia/homebrew/Cellar/hdf5/1.14.3/lib
}
每个人保存的文件夹位置可能不同,只需要能找到对应的目录即可。
代码语言:txt
复制
Finally, I successfully installed the BPCells package in the Rstuido.

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档