tophat作为当前流行的序列比对软件,为转录组分析提供了很多便利之处
本人原来下了并且安装了tophat2,但是觉得自己的虚拟机硬盘不够大,便重新建立了一个虚拟机并重新安装了tophat2。但是,这次安装我却遇到了许多问题
1.从官网上面直接下载并安装tophat2,再配置好环境变量后,运行tophat2出现如图所示的问题

出现这样的问题可能是因为Linux系统的python默认为python3,而运行tophat2,则需要python2的环境
所以我们先下载一个Anaconda来配置一个python2的环境
代码如下
wget https://repo.anaconda.com/archive/Anaconda3-5.2.0-Linux-x86_64.sh
运行Anaconda
sudo sh Anaconda3-5.2.0-Linux-x86_64.sh
在安装的过程中脚本会问你是否需要添加环境变量,选是,这样我们就不用再去添加环境变量了
下载并安装好Anaconda后,便可以用它来配置一个python2.7的环境,代码如下
conda create --name python27 python=2.7 -y
配置完成后后输入
conda info -e
就可以看到配置的信息如图

再次运行tophat2
结果又出现图示问题

出现这个问题的原因是:
虽然我们配置的python2.7的环境但是系统默认的还是python3,所以我们要把tophat2的解释器更改为我们配置好的python2.7
操作如下
1.先进入tophat2所在的文件夹 如图

然后输入代码
vi tophat
对tophat进行编译
将第一行解释器的路径更改为我们用Anaconda配置好的python2.7的路径(可以输入conda info -e)获得路径
如图

保存好
再次运行tophat2
又出现如图问题

我们切换为root 输入代码
sudo -i
运行tophat2

问题解决了!!!!
网友评论