单细胞学习

cellphoneDB呕心沥血下载安装教程

2023-04-27  本文已影响0人  pudding815

我安装了一天之后快哭了,然后去100块买了个老师指导
生信自学要么哭要么花钱,就是我这个垃圾
1、安装
https://github.com/ventolab/CellphoneDB官方地址
首先创建一个环境,现在已经更新到4.0.0了,要求py3.8
于是

conda create -n cpdb python=3.8
source activate cpdb
pip install cellphonedb gseapy -i https://pypi.tuna.tsinghua.edu.cn/simple

我试了无数个教程,就这个安装也不会报啥错
参考https://www.jianshu.com/p/a9e9ce9ee12b
这个软件是个基于python的包,直接再$后面调用是显示没有安装

看一下安装成功咩,输入python后出现三个大于号
$python
>>>import cellphonedb
>>>cellphonedb.version
>>>from cellphonedb.src.core.methods import cpdb_statistical_analysis_method

以上没报错就说明安装成功了

我网上搜的教程全都是shell做的,现在python才可以,所以难倒我了。买到了示例文件和数据,主要是写好了py脚本。提交就行了

数据都放好,提交就完事了
conda activate cpdb_py3.8
python test.py

至于我都py脚本,毕竟是花了钱的,先不无私分析了
等我学会了10x再教,因为里面的文件我还不懂
好几个人给我发消息
我就把我的脚本放上来吧,反正是我花钱买的,具体就大家自己看怎么修改,我py脚本不太会,指导不来不好意思

#!/usr/bin/env python
# coding: utf-8

cpdb_file_path = './cellphonedb/ref/cellphonedb.zip'
test_meta_file_path = './cellphonedb/data/test_meta.tsv'
test_counts_file_path = './cellphonedb/data/mtx'

from cellphonedb.src.core.methods import cpdb_statistical_analysis_method

deconvoluted, means, pvalues, significant_means = cpdb_statistical_analysis_method.call(
        cpdb_file_path = cpdb_file_path, 
        meta_file_path = test_meta_file_path,
        counts_file_path = test_counts_file_path,
        counts_data = 'gene_name',
        iterations = 100,
        threshold = 0.1,
        threads = 6, 
        output_suffix = "test", 
        output_path = "./cellphonedb/results/"
)
上一篇 下一篇

猜你喜欢

热点阅读