Instaling Modware on GMOD Vmware appliance

From DictyWiki

Jump to: navigation, search

THIS IS FOR BRIAN O'CONNORS VMWARE APPLIANCE. THIS IS NOT GENERALLY COMPATIBLE WITH GMOD'S CHADO INSTALLATION AT THE MOMENT. DON'T USE THIS, USE THE ONE ON MODWARE DOWNLOAD SITE NOW.

wget http://downloads.sourceforge.net/gmod-ware/Modware-<LATEST_VERSION>.tar.gz?big_mirror=0
tar -xvzf Modware-*.tar.gz
cd Modware-*
perl Makefile.PL

Now I get this error:

DBI connect('dbname=chado;host=humerus.ctrl.ucla.edu;port=5432','postgres',...) failed: FATAL:  no pg_hba.conf entry for host "68.253.206.1", user "postgres", database "chado", SSL off
 at /usr/lib/perl5/site_perl/5.8.5/Ima/DBI.pm line 316
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
  • The connect string in Chado::DBI is hard coded fix it like this:
perl -pi.bak -e "s/host=humerus[^;]+/host=localhost/;" /usr/lib/perl5/site_perl/5.8.3/Chado/AutoDBI.pm
rm /usr/lib/perl5/site_perl/5.8.3/Chado/AutoDBI.pm.bak
  • then, Chado::AutoDBI is hard coded to connect to chado when the database for GMOD-web is chado-Sce-S228C
perl -pi.bak -e "s/dbname=chado;/dbname=chado-Sce-S228C/;" /usr/lib/perl5/site_perl/5.8.3/Chado/AutoDBI.pm
  • Then I tried Modware's Makefile.PL again and it worked, I replied to the questions with SGD answers
  • when I tried to run make prepdb, however, I ran into a wall. It seems the Chado::AutoDBI installed here, does not contain the extra method 'get_single_row' as the one installed by the GMOD installer
  • I fixed lib/Modware/DBH.pm in the following way
    • changed 'use Modware::Constant;' to 'require Modware::Constant;'. This is to defer the loading of Modware::Constant until after Modware::DBH is loaded. This is needed because I define a Chado::DBI::get_single_row in Modware::DBH;
    • added the following code to Modware::DBH
#
#
# NOT PART OF THE API, but useful function which returns a single row
#  and throws an error if more than one is returned
#
# Added as a utility function for modware
#
sub Chado::DBI::get_single_row {
   my ($proto, @args) = @_;
   my $class = ref $proto || $proto;

   my @rows  = $class->search( @args );

   my $count = @rows;
   die "only one row expected, @rows returned" if @rows > 1;

   return $rows[0];
}
  • Had to install List::Compare
perl -MCPAN -e shell
Personal tools