Installation README

This README is aimed for those with a reasonable knowledge of Unix/Linux and some knowledge of databases, compilation installs and so forth. It is in other words intended for those that might reasonably be able to install and administer the current version of this system.

This README probably contains lots of errors. If you find any, then please let me know so that I can update the ones I use (see address at bottom).

Prior Requirements

A reasonably up to data Linux or Unix system with the Qt GUI development libraries installed appropriately (the environment variable QT_DIR should probably point to the root of the installation). If you don't know what this is, then check your Linux distribution for details, or get the libraries fresh from Trolltech.

Procedure

  1. Get the appropriate tarball from the download page.
  2. Unpack this tarball in the home directory of the user who will administer and manage the system. This is not great for security reasons, so I would suggest that you create a separate user for this purpose. This tarball contains the following directories:
    1. affymetrix: This directory contains some documentation for the project (in documentation), some scripts for converting data formats (Format_converters), some datafiles that are necessary to enter data (libs), and finally my programs which are in the programs directory.
    2. database: contains a backed up copy of the main database.
    3. db_installation: This contains files required to install the postgresql database system and the interface libraries.
    4. script: contains a couple of scripts which may be useful for the administrator. They should probably be modified by to suit local circumstance.
  3. Have a look around the directories, perhaps particularly at the documentation directory in the affymetrix directory. The documentation is in html format, and can be viewed with an appropriate browser. This may not be upto data in which case please check out the home page.
  4. Install (if you haven't yet) the postgresql database system. If you already have this, make sure that you have also installed the perl and C++ interfaces to it. These are included in the db_install directory. When configuring the postgresql system you should probably make it thread safe, there is an option for this somewhere in the system. Compiling the libpq++ libraries on AMD64 architectures can be problematic. For details of how to fix this, read the AMD64_BUG file; if this makes no sense to you let me know and I'll try to provide more details.
  5. As postgres create a new data base user with the username of the person who will be administering the system (this is likely to be you the reader, or you may want to create a separate user so that the system can be administered by more than one person). Give this user all sorts of privileges (i.e. can creat other users and can create databases). I'm not sure if this is necessary, but its what I do.
  6. As the newly created database user create a database called 'expression'. Do this using the createdb program that is part of postgresql. It may be necessary to use the switch -E SQL_ASCII (i.e. do 'createdb -E SQL_ASCII expression'). Restore the database in the database directory into this using pg_restore. It may be necessary to run this with the --no-privileges option. (i.e. do 'pg_restore -d expression --no-privileges'), and possibly --no-owner. (This should not generally be necessary, but in some distributions that I made before it was needed due to carelessness on my part. If you find that this is necessary please let me know and I'll try to sort the things out.)
  7. use psql and have a look at the database.. It's a mess, with all sorts of old and new tables mixed up with each other. I have begun to create a schema for the database, but it isn't done yet..
  8. Go into the affymetrix/programs/server/mt_server_x.y/ directory and do something like 'make clean', and 'make'. Note that you'll need to have the Qt libraries present on the system, and for the environment variable 'QT_DIR' to point to the appropriate location. If this is the case you can use qmake (qmake -o Makefile mtserver.pro) to create a new Makefile, but this will still have to be edited to include -I/usr/local/pgsql/include, -L/usr/local/pgsql/lib, and -lpq++. Note that for some reason the CXX flags need to include '-DHAVE_NAMESPACE_STD -DHAVE_CXX_STRING_HEADER -DDLLIMPORT=""' for things linking to the libpq++ to work (I suggest looking at the Makefile that is included in the libpq++ distribution for clues as to how it should look, before you run qmake). Ideally I should rewrite the server at some point to make it dependent only on the libpq libraries (libpq++ is not maintained anymore)...
  9. If that worked, then you might as well try to compile the client application, in the obvious location. This doesn't need to link to any postgres libraries, but will need to link to Qt libraries, so you'll need to have these set up (Again you may need to create a new makefile using qmake, this should work for this).
  10. Note that the 'winExecutable' directory contains a client executable file, and the appropriate Qt lib that it needs to link to, plus documentation and stuff. I normally stick this directory in a directory that I export as a read-only samba directory. This means that windows clients can directly run the client application, and access the documentation without installing anything on their computer.
  11. Note also, that you probably need to recompile the client application for Linux, as it may not be binary compatible with whichever version of the Qt libraries you have. This is not usually a problem, but my libraries are rather old, so you may get some complaints from the compiler.

If you have a distribution that includes some expression data then you can start the server at this point. This can be done either manually, or using the restart_server.pl script. You can choose the database and the port used by the server with the -d and -p options respectively. The server may take 10 to 30 minutes to start up depending on your computer. This is because of the way it gets the expression data from the database. I've been considering changing this for a while, but ... its not high on my list of things to do.

If your distribution does not contain any expression data, then you'll need to add some data to the database before you start the server. The easiest way to do this is to use the addFileBatch.pl script. Check the admin page on how to use this. Note however that this relies on a whole load of scripts that are present in the tarball. For instructions on how to to do this, go to the documentation directory and check the file for administrators (first load the index.html file into your browser, and then check out the details). The documentation can also be found at http://www.cdb.riken.jp/scb/documentation/index.html).

At some point you might want to stick the different executables in places that are accessible by users. Note that the client application looks for a set of files eiter in the directory from its run or in $CLIENT_DIR for some default settings (like default ports, ip addresses, some pixmaps and other stuff).

The documentation is incomplete. If you have questions, let me know, at the appropriate email address (usually mjakt@cdb.riken.jp), but this may change. Ideally if you have a problem, and then solve it, it would be great if you can write a little html note of this, either as a patch to the documentation, or perhaps as part of a FAQ list if this seems more appropriate.

One important note. The default administrator and password can be found in the README_PASSWORD file in the affymetrix/programs directory. This can be changed using the client application, and with a little bit of SQL. It obviously should be changed.. and one of these days I'll write a program that makes it easy to specify passwords without having to log in first.