温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

自动化运行OrthoMCL的方法

发布时间:2022-05-19 16:20:31 来源:亿速云 阅读:165 作者:iii 栏目:大数据

这篇文章主要介绍“自动化运行OrthoMCL的方法”,在日常操作中,相信很多人在自动化运行OrthoMCL的方法问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”自动化运行OrthoMCL的方法”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!

安装OrthoMCL Pipeline

直接去github下载zip安装包,或者直接使用git命令下载

git clone https://github.com/apetkau/orthomcl-pipeline.git

安装perl依赖包

使用cpan或者cpanm安装依赖包

$ 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

安装blast,MCL及OrthoMCL

安装好2.2.26版本的BLAST (blastall, formatdb, 不是blast+, 更旧的版本可能不会正确运行)
下载编译安装MCL
下载编译安装OrthoMCL
确保blastall, formatdb, MCl和OrthoMCL都加入了环境变量

检查依赖的软件是否安装齐全

出现下面的提示则安装齐全了

$ perl scripts/orthomcl-pipeline-setup.pl
Checking for Software dependencies...
Checking for OthoMCL ... OK
Checking for formatdb ... OK
Checking for blastall ... OK
Checking for mcl ... OK
Wrote new configuration to orthomcl-pipeline/scripts/../etc/orthomcl-pipeline.conf
Wrote executable file to orthomcl-pipeline/scripts/../bin/orthomcl-pipeline
Please add directory orthomcl-pipeline/scripts/../bin to PATH

Orthomcl-pipeline配置文件

配置文件在orthomcl-pipeline-installed-path/etc/orthomcl-pipeline.conf

blast:
  F: 'm S'
  b: 100000
  e: 1e-5
  v: 100000
filter:
  max_percent_stop: 20
  min_length: 10
mcl:
  inflation: 1.5
path:
  blastall: '/usr/bin/blastall'
  formatdb: '/usr/bin/formatdb'
  mcl: '/usr/local/bin/mcl'
  orthomcl: '/home/aaron/software/orthomcl/bin'
scheduler: fork
split: 4

根据计算资源可以把split改为合适的数字,split类似于运行的线程数

配置数据库

需要安装好MySQL数据库
1. 如果之前已经创建过orthomcl数据库,可以用下面的perl脚本进行配置

$ perl scripts/orthomcl-setup-database.pl --user orthomcl --password orthomcl --host localhost --database orthomcl --outfile orthomcl.conf --no-create-database
Connecting to database orthmcl on host orthodb with user orthomcl ...OK
Config file **orthomcl.conf** created.

2. 如果之前没有配置过orthomcl数据库,需要先以root运行mysql,创建orthomcl用户

$ mysql -u root -p
Enter password:
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, CREATE VIEW, INDEX, DROP on *.* to orthomcl;  #创建用户并授权
mysql> set password for orthomcl@localhost = password('orthomcl');  #设置用户密码
mysql> quit;

当用户创建后,再用perl脚本配置

$ perl scripts/orthomcl-setup-database.pl --user orthomcl --password orthomcl --host localhost --database orthomcl --outfile orthomcl.conf
Connecting to mysql and creating database **orthmcldb** on host orthodb with user orthomcl ...OK
database orthmcl created ...OK
Config file **orthomcl.conf** created.

脚本会生成orthomcl.conf文件,这个文件之后就不用坐任何修改了。

测试

$ perl t/test_pipeline.pl -m orthomcl.conf -s fork -t /tmp
Test using scheduler fork

TESTING NON-COMPLIANT INPUT
TESTING FULL PIPELINE RUN 3
README:
Tests case of one gene (in 1.fasta and 2.fasta) not present in other files.
ok 1 - Expected matched returned groups file
...

出现上面的信息说明安装成功了!!!

运行

$ ./bin/orthomcl-pipeline
Error: no input-dir definedUsage: orthomcl-pipeline -i [input dir] -o [output dir] -m [orthmcl config] [Options]
...

可以加上—nocompliant就可以不显示没必要的提示信息了

$ ./bin/orthomcl-pipeline -i ~/test_data/zbl -o ~/test_data/zbl-out -m orthomcl.conf --nocompliant

zbl文件夹里面放入fasta格式的蛋白序列文件,一个基因组一个文件,例如genome1.fasta, genome2.fasta, 文件后缀名必需是.fasta。zbl-out文件夹里面是所有的结果,包括聚类完成的groups文件,orthologs文件,inparalogs文件以及coorthologs文件。

到此,关于“自动化运行OrthoMCL的方法”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注亿速云网站,小编会继续努力为大家带来更多实用的文章!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI