TPP 6.1.0: Installing on Ubuntu 20.04 LTS

From SPCTools

Revision as of 14:53, 27 June 2022; view current revision
←Older revision | Newer revision→
Jump to: navigation, search
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 6.1.0.

First some general notes

  • We assume a fresh installation of Ubuntu 20.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 20.04 LTS in March 2022
  • 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 /usr/local/tpp. If you want to install anywhere else, change accordingly
  • This installation assumes you will make your data directory /data. If you want to make your default data location elsewhere, 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 build-essential
sudo apt --yes install perl
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
sudo apt --yes install libgd-dev
sudo apt --yes install r-base
sudo apt clean all

Creating a suitable place to compile and install

In this recipe, we install in /usr/local/tpp and make the default data location /data. 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'. Adjust if you'll use a different account.

sudo mkdir /usr/local/tpp
sudo chown tpp.tpp /usr/local/tpp
sudo mkdir /data
sudo chown tpp.tpp /data

Pulling the TPP 6.1.0 source code from SourceForge

Create a ~/svn directory and pull release 6.1.0 (or alternatively, you can pull the very latest development code from trunk via the commented out command). Make sure there is 6 GB of free space here!

cd
mkdir svn
cd ~/svn
df -h .
svn checkout http://svn.code.sf.net/p/sashimi/code/tags/release_6-1-0
##svn checkout http://svn.code.sf.net/p/sashimi/code/trunk/trans_proteomic_pipeline

Compiling the source code

Create a custom site.mk file with something like the following. Adjust INSTALL_DIR and TPP_DATADIR to match the locations you created above. Leave TPP_DATAURL and TPP_BASEURL as is unless you're putting the TPP URL in a location other than the default URL. You can leave the default HTTP port of the TPP GUI as 10401 unless you really want to change it. You can change 10401 to 80 if you want the UI on the common port 80 instead.

cd ~/svn/release_6-1-0
echo "INSTALL_DIR = /usr/local/tpp" > site.mk
echo "TPP_DATADIR = /data" >> site.mk
echo "TPP_BASEURL = /tpp" >> site.mk
echo "TPP_DATAURL = /tpp/data" >> site.mk
echo "TPP_PORT = 10401" >> site.mk

Compile the whole package. 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. It has been reported that sometimes just doing another `make all` will allow completion of compilation. Try that first before trying something more complex. Otherwise, try to determine why the compilation failed. Perhaps some prerequisite software is not installed on your system. If you can't figure it out, post the operating system version, TPP version, and compilation error messages to spctools-discuss and someone can help you.

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 20.04 LTS that we tried on:

export PERL_MM_USE_DEFAULT=1
yes | sudo cpan install CGI
sudo cpan install XML::Parser
sudo cpan install XML::Twig
sudo cpan install FindBin::libs
yes | sudo cpan install JSON
sudo cpan install Tie::IxHash
sudo cpan install Statistics::Regression
sudo cpan install Statistics::R

Now test to make sure all modules are installed:

cd /usr/local/tpp/bin
export PERL5LIB=/usr/local/tpp/lib/perl
./test_tpi.pl

If you get any NOT FOUND errors, then go back to cpan and install them.

NOTE: If you have more than one version of Perl installed (e.g. system default, and then also your own), you should check carefully which version of Perl you're updating here and also check the shebang lines in the Perl scripts in $TPP/bin and $TPP/cgibin to ensure you're running the correct version of Perl.

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

Either now or after some further configuration and testing below, you may wish to delete the build directory, which is no longer needed:

cd ~/svn
/bin/rm -rf trans_proteomic_pipeline
/bin/rm -rf release_6-1-0

Configuring the Apache web server

The following assumes you will install on port 10401. Substitute 10401 for whatever other port you may have specified above in the site.mk file.

NOTE: If you are installing TPP on a cloud-based system such as AWS or Azure, you will very likely need to configure your network security rules (via the cloud computing console/portal) to allow inbound traffic to port 10401, else attempts to point a web browser to it will yield no response.

sudo apt --yes install apache2
cd /usr/local/tpp/conf

# Check your location with: http://www.whatsmyip.org/ and then configure the permission rules accordingly
cat httpd-2.4-tpp.conf | sed 's/Require ip 10/Require ip 174.250.12/' > httpd-2.4-tpp-1.conf

# Alternatively, you can allow traffic from anywhere. This might expose your server to some security vulnerabilities:
cat httpd-2.4-tpp.conf | sed 's/#Require all granted/Require all granted/' > httpd-2.4-tpp-1.conf


Next set up some needed Apache modules and restart:

sudo a2enmod rewrite
sudo a2enmod cgid
sudo systemctl restart apache2

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

cd /etc/apache2/conf-available
sudo cp -p /usr/local/tpp/conf/httpd-2.4-tpp-1.conf httpd-tpp.conf
cd ../conf-enabled
sudo ln -s ../conf-available/httpd-tpp.conf
sudo systemctl reload apache2

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
cd /usr/local/tpp
sudo chown -R www-data.www-data log users 
cd /data
sudo chown -R www-data.www-data . 

And now you're good to go ... Point your web browser 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.

If you get a response "Internal Server Error", you'll need to look at the contents of /var/log/apache2/error.log to see what went wrong. If the cause is not apparent, post the error log to the support group for assistance.

If you get *no response*, i.e. just hangs, this probably means that your firewall rules or cloud-based inbound traffic security rules have not been configured to allow inbound traffic to 10401. i.e., this is not likely a problem on your fresh Ubuntu TPP machine, but probably is the result configuration issues with your cloud provider or IT provider security system.


Testing the installation with a sample dataset (optional)

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

Navigate to:
http://xxx.xxx.xxx.xxx:10401/tpp/cgi-bin/tpp_gui.pl
- Login with guest and password

## In the Petunia interface in the Web browser:
[Files]
[Create new directory] tests
Go into tests

[TPP Tools] [Fetch Datasets]
 Choose target directory for downloaded files
   [Add Files] Go to the top level /local/data
     - Check box next to tests
     - (Select)
 Specify Dataset ID 
   Paste into URL box: http://www.peptideatlas.org/export/refData/QuickYeastUPS1.zip
 (Fetch Dataset)
 Wait a few moments and [Refresh] until the job is done
 Click on [this directory] and there should only be a subdirectory "QuickYeastUPS1"

[Files]
- Go to /local/data/params/
- Check box next to comet.params
- Click (Copy) button
- Go to /local/data/tests/QuickYeastUPS1
- Click (Paste) button
- On the same line as comet.params, click [Params]
Make the following changes (they might already be set, but check):
  peptide_mass_tolerance = 20
  peptide_mass_units = 2
  isotope_error = 3
- (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]
 Wait a few moments and [Refresh] until the job is done

[TPP Tools] [Analyze Peptides]
- (Add Files)
- Check box next to UPS1_50000amol_R1.pep.xml
- (Select)
- Under -PEPTIDEPROPHET OPTIONS- check box next to "Use accurate mass binning"
- Under -IPROPHET OPTIONS- Check box next to "RUN iProphet"
- Scroll to bottom and (Run XInteract)
- Wait a few moments and [Refresh] until the job is done
- Make sure no errors
- click on [PepXML] link in /local/data/tests/QuickYeastUPS1/interact.ipro.pep.xml [ PepXML ]

- Click on a probability and view the plots
- Go back to the PepXML Viewer tab
- Click on a value in the Ions column

[TPP Tools] [Analyze Proteins]
- (Add Files)
- Check box next to interact.ipro.pep.xml
- (Select)
- Checkmark "Input is from iProphet"
- (Run ProteinProphet)
- Wait a few moments and [Refresh] until the job is done
- click on [ProtXML] link in /local/data/tests/QuickYeastUPS1/interact.prot.xml [ ProtXML ]
- You should see a list of UPS and yeast proteins detected. Click around to explore

[TPP Tools] [Export mzIdentML]
- (Add Files)
- Check box next to interact.prot.xml
- (Select)
- Wait a few moments and [Refresh] until the job is done

Finis!

Personal tools