TPP:Installing on Mac OSX

From SPCTools

(Difference between revisions)
Jump to: navigation, search
Revision as of 19:51, 12 March 2007
Ukeller (Talk | contribs)
(install Apache2)
← Previous diff
Current revision
Luis (Talk | contribs)
(Caution!)
Line 1: Line 1:
==Caution!== ==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.''+''Please Note: '''The TPP is not currently officially supported on Max OSX.''' This means that we cannot respond to installation or usage help requests. Users, however, are encouraged to post to the spctools-discuss newsgroup to seek help from the community, or to contact the author (Ulrich, see below) directly.''
==Author== ==Author==
Line 6: Line 6:
==Introduction== ==Introduction==
-This guide describes installation of the TPP, version 2.9.9 (Gale) on Mac OSX 10.4. +This guide describes installation of the TPP, version v4.0 SQUALL (release candidate) rev.0, Build 200805281113 (linux) on Mac OSX 10.5.2
-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.+Test machine: MacBook Pro, 2.33 GHz Intel Core 2 Duo, 3 GB RAM, 160 GB HD.
 + 
 +Latest Mac OSX version used for testing: '''Intel 10.5.2'''
This tutorial is intended for someone comfortable running unix shell commands and installing and configuring software. This tutorial is intended for someone comfortable running unix shell commands and installing and configuring software.
==Requirements== ==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.+Intel-based Mac running OSX 10.5.2. 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== ==Getting the TPP source==
-TPP source at SourceForge: [http://sourceforge.net/project/showfiles.php?group_id=69281&package_id=126912]+*TPP source at SourceForge: [http://sourceforge.net/project/showfiles.php?group_id=69281&package_id=126912]
 +*Subversion Repository:
 + <nowiki>svn co https://sashimi.svn.sourceforge.net/svnroot/sashimi/trunk/trans_proteomic_pipeline path/to/local/directory</nowiki>
==Prerequisites== ==Prerequisites==
===install Apple's Developer Tools, including X11SDK.pkg=== ===install Apple's Developer Tools, including X11SDK.pkg===
 +
 +Important note: a recent X11 update from Apple may have erased previously installed X11SDK files; if you get errors from Fink regarding X11, reinstall X11SDK.pkg (from you OSX install discs) and try again.
===install fink including unstable tree=== ===install fink including unstable tree===
http://fink.sourceforge.net http://fink.sourceforge.net
 +
 +For Mac OS X 10.5 Leopard you have to install fink from source (fink-0.28.1) following instructions on http://www.finkproject.org/download/srcdist.php?phpLang=e
 +
 +I would recommend to build all packages from source with 'fink install'.
===install Apache2=== ===install Apache2===
-http://www.phpmac.com/articles.php?view=252 
-*you can also trigger the 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)+fink install is '''not recommended'''-- it sets up the config files in an unfamiliar way.
 +Following [http://www.phpmac.com/articles.php?view=252 a 10.4.6 install turorial] :
 + 
 +* download and decompress source
 +* in source dir:
 + sudo mkdir /apache2
 + ./configure --prefix=/apache2 --enable-module=most --enable-shared=max
 + make
 + sudo make install
 + 
 +*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 build are sufficient to run the TPP (check with httpd -l)
 + 
 +'''Note:''' Mac OS X 10.5 comes with Apache2, this step can be skipped.
 + 
 + 
 +====edit httpd.conf====
 + 
 +Location (following the above installation): /apache2/conf/httpd.conf
 + 
 +'''Note:''' on Mac OS X 10.5: /etc/apache2/conf/httpd.conf
 + 
 + 
 +=====running on a different port (1441 is the standard port for a TPP installation)=====
 +Change
 + Listen 80
 +to
 + Listen 1441
 + 
 + 
 +as per Linux README (enable SSI, cgi etc.)
 +======DocumentRoot======
-====httpd.conf==== 
In the author's install, DocumentRoot was changed from In the author's install, DocumentRoot was changed from
-/Library/WebServer/Documents + /Library/WebServer/Documents
to to
-/Library/WebServer/Documents/thegpm+ /Library/WebServer/Documents/thegpm
-since X!Tandem and the GPM like to be the DocumentRoot itself:+since X!Tandem and the GPM like to set the DocumentRoot to their own directory.
 + 
 +I will use '''/Library/WebServer/Documents/tpp''' in this example
 + 
 +Also change the <directory> section to match your DocumentRoot.
<pre> <pre>
# #
Line 51: Line 92:
# symbolic links and aliases may be used to point to other locations. # symbolic links and aliases may be used to point to other locations.
# #
-DocumentRoot "/Library/WebServer/Documents/thegpm"+DocumentRoot "/Library/WebServer/Documents/tpp"
... ...
Line 58: Line 99:
# This should be changed to whatever you set DocumentRoot to. # This should be changed to whatever you set DocumentRoot to.
# #
-<Directory "/Library/WebServer/Documents/thegpm">+<Directory "/Library/WebServer/Documents/tpp">
... ...
Line 65: Line 106:
</pre> </pre>
 +=====TPP-specific config=====
 +
 +Appended to end of httpd.conf; change "/usr/local/tpp" to wherever you will install the TPP, for instance "/Users/youraccount/tpp-bin".
-Appended to end of httpd.conf: 
<pre> <pre>
# ISB-Tools Trans Proteomic Pipeline directive # ISB-Tools Trans Proteomic Pipeline directive
Line 99: Line 142:
</pre> </pre>
 +
 +===Controlling Apache2===
 +*starting: you will have to do this manually every time you reboot unless you set the server to start automatically; see above section for link.
 + sudo /apache2/bin/apachectl -k start
 +
 +*stopping:
 + sudo /apache2/bin/apachectl -k stop
 +
 +*restarting (if you change config files)
 + sudo /apache2/bin/apachectl -k restart
 +
 +'''Note:''' on Mac OS X 10.5 Apache2 is started from the System Preferences.
===install gnuplot 4=== ===install gnuplot 4===
easiest via fink easiest via fink
 +
 + fink install gnuplot
 +
 +if you don't have a working TeX installation fink will ask to install it. Note: fink does no longer support a system-tetex or a system-texlive package for TeX distributions already installed on the system. The most convenient is to install the fink distribution to satisfy dependencies.
 +
 +remember, if you see errors related to X11, reinstall the Apple X11SDK.pkg.
 +
 +
 +'''Important''': gnuplot must be find-able by the apache program. Adjust paths or
 + ln -s /sw/bin/gnuplot /usr/bin/gnuplot
===install wget=== ===install wget===
-via fink+easiest via fink:
 + fink install wget
===install md5sum=== ===install md5sum===
- fink install GNOME coreutils+Only if necessary! Installed by default on modern fink installs. You can verify that it is already there by typing "which md5sum".
 + 
 + fink install coreutils
===install sed=== ===install sed===
Line 114: Line 182:
===install GD=== ===install GD===
-http://www.paginar.net/matias/articles/gd_x_howto.html#sct09 
-*or you can use fink as well: 
fink install gd fink install gd
===boost libraries=== ===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.)+You can either use fink (recommended) or compile from boost source manually:
 + 
 +====fink install====
 +Perhaps with older versions of fink, some report that it is necessary to edit the boost info file before installing with fink to disable --without-serialization. '''I did not need to do this with current fink install-- the standard fink installer seemed to work.'''
 + 
 +* /sw/fink/10.4/stable/main/finkinfo/libs/boost1.33.info
 + 
 + 
 + 
 + $ fink install boost1.33-shlibs
 + Password:
 + Information about 2301 packages read in 1 seconds.
 + fink needs help picking an alternative to satisfy a virtual dependency. The candidates:
 + (1) db44-aes: Berkeley DB embedded database - crypto
 + (2) db44: Berkeley DB embedded database - non crypto
 + Pick one: [1] 2
 + The following package will be installed or updated:
 + boost1.33-shlibs
 +
 +This step takes at least 1 hour. Maybe binary install is possible?
 + 
 +next:
 + fink install boost-1.33
 +(This step only takes a second.)
 + 
 +'''Note:''' with fink-0.28.1 on OS X 10.5.2 :
 + fink install boost1.33
 + 
 +will work fine.
 + 
 +====manual source install====
 +install boost-1.33.1:
 +* get source (http://sourceforge.net/project/showfiles.php?group_id=7586)
 +* configure & make & install
===nice=== ===nice===
since nice resides in /usr/bin on OS X and not in /bin: since nice resides in /usr/bin on OS X and not in /bin:
- ln -s /usr/bin/nice /bin/nice+ sudo ln -s /usr/bin/nice /bin/nice
- +
==Configuring TPP for installation== ==Configuring TPP for installation==
-===edit Makefile.incl according to Linux README===+===edit src/Makefile.incl according to Linux README===
-===remove -lz from ramp.o dependencies in Makefile===+create Makefile.config.incl for newer TPP releases!
-zlib should be installed on your system anyhow, -lz is recognized when building the targets by dynamicloader+ 
 +===edit src/Makefile===
 + 
 +Makefile settings for pure fink install: change lines for GD_LIB and LDFLAGS, marked with the comment "changed for OSX/fink"
 + 
 +'''Thanks to the great work of the TPP developers this is not neccessary anymore. The TPP will build without further changes by typing 'make all' in the src directory. This recommends a fink install of the packages mentioned above'''
 + 
 +Choose proper settings for manual or fink boost install.
 + 
 +<pre>
 +#
 +# 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= -L/sw/lib/ -lgd
 +BOOST_REGEX_LIB= -lboost_regex -lpthread
 +endif
 + 
 +....
 + 
 +# put here the complete directory path for the include subdirectory
 + 
 +## OSX: two options: fink or manual boost install
 + 
 +## use following for manual boost install
 +#CCINC= -I/usr/local/include -I/usr/include -I/usr/local/include/boost-1_33_1
 + 
 +## use following for fink boost install
 +CCINC= -I/sw/include -I/usr/include -I/sw/include/boost-1_33_1
 + 
 +....
 + 
 + 
 +# 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}
 + 
 +....
 + 
 +</pre>
 + 
 + 
 +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
 + 
 +<pre>
 +document.getElementById('msgs').innerHTML += "<br/>(URL: " + http_req.url ")";
 +</pre>
 + 
 +With the extra "+" the ajax code added an extra WEBSERVER_ROOT path to the url path.
 + 
 +('''You still have to do that for the TPP v4.0 (release candidate from svn!''')
 + 
 +Make sure protxml2html.pl in in your webserver executables path. The easiest way to do so is to make a symlink to /sw/bin which was already added to your path:
 + 
 +<pre>
 +ln -s /usr/local/tpp/bin/protxml2html.pl /sw/bin/protxml2html.pl
 +</pre>
===change PepXMLViewer Makefile=== ===change PepXMLViewer Makefile===
 +
 +'''Not necessary anymore!'''
 +
''if boost installed via fink change /usr/local/lib to /sw/lib:'' ''if boost installed via fink change /usr/local/lib to /sw/lib:''
Line 148: Line 313:
</pre> </pre>
- 
- 
- 
===edit perl scripts=== ===edit perl scripts===
Line 160: Line 322:
-===modify source code: cgi_disCidData.c===+===modify source code: src/Visualization/Pep3D/cgi_disCidData.c===
(to get right path for png images with WEBSERVER_ROOT stripped off) (to get right path for png images with WEBSERVER_ROOT stripped off)
*lines 323-327: *lines 323-327:
Line 171: Line 333:
</pre> </pre>
-===modify source code: show_sens_err.pl===+===modify source code: CGI/show_sens_err.pl===
 + 
 +'''Not neccessary anymore!'''
 + 
(same WEBSERVER_ROOT strip off problem) (same WEBSERVER_ROOT strip off problem)
*-insert at line 215: *-insert at line 215:
Line 188: Line 353:
==build TPP code== ==build TPP code==
- make all+ 
- make install+make configure
 +
 +make all
 + 
 +make install
 + 
 +==edit paths==
 +If tpp executables are not in /usr/local, you must adjust your paths accordingly.
==generate directories== ==generate directories==
tpp/html, tpp/schema, tpp/cgi-bin in Apache DocumentRoot tpp/html, tpp/schema, tpp/cgi-bin in Apache DocumentRoot
-==change httpd.conf==+'''necessary?'''
-as per Linux README (enable SSI, cgi etc.)+ 
 + 
 +==Try it!==
 +Load http://localhost:1441/tpp/cgi-bin/check_env.pl in your browser-- if no error, things are looking good.
==TPP web GUI (Petunia)== ==TPP web GUI (Petunia)==
===getting the source=== ===getting the source===
-get tpp_gui from sashimi CVS repository+ 
 +'''TPP GUI is included in the TPP source distribution now.'''
 + 
 +get tpp_gui from the [http://sourceforge.net/svn/?group_id=69281 sashimi SVN repository]
===modify the code for OSX installation=== ===modify the code for OSX installation===
Line 206: Line 384:
===generate the password=== ===generate the password===
 +
 +'''TPP comes with 'guest' user pre-configured now.'''
 +
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 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: Place the following code in an executable setpasswd.pl file and run as follows:
- #!/usr/bin/perl -w print crypt($ARGV[0], "isbTPPspc") . "\n"; + #!/usr/bin/perl -w
- + print crypt($ARGV[0], "isbTPPspc") . "\n";
 +then
setpasswd.pl [password] > .password setpasswd.pl [password] > .password
- 
- 
==Remaining issues== ==Remaining issues==
-ASAPRatio pval.png does not show up due to similar WEBSERVER_ROOT path 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.

Current revision

Contents

Caution!

Please Note: The TPP is not currently officially supported on Max OSX. This means that we cannot respond to installation or usage help requests. Users, however, are encouraged to post to the spctools-discuss newsgroup to seek help from the community, or to 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 v4.0 SQUALL (release candidate) rev.0, Build 200805281113 (linux) on Mac OSX 10.5.2 Test machine: MacBook Pro, 2.33 GHz Intel Core 2 Duo, 3 GB RAM, 160 GB HD.

Latest Mac OSX version used for testing: Intel 10.5.2

This tutorial is intended for someone comfortable running unix shell commands and installing and configuring software.

Requirements

Intel-based Mac running OSX 10.5.2. 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]
  • Subversion Repository:
svn co https://sashimi.svn.sourceforge.net/svnroot/sashimi/trunk/trans_proteomic_pipeline path/to/local/directory

Prerequisites

install Apple's Developer Tools, including X11SDK.pkg

Important note: a recent X11 update from Apple may have erased previously installed X11SDK files; if you get errors from Fink regarding X11, reinstall X11SDK.pkg (from you OSX install discs) and try again.

install fink including unstable tree

http://fink.sourceforge.net

For Mac OS X 10.5 Leopard you have to install fink from source (fink-0.28.1) following instructions on http://www.finkproject.org/download/srcdist.php?phpLang=e

I would recommend to build all packages from source with 'fink install'.

install Apache2

fink install is not recommended-- it sets up the config files in an unfamiliar way. Following a 10.4.6 install turorial :

  • download and decompress source
  • in source dir:
sudo mkdir /apache2
./configure --prefix=/apache2 --enable-module=most --enable-shared=max
make
sudo make install
  • 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 build are sufficient to run the TPP (check with httpd -l)

Note: Mac OS X 10.5 comes with Apache2, this step can be skipped.


edit httpd.conf

Location (following the above installation): /apache2/conf/httpd.conf

Note: on Mac OS X 10.5: /etc/apache2/conf/httpd.conf


running on a different port (1441 is the standard port for a TPP installation)

Change

Listen 80

to

Listen 1441


as per Linux README (enable SSI, cgi etc.)

DocumentRoot

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 set the DocumentRoot to their own directory.

I will use /Library/WebServer/Documents/tpp in this example

Also change the <directory> section to match your 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/tpp"

...

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/Library/WebServer/Documents/tpp">

...


TPP-specific config

Appended to end of httpd.conf; change "/usr/local/tpp" to wherever you will install the TPP, for instance "/Users/youraccount/tpp-bin".

# 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>

Controlling Apache2

  • starting: you will have to do this manually every time you reboot unless you set the server to start automatically; see above section for link.
 sudo /apache2/bin/apachectl -k start
  • stopping:
 sudo /apache2/bin/apachectl -k stop
  • restarting (if you change config files)
 sudo /apache2/bin/apachectl -k restart

Note: on Mac OS X 10.5 Apache2 is started from the System Preferences.

install gnuplot 4

easiest via fink

fink install gnuplot

if you don't have a working TeX installation fink will ask to install it. Note: fink does no longer support a system-tetex or a system-texlive package for TeX distributions already installed on the system. The most convenient is to install the fink distribution to satisfy dependencies.

remember, if you see errors related to X11, reinstall the Apple X11SDK.pkg.


Important: gnuplot must be find-able by the apache program. Adjust paths or

ln -s /sw/bin/gnuplot /usr/bin/gnuplot

install wget

easiest via fink:

fink install wget

install md5sum

Only if necessary! Installed by default on modern fink installs. You can verify that it is already there by typing "which md5sum".

fink install coreutils

install sed

version 4.1.5:

fink install sed

install GD

fink install gd

boost libraries

You can either use fink (recommended) or compile from boost source manually:

fink install

Perhaps with older versions of fink, some report that it is necessary to edit the boost info file before installing with fink to disable --without-serialization. I did not need to do this with current fink install-- the standard fink installer seemed to work.

  • /sw/fink/10.4/stable/main/finkinfo/libs/boost1.33.info


$ fink install boost1.33-shlibs
Password:
Information about 2301 packages read in 1 seconds.
fink needs help picking an alternative to satisfy a virtual dependency. The candidates:
(1)     db44-aes: Berkeley DB embedded database - crypto
(2)     db44: Berkeley DB embedded database - non crypto
Pick one: [1] 2
The following package will be installed or updated:
 boost1.33-shlibs

This step takes at least 1 hour. Maybe binary install is possible?

next:

fink install boost-1.33

(This step only takes a second.)

Note: with fink-0.28.1 on OS X 10.5.2 :

fink install boost1.33

will work fine.

manual source install

install boost-1.33.1:

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 src/Makefile.incl according to Linux README

create Makefile.config.incl for newer TPP releases!

edit src/Makefile

Makefile settings for pure fink install: change lines for GD_LIB and LDFLAGS, marked with the comment "changed for OSX/fink"

Thanks to the great work of the TPP developers this is not neccessary anymore. The TPP will build without further changes by typing 'make all' in the src directory. This recommends a fink install of the packages mentioned above

Choose proper settings for manual or fink boost install.

#
# 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= -L/sw/lib/ -lgd
BOOST_REGEX_LIB= -lboost_regex -lpthread
endif

....

# put here the complete directory path for the include subdirectory

## OSX: two options: fink or manual boost install

## use following for manual boost install
#CCINC= -I/usr/local/include -I/usr/include -I/usr/local/include/boost-1_33_1

## use following for fink boost install
CCINC= -I/sw/include -I/usr/include -I/sw/include/boost-1_33_1

....


# 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}

....


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 added an extra WEBSERVER_ROOT path to the url path.

(You still have to do that for the TPP v4.0 (release candidate from svn!)

Make sure protxml2html.pl in in your webserver executables path. The easiest way to do so is to make a symlink to /sw/bin which was already added to your path:

ln -s /usr/local/tpp/bin/protxml2html.pl /sw/bin/protxml2html.pl

change PepXMLViewer Makefile

Not necessary anymore!

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: src/Visualization/Pep3D/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: CGI/show_sens_err.pl

Not neccessary anymore!

(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

edit paths

If tpp executables are not in /usr/local, you must adjust your paths accordingly.

generate directories

tpp/html, tpp/schema, tpp/cgi-bin in Apache DocumentRoot

necessary?


Try it!

Load http://localhost:1441/tpp/cgi-bin/check_env.pl in your browser-- if no error, things are looking good.

TPP web GUI (Petunia)

getting the source

TPP GUI is included in the TPP source distribution now.

get tpp_gui from the sashimi SVN repository

modify the code for OSX installation

change tpp_gui.pl paths etc.

generate the password

TPP comes with 'guest' user pre-configured now.

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";  

then

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.

Personal tools