scVi和scArches单细胞批次效应去除工具安装

scVi是基于变分自编码器,采用无监督的方法对单细胞数据进行批次效应去除的工具。scArches是一个将新生成的单细胞数据集集成到参考图谱中的工具包。

他们在图谱级别的单细胞批次效应去除上非常有效。但是我们参考官网的安装教程总是会出现各种问题,各种安装包的版本不对。记录一下安装成功的过程。

Installation — scvi-tools

Installation - scArches documentation

1. 首先查看服务器的cuda版本,我的是cuda 11.2

nvidia-smi

2. 然后新建一个环境

conda create -n scarches python=3.9.0 mamba -c conda-forge
conda activate scarches

3. 添加jupyter kernel (不用jupyter可不运行这一步)

mamba install ipykernel jupyter
python -m ipykernel install --user --name python_scarches

4. 安装torch,找到适配的cuda版本以及python版本的torch,torchvision, torchaudio

PyTorch中torch、torchvision、torchaudio、torchtext版本对应关系_torch2.0.1对应的torchvision-CSDN博客

 由于https://download.pytorch.org/whl/torch_stable.html 官网上没有11.2的版本,我选择了11.6,cuda版本可以向下兼容。

pip install torch==1.12.0+cu116 torchvision==0.13.0+cu116 torchaudio==0.12.0+cu116 -f https://download.pytorch.org/whl/torch_stable.html

5. 安装jax,jaxlib,也是要自己选择合适的版本

pip install --upgrade "jax[cuda11_pip]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html

6. 最后就是安装这两个工具

pip install scvi-tools
pip install -U scarches

  • 8
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值