要安装好mysql,并且知道mysql的root账号否则没有看的必要!!
#先将orthomcl-pipeline 克隆下来
git clone https://github.com/apetkau/orthomcl-pipeline.git
#~/.bashrc 里添加下面这句话是cpanm能顺利安装perl模块
alias cpanm='cpanm --mirror http://mirrors.163.com/cpan/ --mirror-only'
#安装perl模块
cpanm BioPerl DBD::mysql DBI Parallel::ForkManager YAML::Tiny Set::Scalar Text::Table Exception::Class Test::Most Test::Warn Test::Exception Test::Deep Moose SVG Algorithm::Combinatorics
#安装mcl
conda install mcl
#安装指定版本blast(32还是64位看自己情况) blast-2.2.6-ia32-linux.tar.gz
#blast历史版本下载地址 [ftp://ftp.ncbi.nlm.nih.gov/blast/executables/legacy.NOTSUPPORTED](ftp://ftp.ncbi.nlm.nih.gov/blast/executables/legacy.NOTSUPPORTED)
#下载orthomcl ,将blast和orthomcl放进环境变量
wget http://orthomcl.org/common/downloads/software/v2.0/orthomclSoftware-v2.0.9.tar.gz
#测试依赖的软件是否完成
/usr/bin/perl scripts/orthomcl-pipeline-setup.pl
如果忘了mysql root密码,否则跳过
#mysql root密码修改
#1.打开/etc/my.cnf 文件
#2.找到[mysqld]配置行,在其下一行输入:skip-grant-tables
#3.重启mysql
/etc/init.d/mysqld restart
#4.无密码登录root
mysql -u root -p
#登录后
USE mysql ;
UPDATE user SET Password = password ( 'new-password' ) WHERE User = 'root' ;
flush privileges ;
exit;
#5.将my.ini 配置文件添加的一行去掉在重启一遍mysql
配置mysql
#以root登录mysql
mysql -u root -p
#登录后
create user 'orthomcl'@'localhost' identified by 'your_password';
GRANT ALL PRIVILEGES on *.* to 'orthomcl'@'localhost' WITH GRANT OPTION;
#测试一下
/usr/bin/perl scripts/orthomcl-setup-database.pl --user orthomcl --password your_password --host localhost --database orthomcl --outfile orthomcl.conf
报错:DBI connect('mysql:localhost:mysql_local_infile=1','orthomcl',...) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at scripts/orthomcl-setup-database.pl line 89.
找到my.cnf文件(查看下图),socket位置
vi /etc/my.cnf
![](https://img.haomeiwen.com/i13707266/2c13e56104aedac8.png)
ln -s /tmp/mysql.sock /var/lib/mysql/
再测试就成功
![](https://img.haomeiwen.com/i13707266/c4ab312f09973e2d.png)
最后测试正常
![](https://img.haomeiwen.com/i13707266/80558738846bfa09.png)
执行命令,-i 文件夹里的文件名必须是fasta结尾
/public/zhanglk/biosoft/orthomcl-pipeline/bin/orthomcl-pipeline -i ./pep1/ -o ./pep1_out -m /public/zhanglk/biosoft/orthomcl-pipeline/orthomcl.conf --nocompliant
网友评论