TPP 5.1.0: Installing on Ubuntu 16.04 LTS

From SPCTools

(Difference between revisions)
Jump to: navigation, search
Revision as of 00:05, 20 December 2017
Edeutsch (Talk | contribs)

← Previous diff
Current revision
Edeutsch (Talk | contribs)

Line 47: Line 47:
</pre> </pre>
-=== Downloading the very latest source code from svn ===+=== Pulling the TPP 5.1.0 source code from SourceForge ===
<pre>cd /local/svn <pre>cd /local/svn
Line 74: Line 74:
</pre> </pre>
-If the above completed without error, then you're ready to proceed. If the compilation stopped with an error, you will need to troubleshoot. Perhaps some prerequisite is not installed on your system. It has been reported that sometimes just doing another `make all` will allow completion of compilation. Try that first before trying something more complex.<P>+If the above completed without error, then you're ready to proceed. If the compilation stopped with an error, you will need to troubleshoot. Perhaps some prerequisite is not installed on your system. It has been reported that sometimes just doing another `make all` will allow completion of compilation. Try that first before trying something more complex.
Next, install it! Next, install it!
Line 90: Line 90:
install XML::Parser install XML::Parser
install FindBin::libs install FindBin::libs
 + install JSON
 + (you may need to answer 'y' to petulant question)
quit quit
</pre> </pre>
Line 102: Line 104:
However, if you get an error not being able to find a module, then go back to cpan and install it.<P> However, if you get an error not being able to find a module, then go back to cpan and install it.<P>
-If you have no interest in using the web interface, then you're done. Happy TPPing. However, if you want the web interface, install and configure Apache. The following assumes you will install on port 10401. Substitute 10401 for 80 if you want to install on the default port.+If you have no interest in using the web interfaces, then you're done. Happy TPPing. However, if you want the web interfaces, install and configure Apache.
 + 
 + 
 +=== Configuring the Apache web server ===
 + 
 +The following assumes you will install on port 10401. Substitute 10401 for 80 if you want to install on the default port.
<pre>sudo apt --yes install apache2 <pre>sudo apt --yes install apache2
Line 116: Line 123:
UNcomment these lines (and make sure they have leading slashes!): UNcomment these lines (and make sure they have leading slashes!):
SetEnv TPP_HOME /local/tpp SetEnv TPP_HOME /local/tpp
- SetEnv TPP_DATADIR /local/tpp/data+ SetEnv TPP_DATADIR /local/data
SetEnv TPP_BASEURL /tpp SetEnv TPP_BASEURL /tpp
SetEnv TPP_DATAURL /tpp/data SetEnv TPP_DATAURL /tpp/data
</pre> </pre>
-Next configure the permission access to the server. If only the localhost should be able to access the interface (e.g. installation on a laptop running Linux then only grant access to 127.0.0.1. Or you can just give access to a range of IP addresses. Or you could grant world access if you have collaborators everywhere accessing the system. This confers some additional possible security risks. In this example, we've used the Apache 2.4 syntax to grant access to IP addressed beginning with 127 (localhost) and 174 (ISB):+Next configure the permission access to the server. If only the localhost should be able to access the interface (e.g. installation on a laptop running Linux then only grant access to 127.0.0.1. Or you can just give access to a range of IP addresses. Or you could grant world access if you have collaborators everywhere accessing the system. This confers some additional possible security risks. In this example, we've used the Apache 2.4 syntax to grant access to localhost (127.0.0.1) and IP addresses 174.*.*.*. Access to all has been commented out:
<pre> <pre>
<Directory "/local/tpp"> <Directory "/local/tpp">
AllowOverride None AllowOverride None
- Require ip 127+ Require ip 127.0.0.1
Require ip 174 Require ip 174
-# Require all+# Require all granted
 +</Directory>
</pre> </pre>
Line 136: Line 144:
<Directory "/local/data"> <Directory "/local/data">
Options Includes Indexes MultiViews Options Includes Indexes MultiViews
- Require 174+ Require ip 127.0.0.1
-# Require all+ Require ip 174
 +# Require all granted
 + 
 + AddType text/html .shtml
 + AddHandler server-parsed .shtml
 +</Directory>
</pre> </pre>
-Next set up some needed Apache modules:+Next set up some needed Apache modules and restart:
<pre>sudo a2enmod rewrite <pre>sudo a2enmod rewrite
Line 147: Line 160:
</pre> </pre>
-Next install this config file. This may vary among distributions, but this seems like a nice way to do it on our test instance.+Next install this config file. This may vary among distributions, but this seems like a nice way to do it on Ubuntu 16.04.
<pre>cd /etc/apache2/conf-available <pre>cd /etc/apache2/conf-available
Line 167: Line 180:
-== Installing the tutorial data (optional) ==+== Testing the installation with a sample dataset (optional) ==
-If you want to test your installation using the SPC demo/tutorial data (yeast data) then there are a few extra steps. First create a demo directory in the data area+If you want to test your installation with a search and a PeptideProphet processing, try this:
-<pre>mkdir /local/tpp/data/demo</pre>+<pre>
 +Navigate to:
 +http://xxx.xxx.xxx.xxx:10401/tpp/cgi-bin/tpp_gui.pl
-Extract all the example files (mzXML, tandem params, fasta database) to <code>/local/tpp/data/demo</code>+- Login with guest and password
 +[Files]
 +[Create new directory] tests
 +Go into tests
-[STOPPED HERE. WHERE DID THESE FILES MAGICALLY COME FROM??]+## On the command-line:
 +ssh tpp@xxx.xxx.xxx.xxx
 +cd /local/data/tests
 +sudo chmod a+w .
 +wget http://www.peptideatlas.org/export/refData/QuickYeastUPS1.zip
 +unzip QuickYeastUPS1.zip
 +sudo chown -R www-data.www-data .
-You'll also need to create a download directory for SpectraST libraries.+Back in web interface
 +[Files]
 +- Go to /local/data/params/
 +- Check box next to comet.params
 +- Click (Copy) button
 +- Go to /local/data/tests/QuickYeastUPS1
 +- Check box next to comet.params
 +- Click (Delete) button
 +- Confirm by clicking (Confirm Delete) at top
 +- Click (Paste) button
 +- On the same line as comet.params, click [Params]
 +Make the following changes:
 + peptide_mass_tolerance = 20
 + peptide_mass_units = 2
 + isotope_error = 1
 +- (Save Search Parameters File)
-<pre>$ mkdir -p /usr/local/tpp/data/dbase/speclibs</pre> 
-Set the permissions and ownership+[Pipeline: Comet]
 +[TPP Tools] [Comet Search]
 + Choose mz[X]ML Input Files
 + [Add Files] Select /local/data/tests/QuickYeastUPS1/UPS1_50000amol_R1.mzML
 + Choose Comet Parameters File
 + [Add Files] Select comet.params
 + Choose a sequence database
 + [Add Files] Select Yeast_UPS_cRAP.fasta
 + [Run Comet Search]
-<pre>$ chown -R www-data:www-data /usr/local/tpp/data/demo /usr/local/tpp/data/dbase 
-$ chmod -R 0660 /usr/local/tpp/data/demo /usr/local/tpp/data/dbase 
-$ chmod -R a+X /usr/local/tpp/data/demo /usr/local/tpp/data/dbase</pre> 
-The tandem.xml parameters file has a hard coded path that is windows specific. You will need to change the windows path to isb_default_input_kscore.xml in tandem.xml to the correct Linux path. The file can normally be found in linux instalaltions at /usr/local/tpp/bin/isb_default_input_kscore.xml, but if you've followed these instructions, you will have copied it to /usr/local/data/parameters already.+[TPP Tools] [Analyze Peptides]
 +- (Add Files)
 +- Check box next to UPS1_50000amol_R1.pep.xml
 +- (Select)
 +- Check box next to "Use accurate mass binning"
 +- Scroll to bottom and (Run XInteract)
 +- [Refresh]
 +- Make sure no errors
 +- click on [PepXML] link in /local/data/tests/QuickYeastUPS1/interact.pep.xml [ PepXML ]
-Replace "C:\InetPub\wwwroot\ISB\data\parameters\isb_default_input_kscore.xml" with "/usr/local/tpp/data/parameters/isb_default_input_kscore.xml" in the tandem.xml file.+- Click on a probability
 +- Click on a value in the Ions column
 +</pre>

Current revision

middle
Note that this recipe will likely not be exactly applicable to different versions of TPP or different distributions of Linux, but perhaps can be a useful head start. For other versions of TPP, please see the README and INSTALL_LINUX files found in source code distribution for instructions on how to build TPP for the Linux platform.


Contents

Before we begin

This recipe describes installing TPP release 5.1.0.

First some general notes

  • We assume a fresh installation of Ubuntu 16.04 LTS as a starting point (LTS stands for Long Term Support, which means that this version of Ubuntu will be stable and supported for several years).
  • This recipe was tested on a fresh Azure cloud computing platform instance running Ubuntu 16.04 LTS in December 2017
  • We assume that there is an ordinary user account named 'tpp' that will be used as the primary account. This account will need sudo privileges.
  • This installation assumes you are installing to /local/tpp/, if you want to install anywhere else, change accordingly
  • This installation assumes you are using Apache 2.4 as your web server
  • The gray blocks are commands to be typed in at the shell directly. You should be able to copy and paste them a line at a time.

Installation

Installing prerequisite packages

Use the ubuntu package manager to upgrade any outdated packages and then install all the dependencies

sudo apt update
sudo apt --yes upgrade
sudo apt --yes install subversion
sudo apt --yes install make
sudo apt --yes install g++
sudo apt --yes install build-essential
sudo apt --yes install zlib1g-dev
sudo apt --yes install libghc-bzlib-dev
sudo apt --yes install gnuplot
sudo apt --yes install unzip
sudo apt --yes install expat
sudo apt --yes install libexpat1-dev

Creating a suitable place to compile and install

In this recipe, we install in /local. You may wish to install in a different location, and the recipe should be adjusted accordingly. This also assumes that you will use an account 'tpp' and group 'tpp'. Maybe you'll use a different account.

sudo mkdir /local
cd /local
sudo mkdir tpp data svn
sudo chown tpp.tpp tpp data svn

Pulling the TPP 5.1.0 source code from SourceForge

cd /local/svn
svn checkout svn://svn.code.sf.net/p/sashimi/code/tags/release_5-1-0

Compiling the source code

Create a custom site.mk file with something like the following. After pasting in the three data lines, hit CTRL-D.

cd /local/svn/release_5-1-0
cat > site.mk
INSTALL_DIR = /local/tpp
TPP_BASEURL = /tpp
TPP_DATADIR = /local/data

First make libgd.

make libgd

Then make everything else. This will start by unpacking Boost and ProteoWizard and compile all that and then compile the TPP. This takes quite a while.

make all

If the above completed without error, then you're ready to proceed. If the compilation stopped with an error, you will need to troubleshoot. Perhaps some prerequisite is not installed on your system. It has been reported that sometimes just doing another `make all` will allow completion of compilation. Try that first before trying something more complex. Next, install it!

make install

Next you'll need to make sure that all the Perl modules are available. The following works on the fresh version of Ubuntu 16.04 LTS that we tried on:

sudo cpan
      (answer yes)
  make install
  install Bundle::CPAN
      (this takes a long time. At one point you need to hit [ENTER] to accept the 'exit')
  install CGI
  install XML::Parser
  install FindBin::libs
  install JSON
       (you may need to answer 'y' to petulant question)
  quit

Now test to make sure all modules are installed:

cd /local/tpp/cgi-bin
./tpp_gui.pl

If it compiles and you get an error about being unable to find HomePath then you're fine.

However, if you get an error not being able to find a module, then go back to cpan and install it.

If you have no interest in using the web interfaces, then you're done. Happy TPPing. However, if you want the web interfaces, install and configure Apache.

Configuring the Apache web server

The following assumes you will install on port 10401. Substitute 10401 for 80 if you want to install on the default port.

sudo apt --yes install apache2
cd /local/tpp/conf
cat httpd-tpp.conf | sed 's/_TPP_PORT_/10401/' > httpd-tpp-1.conf
cat httpd-tpp-1.conf | sed 's/ScriptInterpreterSource/#ScriptInterpreterSource/' > httpd-tpp-2.conf

vi httpd-tpp-2.conf
Comment out:
#    PassEnv TPP_HOME
#    PassEnv TPP_DATADIR

UNcomment these lines (and make sure they have leading slashes!):
   SetEnv TPP_HOME    /local/tpp
   SetEnv TPP_DATADIR /local/data
   SetEnv TPP_BASEURL /tpp
   SetEnv TPP_DATAURL /tpp/data

Next configure the permission access to the server. If only the localhost should be able to access the interface (e.g. installation on a laptop running Linux then only grant access to 127.0.0.1. Or you can just give access to a range of IP addresses. Or you could grant world access if you have collaborators everywhere accessing the system. This confers some additional possible security risks. In this example, we've used the Apache 2.4 syntax to grant access to localhost (127.0.0.1) and IP addresses 174.*.*.*. Access to all has been commented out:

<Directory "/local/tpp">
    AllowOverride None
    Require ip 127.0.0.1
    Require ip 174
#   Require all granted
</Directory>

Also do the same for the data directory:

<Directory "/local/data">
    Options Includes Indexes MultiViews
    Require ip 127.0.0.1
    Require ip 174
#   Require all granted

    AddType text/html .shtml
    AddHandler server-parsed .shtml
</Directory>

Next set up some needed Apache modules and restart:

sudo a2enmod rewrite
sudo a2enmod cgid
sudo service apache2 restart

Next install this config file. This may vary among distributions, but this seems like a nice way to do it on Ubuntu 16.04.

cd /etc/apache2/conf-available
sudo cp -p /local/tpp/conf/httpd-tpp-2.conf httpd-tpp.conf
cd ../conf-enabled
sudo ln -s ../conf-available/httpd-tpp.conf
sudo service apache2 reload

If that reload generated an error, you'll need to troubleshoot your configuration. Next, set some appropriate permissions for the web server to write. With the first command, verify that your Apache server is running as the user www-data. If it's running as a different user, then substitute that.

ps aux | grep apache
set tmpUser=www-data
cd /local/tpp
sudo chown -R $tmpUser.$tmpUser data log users 

And now you're good to go ... head on over to http://localhost:10401/tpp/cgi-bin/tpp_gui.pl or if this is installed on a different machine, use its name or IP address, e.g. http://40.83.177.49:10401/tpp/cgi-bin/tpp_gui.pl. Note that the above installation assumes installation on port 10401. If you chose a different port, then adjust the above URLs accordingly.


Testing the installation with a sample dataset (optional)

If you want to test your installation with a search and a PeptideProphet processing, try this:

Navigate to:
http://xxx.xxx.xxx.xxx:10401/tpp/cgi-bin/tpp_gui.pl

- Login with guest and password
[Files]
[Create new directory] tests
Go into tests

## On the command-line:
ssh tpp@xxx.xxx.xxx.xxx
cd /local/data/tests
sudo chmod a+w .
wget http://www.peptideatlas.org/export/refData/QuickYeastUPS1.zip
unzip QuickYeastUPS1.zip
sudo chown -R www-data.www-data .

Back in web interface
[Files]
- Go to /local/data/params/
- Check box next to comet.params
- Click (Copy) button
- Go to /local/data/tests/QuickYeastUPS1
- Check box next to comet.params
- Click (Delete) button
- Confirm by clicking (Confirm Delete) at top
- Click (Paste) button
- On the same line as comet.params, click [Params]
Make the following changes:
  peptide_mass_tolerance = 20
  peptide_mass_units = 2
  isotope_error = 1
- (Save Search Parameters File)


[Pipeline: Comet]
[TPP Tools] [Comet Search]
 Choose mz[X]ML Input Files
  [Add Files] Select /local/data/tests/QuickYeastUPS1/UPS1_50000amol_R1.mzML
 Choose Comet Parameters File
  [Add Files] Select comet.params
 Choose a sequence database
  [Add Files] Select Yeast_UPS_cRAP.fasta
 [Run Comet Search]


[TPP Tools] [Analyze Peptides]
- (Add Files)
- Check box next to UPS1_50000amol_R1.pep.xml
- (Select)
- Check box next to "Use accurate mass binning"
- Scroll to bottom and (Run XInteract)
- [Refresh]
- Make sure no errors
- click on [PepXML] link in /local/data/tests/QuickYeastUPS1/interact.pep.xml [ PepXML ]

- Click on a probability
- Click on a value in the Ions column

Personal tools