在Linux(CentOS/Ununtu)中安装Circos

源码安装

在 Linux中安装,首先要去网站下载源码包,按照说明进行如下操作:

wget http://circos.ca/distribution/circos-0.69-6.tgz
tar xvfz circos-0.69-6.tgz
cd circos-0.69-6.tgz

然后还要安装下面这些Perl模块,以Config::General为例,安装方法是:

sudo perl -MCPAN -e shell
cpan> install Config::General
Carp
Config::General
Cwd
Data::Dumper
Digest::MD5
File::Basename
File::Spec::Functions
File::Temp
FindBin
Font::TTF::Font
GD
GD::Image
GD::Polyline
Getopt::Long
IO::File
List::MoreUtils
List::Util
Math::Bezier
Math::BigFloat
Math::Round
Math::VecStat
Memoize
Params::Validate
Pod::Usage
POSIX
Readonly
Regexp::Common
Set::IntSpan
Storable
Sys::Hostname
Text::Format
Time::HiRes

安装这些模块过程中,

Clone
List::MoreUtils
Test::LeakTrace
GD::Polyline

这些模块比较麻烦,总是提示安装失败。
 

推荐使用 cpanm 安装perl模块

  • 优点,可以自动解决perl 模块与模块之间的依赖,cpan 是不能自动解决的
wget  http://xrl.us/cpanm  --no-check-certificate -O /sbin/cpanm && chmod +x  /sbin/cpanm

如果你没有服务器权限,上述命令可能执行失败,可以将其中 sbin 替换为你的本地文件夹如 /home/lixy/local, 然后再 .bashrc 中给cpanm添加一个简命令

wget  http://xrl.us/cpanm  --no-check-certificate -O /home/lixy/local/cpanm && chmod +x  /home/lixy/local/cpanm

建议还在 .bashrc 或者 .zshrc 中配置一下别名,指向 163 的  cpan 的镜象:

alias cpanm='/home/lixy/local/cpanm  --mirror http://mirrors.163.com/cpan '
# 使用  -f 强制安装
cpanm -f Text::Format  

最新更新:

如果你安装过conda,可以使用 conda 安装 circos(仅适用与CentOS下) :

conda install circos

conda 安装时要注意你当前环境的perl版本,要求时5.26.2,其他的perl版本安装时会报错:

$ conda install circos
Solving environment: failed

UnsatisfiableError: The following specifications were found to be in conflict:
  - circos -> perl-readonly -> perl[version='>=5.26.2,<5.26.3.0a0']
  - perl=5.26.0
Use "conda info " to see the dependencies for each package.

$ perl --version

This is perl 5, version 26, subversion 0 (v5.26.0) built for x86_64-linux-thread-multi

Copyright 1987-2017, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

Ubuntu下:

apt-get install circos

参考:

  • https://blog.csdn.net/u011450367/article/details/41522729
  • https://www.cnblogs.com/foreverycc/archive/2013/06/01/3111747.html

注:

如果GD模块安装失败,可能是linux中缺少 libgd,

# centos 下:
yum -y install gd-devel

 

你可能感兴趣的:(linux,生物信息学)