Tutorial: OrthoMCL installation on Ubuntu Linux
gravatar for Vimalkumar Velayudhan
5 months ago by
Vimalkumar Velayudhan180 wrote:

About OrthoMCL

OrthoMCL is a software used for assigning proteomes to ortholog groups.

About this tutorial

These are the steps I followed to install OrthoMCL on an Ubuntu 14.04 Linux server using MySQL as the database system.


  1. Ubuntu 14.04 (tested). Might work on other versions.
  2. All these steps are done with an user account with admin privileges (sudo).
  3. Install MySQL database server (This is an OrthoMCL requirement):

     sudo apt install mysql-server
     sudo service mysql start

    The install step will prompt for a password for the MySQL administrator.

  4. Install wget and checkinstall. We will use checkinstall to build a debian package (.deb) of OrthoMCL that can be installed, updated or removed easily:

    sudo apt install wget checkinstall

Procedure — Install OrthoMCL

Download and uncompress the OrthoMCL archive

wget http://orthomcl.org/common/downloads/software/v2.0/orthomclSoftware-v2.0.9.tar.gz
tar zxvf orthomclSoftware-v2.0.9.tar.gz

Create a Makefile

To create a debian package using checkinstall, an install step is required (ex: make install). The make command requires a Makefile. As OrthoMCL is a PERL package, we can generate a Makefile by first creating a Makefile.PL.

Change directory:

cd orthomclSoftware-v2.0.9

Using a text editor (ex: nano), create a new file with the following content and save it as Makefile.PL:

use ExtUtils::MakeMaker;

NAME       => 'OrthoMCLEngine::Main::Base',
VERSION    => '2.0.9',
PM         => {'lib/perl/OrthoMCLEngine/Main/Base.pm' => '$(INST_LIB)/OrthoMCLEngine/Main/Base.pm'},
EXE_FILES => ['bin/orthomclAdjustFasta',

Create a Debian package using checkinstall

  1. Use PERL to generate a Makefile

    perl Makefile.PL
  2. Use the generated Makefile to compile source code:

  3. Create a text file called description-pak with a description for the package like the following:

    An algorithm for grouping proteins into ortholog groups based on their sequence similarity
  4. Create a directory called doc-pak and copy included documentation.

    mkdir doc-pak
    cp -r doc/OrthoMCLEngine/Main/* doc-pak
  5. Run checkinstall to create debian package (note: change email address under maintainer)

    sudo checkinstall --install=no --pkgname orthomcl \
    --pkgversion 2.0.9 --pkgrelease 1 --pkglicense gpl \
    --maintainer "you@email.com" --provides orthomcl \
    --exclude /usr/local/lib/perl/5.18.2/perllocal.pod make install

    Press ENTER to build the package.

Install generated package

sudo dpkg -i orthomcl_2.0.9-1_amd64.deb

Create a database, configuration file and install schema

  1. Create the database, the database user and grant this user permissions to use/update the database.

    mysql -u root -p
    create database `orthomcl` character set = 'utf8';
    create user 'orthomcl'@'localhost' identified by 'your-password-here';
    grant SELECT, INSERT, UPDATE, DELETE, CREATE VIEW, CREATE, INDEX, DROP on `orthomcl`.* to `orthomcl`@localhost;
  2. For the orthoMclLoadBlast command to work, the local-infile option has to be enabled. Without this option, the command fails with an error - used command is not allowed with this MySQL version. To prevent this, create /etc/mysql/conf.d/client.cnf with the following content (creating this file requires sudo/root privileges):


    Restart MySQL server for the change to take effect:

    sudo service mysql restart
  3. Most OrthoMCL commands require a configuration file. We can copy the configuration template that is distributed with the software, make changes according to our configuration (i.e., database name, user, password) and then provide that configuration file to the commands.

    Copy template:

    sudo cp /usr/share/doc/orthomcl/orthomcl.config.template /etc/orthomcl.config

    Edit this file using a text editor and update configuration:

  4. Install schema:

    sudo orthomclInstallSchema /etc/orthomcl.config install_schema.log

    This command should complete without any errors.

(Optional) Create an orthomcl group

This step is optional and is not in the official documentation. When multiple users require access to the database, they can be added to an user group. Only members in this group will have read access to /etc/orthomcl.config. Here is an example:

sudo groupadd orthomcl
sudo gpasswd -a vimal orthomcl

Now update permissions on the file /etc/orthomcl.config:

sudo chgrp orthomcl /etc/orthomcl.config
sudo chmod 640 /etc/orthomcl.config


The OrthoMCL user guide.

ADD COMMENTlink modified 26 days ago • written 5 months ago by Vimalkumar Velayudhan180

Thank you for posting this tutorial. However, I am running into an issue I am not able to compile the makefile. I get this error:

make: *** No rule to make target 'Makefile.PL', needed by 'Makefile'.  Stop.

I made the makefile.pl file as per the instructions. Not sure how to debug the Makefile.pl, as the message suggests the Makefile.pl doesn't exist.

ADD REPLYlink modified 9 weeks ago by Ram15k • written 12 weeks ago by apulunuj0

Here are some things to check:

  1. Did you save the file as Makefile.PL? (case-sensitive)

  2. When you run perl Makefile.PL, is a Makefile present in the directory?

If so, you only need to run make to compile.

ADD REPLYlink modified 12 weeks ago • written 12 weeks ago by Vimalkumar Velayudhan180

Hello! Thank you for this amazing post!

I did everything you said and It was running well until step 9) orthomclLoadBlast. The code I wrote is:

sudo orthomclLoadBlast /etc/orthomcl.config similarSequences.txt

and I got the following error:

DBD::mysql::st execute failed: Data too long for column 'QUERY_ID' at row 1 at /usr/local/bin/orthomclLoadBlast line 39, <F> line 14.

Could you please help me to find out how to solve this issue? my similarSequences.txt file is 31GB.

In this sense, the blast-all table is about 67 GB, I have another doubt, in which mysql.cnf file I have to set the myisam_max_sort_file? I need to change it from 200 G to 400 GB, but I am not sure where to find the correct mysql.cnf file.

Thank you so much, and I really hope you can help me to find a solution.

ADD REPLYlink modified 9 weeks ago by Ram15k • written 11 weeks ago by biodianita0

Sorry for the delayed response. Your query_id's might be longer than 60 characters which is the limit for that column in the table. The MySQL configuration file is at /etc/mysql/my.cnf on Ubuntu systems. The server configuration should go under [mysqld].

ADD REPLYlink written 9 weeks ago by Vimalkumar Velayudhan180

when I create the file /etc/mysql/conf.d/client.cnf (step 2 creating database)on my Ubuntu 16.04 and I add

[client] loose-local-infile=1

I can't save the file, because i have no permission. What can be the cause of this?

ADD REPLYlink written 9 weeks ago by lmjperda0

Editing this file requires root (sudo) privileges.

I have updated the post to reflect this. Thank you!

ADD REPLYlink modified 9 weeks ago • written 9 weeks ago by Vimalkumar Velayudhan180

I got error in this part:

sudo checkinstall --install=no --pkgname orthomcl \ --pkgversion 2.0.9 --pkgrelease 1 --pkglicense gpl \ --maintainer "you@email.com" --provides orthomcl \ --exclude /usr/local/lib/perl/5.18.2/perllocal.pod \

make install

--> Error: mmbl@mmbl-H97M-D3H:~/orthomclSoftware-v2.0.9$ make install Manifying 1 pod document !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ERROR: Can't create '/usr/local/bin' Do not have write permissions on '/usr/local/bin' !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! at -e line 1. Makefile:832: recipe for target 'pure_site_install' failed make: * [pure_site_install] Error 13

ADD REPLYlink written 27 days ago by bioinfool0

That entire command should be on a single line:

sudo checkinstall --install=no --pkgname orthomcl --pkgversion 2.0.9 --pkgrelease 1 --pkglicense gpl --maintainer "you@email.com" --provides orthomcl --exclude /usr/local/lib/perl/5.18.2/perllocal.pod make install

The linebreaks (\) were added for clarity.

ADD REPLYlink modified 26 days ago • written 26 days ago by Vimalkumar Velayudhan180


Thanks for the quick reply. Already did it by adding sudo. Anyway, my orthomcl analysis is running well until in step 9 when we get an error message. Below is the script I used starting in blastall.

  1. Blastall

    $ blastall -p blastp -F 'm S' -v 100000 -b 100000 -z 55 -e 1e-5 -d my_prot_blast_db -i goodProteins.fasta -o out.tab -m 8

  2. orthomclBlastParser

    $ orthomclBlastParser out.tab compliantFasta >> similarSequences.txt

  3. orthomclLoadBlast

    $ orthomclLoadBlast orthomcl.config similarSequences.txt

    Error: DBD::mysql::st execute failed: Data too long for column 'SUBJECT_ID' at row 1567

I don't know how different this error message compared from previous post.

ADD REPLYlink modified 24 days ago • written 25 days ago by bioinfool0

Sorry I wouldn't be of much help with the usage of the software as I've only performed installation for users in the lab.

The SQL error is similar to the one reported earlier by biodianita. From looking at the orthomclLoadBlast script, it appears both the SUBJECT_ID and QUERY_ID have a 60 character limit on length. So you would need to trim your id's to be within this length.

ADD REPLYlink written 24 days ago by Vimalkumar Velayudhan180

Although I haven't checked my similarSequences.txt yet because I am away as of the moment, but the adjustFasta step in orthomcl should rename identifier into xx|... which is surely <60 characters, right? I am wondering if this has something to do with the strictness of the mysql? Is there a way to get ease of this or to adjust this? You mentioned about the my.cnf and mysqld but i wasnt able to follow what should be done there.

ADD REPLYlink written 24 days ago by bioinfool0

Hi, an error prompt in my in orthomclDumpPairsFiles:

DBD::mysql::st execute failed: Error writing file '/tmp/MYza1d1c' (Errcode: 28 - No space left on device) at /home/.../bin/orthomclDumpPairsFiles line 54, <f> line 14.

Do you have any idea how to solve this? Thanks!

ADD REPLYlink modified 16 days ago • written 17 days ago by bioinfool0

Your hard disk is full. You could try to free some disk space by removing files you don't need or moving input/output files from previous steps. Another possibility is to move the database directory to a new location with free space i.e., a separate disk partition. Here is a tutorial on how to do this:


If you are not using Ubuntu 16.04, then please try searching for tutorials/documentation for the distribution you are using as there could be minor differences.

ADD REPLYlink written 16 days ago by Vimalkumar Velayudhan180

Thanks for the link that provides a stepwise process for moving db with enough space. Apparently, I think the problem is that my disk is full in general. However, i cant delete programs or files as of the moment. I resolved with using other pc to complete the last remaining processes which i am sure has enough space. My orthomcl installation is fine until in last step ("sudo orthomclInstallSchema /etc/orthomcl.config install_schema.log"):

Can't locate DBD/mysql.pm in @INC (you may need to install the DBD::mysql module) (@INC contains: /usr/local/bin/../lib/perl /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /usr/local/share/perl/5.22.1/OrthoMCLEngine/Main/Base.pm line 51, <f> line 14

It first asked me with DBI. I think I successfully installed it; now it is asking with DBD::mysql module, i wonder if you have any idea how to install. Thanks for the help, really!

ADD REPLYlink modified 14 days ago • written 15 days ago by bioinfool0
gravatar for bioinfool
4 weeks ago by
bioinfool0 wrote:


Can you complete the steps after Install schema?

ADD COMMENTlink written 4 weeks ago by bioinfool0
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1226 users visited in the last hour