orthomcl安装和配置

安装:

conda install orthomcl

复制orthomcl.config.template到工作目录下,改名为orthomcl.config

修改orthomcl.config的内容如下:

# this config assumes a mysql database named 'orthomcl'.  adjust according
# to your situation.
dbVendor=mysql
dbConnectString=dbi:mysql:orthomcl:mysql_local_infile=1
dbLogin=Your_username
dbPassword=Your_password
similarSequencesTable=SimilarSequences
orthologTable=Ortholog
inParalogTable=InParalog
coOrthologTable=CoOrtholog
interTaxonMatchView=InterTaxonMatch
percentMatchCutoff=50
evalueExponentCutoff=-5
oracleIndexTblSpc=NONE

创建账户并运行
为了避免其它问题,用root账户登入mysql并把下面的命令运行一遍就行了。
mysql -uroot -ppasswd

CREATE USER 'jiayuxin'@'localhost' IDENTIFIED BY '111111'; #创建账户
grant all privileges on orthomcl.* to 'jiayuxin'@'localhost';     #把database orthomcl的权限授权给账户
ALTER USER 'jiayuxin'@'localhost' IDENTIFIED WITH mysql_native_password BY '111111';   #更改加密方法

也可以直接用自己的账户创建一个database,就不用root用户给授权了,以下是常用命令。
mysql -ujiayuxin -p111111

drop database orthomcl;  #删除名为orthomcl的database
create database orthomcl;  #创建一个名为orthomcl的database
show databases;  #查看账户下存在的databases

使用root账户登录mysql

mysql -u root -p

输入密码进去mysql,使用SHOW VARIABLES LIKE 'local_infile';查看当前local_infile状态为OFF。


mysql> SHOW VARIABLES LIKE 'local_infile';

+---------------+-------+

| Variable_name | Value |

+---------------+-------+

| local_infile  | OFF  |

+---------------+-------+

1 row in set (0.00 sec)

使用SET GLOBAL local_infile = 1;修改local_infile格式,重新用SHOW VARIABLES LIKE 'local_infile';查看:


mysql> SHOW VARIABLES LIKE 'local_infile';

+---------------+-------+

| Variable_name | Value |

+---------------+-------+

| local_infile  | ON    |

+---------------+-------+

1 row in set (0.01 sec)

可以了。


运行到orthomclPairs时,出现错误提示DBD::mysql::st execute failed: The total number of locks exceeds the lock table size,查到两种办法,一种修改tmp变量的大小,另一种修改innodb_buffer_pool_size,都试一下。
进入mysql,输入show variables like "%tmp%";查看tmp大小:

mysql> show variables like "%tmp%";
+---------------------------------+-----------+
| Variable_name                   | Value     |
+---------------------------------+-----------+
| default_tmp_storage_engine      | InnoDB    |
| innodb_tmpdir                   |           |
| internal_tmp_mem_storage_engine | TempTable |
| slave_load_tmpdir               | /tmp      |
| tmp_table_size                  | 16777216  |
| tmpdir                          | /tmp      |
+---------------------------------+-----------+
6 rows in set (0.02 sec)

修改为1G:

SET GLOBAL  tmp_table_size =1024*1024*1024;

改完之后好像没变化,先不管,接着查看innodb_buffer_pool_size

mysql> show variables like "%_buffer%";
+-------------------------------------+----------------+
| Variable_name                       | Value          |
+-------------------------------------+----------------+
| bulk_insert_buffer_size             | 8388608        |
| innodb_buffer_pool_chunk_size       | 134217728      |
| innodb_buffer_pool_dump_at_shutdown | ON             |
| innodb_buffer_pool_dump_now         | OFF            |
| innodb_buffer_pool_dump_pct         | 25             |
| innodb_buffer_pool_filename         | ib_buffer_pool |
| innodb_buffer_pool_in_core_file     | ON             |
| innodb_buffer_pool_instances        | 1              |
| innodb_buffer_pool_load_abort       | OFF            |
| innodb_buffer_pool_load_at_startup  | ON             |
| innodb_buffer_pool_load_now         | OFF            |
| innodb_buffer_pool_size             | 134217728      |
| innodb_change_buffer_max_size       | 25             |
| innodb_change_buffering             | all            |
| innodb_log_buffer_size              | 16777216       |
| innodb_sort_buffer_size             | 1048576        |
| join_buffer_size                    | 262144         |
| key_buffer_size                     | 8388608        |
| myisam_sort_buffer_size             | 8388608        |
| net_buffer_length                   | 16384          |
| preload_buffer_size                 | 32768          |
| read_buffer_size                    | 131072         |
| read_rnd_buffer_size                | 262144         |
| sort_buffer_size                    | 262144         |
| sql_buffer_result                   | OFF            |
+-------------------------------------+----------------+
25 rows in set (0.00 sec)

改为3G:

mysql> SET GLOBAL innodb_buffer_pool_size=3*1024*1024*1024;
Query OK, 0 rows affected (0.00 sec)

重新运行试试。

提示错误DBD::mysql::st execute failed: The table 'InplgOrthoInplg' is full at /Some_path/,查了下原因可能有两种:1.存放mysql数据的硬盘满了。2.参数设置太小了。
第一种情况,尝试更改mysql数据存放位置,始终报错,暂时放在原处,还够用。
第二种情况,在/etc/my.cnf文件中[mysqld]字段下面添加命令innodb_data_file_path=ibdata1:10G:autoextend,重新运行试试。

你可能感兴趣的:(orthomcl安装和配置)