关于——细胞通讯分析-CytoTalk_软件运行过程遇到的问题

该软件发表在Science的子刊

运行示例已经写的非常清楚了,这里就不做任何的解释了
主要会遇到的问题进行记录

首先第一个问题,pcst_fast的安装:
可能由于兼容性问题,在使用pip install pcst_fast在python3.8中无法下载有两种解决办法

  1. 安装3.7版本的python
  2. 进入Github主页,下载pcst_fast,解压后进入文件夹,使用下面的代码安装
python setup.py install

第二个问题就是在调用JobRun_Parallel.R中的system("python gen_PCSF.py")函数的时候,可能会出现找不到python的问题.
这时候得看一下系统Python链接

ls -l /usr/bin/python* 

确保如下链接没有问题
在这里插入图片描述
这时候就可以按官方指导运行软件


补充1
可能是我自己的数据问题,在运行的过程中会出现NA值,在使用python脚本调用的时候会报错
这时候需修改一下python脚本中的部分代码,修改部分如下:

# -*- coding: utf-8 -*-
"""
Created on Mon Apr 16 12:09:32 2018

@author: Administrator
"""
import numpy
import pcst_fast

Edge = numpy.loadtxt("../../IntegratedNet_edge.txt", dtype = 'int64', delimiter = "\t")
Cost = numpy.loadtxt("IntegratedNet_edgeCost.txt", dtype = 'str')
Prize = numpy.loadtxt("../IntegratedNet_nodePrize.txt",dtype='str')
rootNode = numpy.loadtxt("../../RootNode.txt", dtype = 'int64')


Prize = numpy.char.replace(Prize, 'NA','0').astype(numpy.float64)
Cost = numpy.char.replace(Cost, 'NA','0').astype(numpy.float64)
# vertices, edges = pcst_fast(edges, prizes, costs, root, num_clusters, pruning, verbosity_level)
# root: the root note for rooted PCST. For the unrooted variant, this parameter should be -1.
# verbosity_level: an integer indicating how much debug output the function should produce. Note that the user should include this parameter.
PCSF_node, PCSF_edge =pcst_fast.pcst_fast(Edge, Prize, Cost, rootNode, 1, 'strong', 0)


numpy.savetxt("PCSF_Node.txt", PCSF_node, fmt='%d')  #-correct
numpy.savetxt("PCSF_Edge.txt", PCSF_edge, fmt='%d')
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值