Unipept CLI documentation v1.1.0

The Unipept command line interface (CLI) offers an easy way to integrate Unipept metaproteomics functionality into your data processing pipelines and scripts.

These tools provide a command line interface to the Unipept web services and a few utility commands for handling proteins using the command line. All tools support fasta and plain text input, multiple output formats (csv, xml and json) and parallel web requests for improved performance.

The Unipept command line tools are open source under the MIT License and all code is available on Github. Changes between releases are listed in the changelog. In case you have encountered an issue using these tools, have feature requests or found a bug, don't hesitate to contact us by email (unipept@ugent.be), or create an issue on Github.

uniprot
Fetches UniProt entries based on their accession numbers.
prot2pept
Splits proteins into peptides based on (trypsin) digest.
peptfilter
Filters peptides based on length and amino acid occurrence.
unipept pept2prot
Returns the set of UniProt entries containing a given tryptic peptide.
unipept pept2taxa
Returns the set of taxa extracted from the UniProt entries containing a given tryptic peptide.
unipept pept2lca
Returns the taxonomic lowest common ancestor for a given tryptic peptide.
unipept taxa2lca
Returns the taxonomic lowest common ancestor of a given list of taxon identifiers.
unipept taxonomy
Returns the taxonomic information for a given NCBI taxon identifier.

Installation

To use the Unipept command line tools, Ruby needs to be installed on your system. We recommend using Ruby 2.2, but all versions since Ruby 1.9.3, as well as JRuby are supported. To check if you have the correct Ruby version installed, open a terminal and run ruby --version.

$ ruby --version
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]

Installing Ruby

If the ruby --version command returns command not found, Ruby is not yet installed on your system. More information on installing Ruby can be found at https://www.ruby-lang.org/en/installation/.

The Unipept CLI is available as a gem. This means it can easily be installed with the gem install unipept command:

$ gem install unipept
Fetching: unipept-1.1.0.gem (100%)
Successfully installed unipept-1.1.0
Parsing documentation for unipept-1.1.0
Installing ri documentation for unipept-1.1.0
Done installing documentation for unipept after 0 seconds
1 gem installed

After successful installation, the unipept command should be available. To check if unipept was installed correctly, run unipept --version. This should print the version number:

$ unipept --version
1.1.0

More information about the installed command can be found on these pages, or by running the unipept -h command.

Permission problems

When trying to install a gem, you might run into permission problems if you don't have write access to the default installation directory. This can be fixed by doing a user install, which installs the gem in your home directory. Simply run gem install unipept --user-install instead of the normal installation command. More information can be found on the RubyGems website.

Updates

To update the Unipept command line tools to the latest version, simply run gem update unipept. The changes between releases are listed in the changelog.

$ gem update unipept
Updating installed gems
Updating unipept
Fetching: unipept-1.1.0.gem (100%)
Successfully installed unipept-1.1.0
Parsing documentation for unipept-1.1.0
Installing ri documentation for unipept-1.1.0
Installing darkfish documentation for unipept-1.1.0
Done installing documentation for unipept after 0 seconds
Gems updated: unipept

Configuration

The Unipept command line tools require no additional configuration and can be used immediately after installation. By default, the public Unipept server will be used for all commands. If you have a local Unipept server running, and wish to use it with the command line tools, simply run the unipept config host http://local.server command, where you substitute http://local.server with the address of your local Unipept server:

$ unipept config host http://local.server
host was set to http://local.server

Default settings

If you changed the host settings and wish to return to the default host, simply run unipept config host http://api.unipept.ugent.be.