TPP:Installing on Mac OSX
From SPCTools
Revision as of 05:10, 30 March 2007 Ukeller (Talk | contribs) (→remove -lz from ramp.o dependencies in Makefile) ← Previous diff |
Revision as of 05:11, 30 March 2007 Ukeller (Talk | contribs) (→remove -lz from ramp.o dependencies in Makefile) Next diff → |
||
Line 174: | Line 174: | ||
Installing TPP_v3.0.0_SQUALL''' --[[User:Ukeller|Ukeller]] 22:10, 29 March 2007 (PDT) | Installing TPP_v3.0.0_SQUALL''' --[[User:Ukeller|Ukeller]] 22:10, 29 March 2007 (PDT) | ||
- | The new TPP 3.0.0 release needs some extra tweak since ProteinProphet is now also C++. Since it requires boost and expat change the /src/Makefile section to this: | + | The new TPP 3.0.0 release needs some extra tweak since ProteinProphet is now also C++. As it requires boost and expat change the /src/Makefile section to this: |
<pre> | <pre> |
Revision as of 05:11, 30 March 2007
Caution!
Please Note: The TPP is not currently officially supported on Max OSX. This means that we can not respond to installation or useage help requests. Users, however, are encouraged to post to the spctools-discuss newsgroup to seek help from the community, or contact the author (Ulrich, see below) directly.
Author
These notes were kindly prepared by Ulrich auf dem Keller of UBC (ukeller at interchange dot ubc dot ca), and formatted for the wiki with his permission by Josh Tasman.
Introduction
This guide describes installation of the TPP, version 2.9.9 (Gale) on Mac OSX 10.4. The author's machine specifications are Mac OS X 10.4.8 on a MacBook Pro, 2.33GHz Intel Core 2 Duo, 2GB RAM, 160GB HD.
This tutorial is intended for someone comfortable running unix shell commands and installing and configuring software.
Requirements
Intel-based Mac running OSX 10.4. At this time, certain parts of the code which rely on byte-order have not been tweaked for the PowerPC CPUs, which have reversed byte-order from Intel chips.
Getting the TPP source
TPP source at SourceForge: [1]
Prerequisites
install Apple's Developer Tools, including X11SDK.pkg
install fink including unstable tree
install Apache2
http://www.phpmac.com/articles.php?view=252
- you can also trigger System Preferences => Personal Websharing to start apache2 instead of built-in apache 1.3 (http://www.phpmac.com/articles.php?view=214) (note: TPP most likely also works with built-in Apache 1.3)
- modules included during built are sufficient to run the TPP (check with httpd -l)
edit httpd.conf
as per Linux README (enable SSI, cgi etc.)
In the author's install, DocumentRoot was changed from
/Library/WebServer/Documents
to
/Library/WebServer/Documents/thegpm
since X!Tandem and the GPM like to be the DocumentRoot:
# # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot "/Library/WebServer/Documents/thegpm" ... # # This should be changed to whatever you set DocumentRoot to. # <Directory "/Library/WebServer/Documents/thegpm"> ...
Appended to end of httpd.conf:
# ISB-Tools Trans Proteomic Pipeline directive # Alias /tpp/html "/usr/local/tpp/html" <Directory "/usr/local/tpp/html"> AllowOverride None Options Includes Indexes FollowSymLinks MultiViews Order allow,deny Allow from all </Directory> Alias /tpp/schema "/usr/local/tpp/schema" <Directory "/usr/local/tpp/schema"> AllowOverride None Options Includes Indexes FollowSymLinks MultiViews Order allow,deny Allow from all </Directory> Alias /tpp/cgi-bin "/usr/local/tpp/cgi-bin" <Directory "/usr/local/tpp/cgi-bin"> AllowOverride None Options ExecCGI Includes Indexes FollowSymLinks MultiViews AddHandler cgi-script .pl .cgi Order allow,deny Allow from all SetEnv WEBSERVER_ROOT /Library/WebServer/Documents/thegpm/ SetEnv WEBSERVER_URL http://localhost/ </Directory>
install gnuplot 4
easiest via fink
install wget
via fink
install md5sum
fink install coreutils
(jt: note, this failed but md5sum was already installed by default fink setup)
install sed
version 4.1.5:
fink install sed
install GD
http://www.paginar.net/matias/articles/gd_x_howto.html#sct09
- or you can use fink as well:
fink install gd
boost libraries
- install boost-1.33.1 (get source (http://sourceforge.net/project/showfiles.php?group_id=7586), configure & make & install)
do not use fink for boost installation as it comes configured "--without-serialization", which is required by the TPP code. (If you do want to use fink, you have to change the boost1.33.info file in the stable tree.)
nice
since nice resides in /usr/bin on OS X and not in /bin:
sudo ln -s /usr/bin/nice /bin/nice
Configuring TPP for installation
edit Makefile.incl according to Linux README
remove -lz from ramp.o dependencies in Makefile
zlib should be installed on your system anyhow, -lz is recognized when building the targets by dynamicloader
Note: if GD was installed using fink adjust GD_LIB accordingly (/sw/lib)
Makefile settings for pure fink install:
ifeq (${OS},Windows_NT) OSFLAGS= -D__CYGWIN__ GD_LIB= /lib/libgd.a else OSFLAGS= -D__LINUX__ GD_LIB= -L/sw/lib/ -lgd endif CFLAGS= ${OSFLAGS} ${XMLFLAGS} ${LGPLFLAG} -D__INTEL__ -DINLINING #DEBUG= -O2 # put here the name of c++ compiler CC=g++ ${CFLAGS} ${DEBUG} ${INCLUDE} -Werror -Dlint -pedantic-errors -Wformat -Wno-deprecated -Wno-char-subscripts -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE # put here the complete directory path for the include subdirectory CCINC= -I/sw/include # here again the name of the c++ compiler #LD=g++ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE LD=g++ ${INCLUDE} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE # here the complete directory path for the lib subdirectory followed by -lm LDFLAGS= -L/sw/lib -lexpat -lm ${DEBUG} OLD =
Installing TPP_v3.0.0_SQUALL --Ukeller 22:10, 29 March 2007 (PDT)
The new TPP 3.0.0 release needs some extra tweak since ProteinProphet is now also C++. As it requires boost and expat change the /src/Makefile section to this:
# # cygwin or linux? # ifeq (${OS},Windows_NT) OSFLAGS= -D__CYGWIN__ GD_LIB= /lib/libgd.a BOOST_REGEX_LIB= /lib/libboost_regex-gcc-mt.a else OSFLAGS= -D__LINUX__ GD_LIB= -lgd BOOST_REGEX_LIB= -lboost_regex -lpthread endif CFLAGS= ${OSFLAGS} ${XMLFLAGS} ${LGPLFLAG} -D__INTEL__ -DINLINING #DEBUG= -O2 # put here the name of c++ compiler CC=g++ ${CFLAGS} ${DEBUG} ${INCLUDE} -Dlint -pedantic-errors -Wformat -Wno-deprecated -Wno-char-subscripts -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE # put here the complete directory path for the include subdirectory CCINC= -I/usr/local/include -I/usr/include -I/usr/local/include/boost-1_33_1 IFLAGS = -I$(EXPAT)/lib -I/usr/local/include/boost-1_33_1 # here again the name of the c++ compiler #LD=g++ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE LD=g++ ${INCLUDE} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE # here the complete directory path for the lib subdirectory followed by -lm LDFLAGS= -L/usr/local/lib -L/usr/lib -L/sw/lib -lboost_regex -lboost_filesystem -lboost_serialization -lm ${DEBUG} OLD = #-oldcxx
For BOOST_REGEX_LIB "-static" has to be removed since Mac OS X does not support static linking of user binaries (crt0.o) but rather dynamic (crt1.o).
If boost is installed via fink change settings accordingly to /sw.
Note: Using /sw/include will cause an error due to a problem in "expat.h". Either load this header file from /usr/include or remove the "," at the end of line 46 in /sw/include/expat.h
"-Werror" was removed from the compiler flags since there were some "int" instead of "double" warnings when compiling ProteinProphet. So far they don't seem to be critical since the new C++ binary gives the same results as the old version.
Finally, line 264 in PepXMLViewer.html was changed back to
document.getElementById('msgs').innerHTML += "<br/>(URL: " + http_req.url ")";
With the extra "+" the ajax code did not work anymore.
change PepXMLViewer Makefile
if boost installed via fink change /usr/local/lib to /sw/lib:
# where to find libexpat.a for linking stage #VPATH = $(EXPAT)/.libs LDFLAGS = -L/usr/local/lib -lboost_regex -lboost_filesystem -lboost_serialization -lm $(PROFILE) # yes, the headers are in the 'lib' directory IFLAGS = -I$(EXPAT)/lib -I/usr/local/include/boost-1_33_1
edit perl scripts
(for most perl scripts, see note below:)
sed -i 's/linux/darwin/g' *.pl
don't replace "linux" by "darwin" in show_search_params.pl, show_help.pl
or better: not in those *.pl with $CGI_HOME instead of $CGI_HOME_FULLPATH in configuration for linux installation
modify source code: cgi_disCidData.c
(to get right path for png images with WEBSERVER_ROOT stripped off)
- lines 323-327:
//printf("<img src=\"%s\"/>\n", pngFile); //modification for Mac OS X char *pStr = strstr(pngFile, "/tpp"); printf("<img src=\"%s\"/>\n", pStr);
modify source code: show_sens_err.pl
(same WEBSERVER_ROOT strip off problem)
- -insert at line 215:
#added for Mac OS X - Uadk 03/10/07 my $serverRoot = $ENV{'WEBSERVER_ROOT'}; if ( (length $serverRoot) <= (length $local_pngfile) && index((lc $local_pngfile), (lc $serverRoot)) == 0 ) { $local_pngfile = '/' . substr($local_pngfile, (length $serverRoot)); }
build TPP code
make configure
make all
make install
generate directories
tpp/html, tpp/schema, tpp/cgi-bin in Apache DocumentRoot
TPP web GUI (Petunia)
getting the source
get tpp_gui from sashimi CVS repository
modify the code for OSX installation
change tpp_gui.pl paths etc.
generate the password
for "guest" account, using perl crypt, following the thread in spctools-discuss: http://groups.google.com/group/spctools-discuss/browse_thread/thread/fb8ea00f347f005d/296e071e68faf1f1?lnk=gst&q=perl+crypt&rnum=1#296e071e68faf1f1
Place the following code in an executable setpasswd.pl file and run as follows:
#!/usr/bin/perl -w print crypt($ARGV[0], "isbTPPspc") . "\n"; setpasswd.pl [password] > .password
Remaining issues
Link to ASAPRatio -pval.png in ProteinProphet has the the wrong path (WEBSERVER_ROOT does not get stripped off), but the image is generated.
There might be similar path problems as on other Linux distributions. To view the image simply change the URL manually. Should be relatively easy to fix for good perl programmers.