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)
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
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.rbRun an X!Tandem search. Requires X!Tandem
mascot_search.rbRun a Mascot search. Requires a Mascot server
msgfplus_search.rbRun an MS-GF+ search. Requires MS-GF+
omssa_search.rbRun an OMSSA search. Requires OMSSA
peptide_prophet.rbPerform peptide inference based on search engine scores. Requires the TPP
interprophet.rbPerform peptide inference across multiple search engines. Requires the TPP
protein_prophet.rbPerform protein inference. Requires the TPP
mascot_to_pepxml.rbConvert raw mascot dat files to pepXML. Requires the TPP
tandem_to_pepxml.rbConvert raw X!Tandem outputs to pepXML. Requires the TPP
pepxml_to_table.rbConvert pepXML to tabular format
protxml_to_table.rbConvert protXML to tabular format
make_decoy.rbGenerate semi-random decoy sequences
sixframe.rbGenerate six-frame translations of DNA sequences
protxml_to_gff.rbMap peptides to genomic coordinates
protk_setup.rbInstall third party dependencies
manage_db.rbManage protein databases
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
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
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@example.com 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.iniin the galaxy-dist directory and set the configuration option
tool_dependency_dirto 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.4as 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 firstname.lastname@example.org rvmenv=`rvm env --path email@example.com` 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 firstname.lastname@example.org gem install protk -v '~>1.5' cd <tool_dependency_dir>/protk/ mkdir 1.5 rvmenv=`rvm env --path email@example.com` echo ". $rvmenv" > 1.5/env.sh ln -s 1.5 default