美文网首页
Pianno: 空间转录组组织域无监督注释工具的安装教程

Pianno: 空间转录组组织域无监督注释工具的安装教程

作者: 倪桦 | 来源:发表于2024-04-29 12:16 被阅读0次

软件快照: https://github.com/yuqiuzhou/Pianno

官网快照
软件介绍:Pianno提供了一个用于空间转录组学无监督语义概率注释的框架,软件可以根据生物标记基因实现自动注释空间转录组学中Spot的生物学特性。经测试,该软件效果一般优于SpaGCNGraphSTSTAGATE ... 等主流注释框架 Pianno: a probabilistic framework automating semantic annotation for spatial transcriptomics | Nature Communications
:
大脑皮层组织的无监督注释效果对比

部署环境:Windows WSL, Ubuntu 22.04.3 LTS (GNU/Linux 4.4.0-19041-Microsoft x86_64)
Author : 西瓜丁

1. 官方的安装策略

# create an environment called Pianno
conda create -n Pianno python=3.9.10
# activate your environment
conda activate Pianno
# install R in the Pianno environment
conda install -c conda-forge r-base=4.1.1
# install tensorflow and tensorflow-probability
# ensure the version 2 of tensorflow
pip install tensorflow-gpu==2.6.0
pip install tensorflow-probability==0.14.0
# install pianno from PyPi
pip install pianno

2. 本地安装过程中的异常与解决方案记录

2.1 无法从Conda标准库获取Python( python=3.9.10)
conda create -n Pianno python=3.9.10
_____________________________________________________
PackagesNotFoundError: The following packages are not available from current channels:
  - python=3.9.10*

解决方案: 添加conda-forge 源,获取python=3.9.10

conda config --append channels conda-forge
2.2 tensorflow-gpu 的下载异常
pip install tensorflow-gpu==2.6.0
_____________________________________________________
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

解决方案: 从国内站点拉取软件资源

 pip install tensorflow-gpu==2.6.0 -i https://pypi.mirrors.ustc.edu.cn/simple
2.3 rpy2 无法通过pip拉取
pip install pianno
_____________________________________________________
Collecting rpy2>=3.4.5 (from pianno)
  Downloading rpy2-3.5.16.tar.gz (220 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 220.0/220.0 kB 6.1 kB/s eta 0:00:00
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 2
  ╰─> [64 lines of output]

解决方案:从Conda 配置该软件 conda install -c r rpy2

2.4 配置Scanpy和Squidpy两个依赖库
pip install scanpy squidpy

安装好后继续加载提示缺少系统缺少OpenGL库:

import pianno as po
_____________________________________________________
ImportError: libGL.so.1: cannot open shared object file: No such file or directory

解决方案sudo apt install libgl1-mesa-glx (for Ubuntu OS);

2.5 Numpy版本不适配解决
import pianno as po
_____________________________________________________
AttributeError: module 'numpy' has no attribute 'object'.
`np.object` was a deprecated alias for the builtin `object`. To avoid this error in existing code, use `object` by itself. Doing this will not modify any behavior and is safe.

解决方案pip install numpy==1.23.4

注:官方要求tensorflow-gpu 2.6.0 requires numpy~=1.19.2,但实测1.23版本numpy可运行

2.6 相关R依赖包的安装
remotes::install_version("Matrix", version = "1.6-1")
remotes::install_github("elswob/SCRAN")
remotes::install_github("mohuangx/SAVER@*release")

Reference

yuqiuzhou/Pianno (github.com)
Pianno: a probabilistic framework automating semantic annotation for spatial transcriptomics | Nature Communications

相关文章

网友评论

      本文标题:Pianno: 空间转录组组织域无监督注释工具的安装教程

      本文链接:https://www.haomeiwen.com/subject/rivzxjtx.html