protk ( Proteomics toolkit )
What is it?
Protk is a suite of tools for proteomics. It aims to present a simple and consistent command-line interface across otherwise disparate third party tools. The following analysis tasks are currently supported;
- Tandem MS search with X!Tandem, Mascot, OMSSA and MS-GF+
- Peptide and Protein inference with Peptide Prophet, iProphet and Protein Prophet
- Conversion of pepXML or protXML to tabulular format
- Proteogenomics (mapping peptides to genomic coordinates)
Installation
Protk is a ruby gem and requires ruby 2.0 or higher with support for libxml2. To avoid installation problems we recommend using rvm to install ruby.
gem install protk
Usage
Protk consists of a suite of small ruby programs. After installing the protk rubygem the following should be available for running in your shell. Help can be obtained on using any program by typing its name without any arguments. Note than many protk programs require third party tools to be installed, see Configuration below for instructions on installing these.
tandem_search.rb
Run an X!Tandem search. Requires X!Tandemmascot_search.rb
Run a Mascot search. Requires a Mascot servermsgfplus_search.rb
Run an MS-GF+ search. Requires MS-GF+omssa_search.rb
Run an OMSSA search. Requires OMSSApeptide_prophet.rb
Perform peptide inference based on search engine scores. Requires the TPPinterprophet.rb
Perform peptide inference across multiple search engines. Requires the TPPprotein_prophet.rb
Perform protein inference. Requires the TPPmascot_to_pepxml.rb
Convert raw mascot dat files to pepXML. Requires the TPPtandem_to_pepxml.rb
Convert raw X!Tandem outputs to pepXML. Requires the TPPpepxml_to_table.rb
Convert pepXML to tabular formatprotxml_to_table.rb
Convert protXML to tabular formatmake_decoy.rb
Generate semi-random decoy sequencessixframe.rb
Generate six-frame translations of DNA sequencesprotxml_to_gff.rb
Map peptides to genomic coordinatesprotk_setup.rb
Install third party dependenciesmanage_db.rb
Manage protein databases
Configuration
Protk includes a setup tool to install various third party proteomics tools such as the TPP, OMSSA, MS-GF+, Proteowizard. If this tool is used it installs everything under .protk/tools
. To perform such an installation use;
protk_setup.rb tpp omssa blast msgfplus pwiz
By default protk will install tools and databases into .protk
in your home directory. If this is not desirable you can change the protk root default by setting the environment variable PROTK_INSTALL_DIR
. If you prefer to install the tools yourself protk will find them, provided they are included in your $PATH
. Those executables will be used as a fallback if nothing is available under the .protk
installation directory. A common source of errors when running the protk_setup script is missing dependencies. The setup script has been tested on ubuntu 12 with the following dependencies installed;
apt-get install build-essential autoconf automake git-core mercurial subversion pkg-config libc6-dev curl libxml2-dev openjdk-6-jre libbz2-dev libgd2-noxpm-dev unzip
Sequence databases
Protk also includes a script called manage_db.rb to install specific sequence databases for use by the search engines if desired. Databases installed via manage_db.rb can be invoked using a shorthand name rather than a full path to a fasta file, and Protk also provides some automation for database upgrades. Protk comes with several predefined database configurations. For example, to install a database consisting of human entries from Swissprot plus known contaminants use the following commands;
manage_db.rb add --predefined crap
manage_db.rb add --predefined sphuman
manage_db.rb update crap
manage_db.rb update sphuman
You should now be able to run database searches, specifying this database by using the -d sphuman flag. Every month or so swissprot will release a new database version. You can keep your database up to date using the manage_db.rb update command. This will update the database only if any of its source files (or ftp release notes) have changed. The manage_db.rb tool also allows completely custom databases to be configured. Setup requires adding quite a few command-line options but once setup, databases can easily be updated without further config. The example below shows the commandline arguments required to manually configure the sphuman database.
manage_db.rb add --ftp-source 'ftp://ftp.uniprot.org/pub/databases/uniprot/current_release/knowledgebase/complete/uniprot_sprot.fasta.gz ftp://ftp.uniprot.org/pub/databases/uniprot/current_release/knowledgebase/complete/reldate.txt' --include-filters '/OS=Homo\ssapiens/' --id-regex 'sp\|.*\|(.*?)\s' --add-decoys --make-blast-index --archive-old sphuman
Galaxy Integration
Many protk tools have equivalent galaxy wrappers available on the galaxy toolshed . In order for these tools to work you will also need to make sure that protk, as well as the necessary third party dependencies are available to galaxy during tool execution. If you install protk using the default system ruby (without rvm) this will probably just work, however you will lose the ability to run specific versions of tools against specific versions of protk. The recommended method of installing protk for use with galaxy is as follows;
Ensure you have a working install of galaxy.
Full instructions are available on the official Galaxy project wiki page. We assume you have galaxy installed in a directory called galaxy-dist.
Install rvm if you haven't allready. See here for more information.
curl -sSL https://get.rvm.io | bash -s stable
Install a compatible version of ruby using rvm. Ruby 2.0 or higher is required
rvm install 2.1
Install protk in an isolated gemset using rvm.
This sets up an isolated environment where only a specific version of protk is available. We name the environment according to the protk intermediate version numer (1.4 in this example). Minor bugfixes will be released as 1.4.x and can be installed without updating the toolshed wrappers
rvm 2.1 rvm gemset create protk1.4 rvm use [email protected] gem install protk -v '~>1.4'
Configure Galaxy's tool dependency directory.
Create a directory for galaxy tool dependencies. This must be outside the galaxy-dist directory. I usually create a directory called tool_dependencies alongside galaxy-dist. Open the file
universe_wsgi.ini
in the galaxy-dist directory and set the configuration optiontool_dependency_dir
to point to the directory you just created, eg;tool_dependency_dir = ../tool_dependencies
Create a tool dependency that sets up protk in the environment created by rvm
In this example we create the environment for protk
1.4
as this was the version installed in step 4 above.cd <tool_dependency_dir> mkdir protk cd protk mkdir 1.4 ln -s 1.4 default rvm use [email protected] rvmenv=`rvm env --path [email protected]` echo ". $rvmenv" > 1.4/env.sh
Keep things up to date
When new versions of galaxy tools are released they may change the version of protk that is required. Check the release notes on the tool to see what is needed. For example, if upgrading to version 1.5 you would do the following;
rvm 2.1 rvm gemset create protk1.5 rvm use [email protected] gem install protk -v '~>1.5' cd <tool_dependency_dir>/protk/ mkdir 1.5 rvmenv=`rvm env --path [email protected]` echo ". $rvmenv" > 1.5/env.sh ln -s 1.5 default