Proteinortho

Proteinortho is a tool to detect orthologous genes within different species.

Input: Multiple fasta files (orange boxes) with many proteins/genes (circles). Output: Groups (*.proteinortho) and pairs (*.proteinortho-graph) of orthologs proteins/genes.

For doing so, it compares similarities of given gene sequences and clusters them to find significant groups. The algorithm was designed to handle large-scale data and can be applied to hundreds of species at one. Details can be found in (doi:10.1186/1471-2105-12-124). To enhance the prediction accuracy, the relative order of genes (synteny) can be used as additional feature for the discrimination of orthologs. The corresponding extension, namely PoFF (doi:10.1371/journal.pone.0105015), is already build in Proteinortho. The general workflow of proteinortho:

proteinortho.workflow.png

First an initial all vs. all comparison between all proteins of all species is performed to determine protein similarities (upper right image).
The second stage is the clustering of similar genes to meaningful co-orthologous groups (lower right image).
Connected components within this graph can be considered as putative co-orthologous groups in theory and are returned in the output (lower left image).

New Features of Proteinortho Version 6

A more detailed list of all changes: CHANGELOG

Table of Contents

  1. Installation
  2. Synopsis and Description
  3. Options/Parameters
  4. PoFF synteny extension
  5. Output description
  6. Examples

Proteinortho-Wiki Table of Contents

  1. Tools and additional programs
  2. Error Codes and Troubleshooting <- look here if you cannot compile/run proteinortho
  3. Large compute jobs example
  4. Synteny + Core Proteome Example
  5. FAQ
    (…)

Bug reports: Please have a look at chapter 2. first or send a mail to incoming+paulklemm-phd-proteinortho-7278443-issue-@incoming.gitlab.com. (please include the ‘parameter-vector’ that is printed for all errors) You can also send mails to lechner@staff.uni-marburg.de. Any suggestions, feedback and comments are welcome!

Installation

Proteinortho comes with precompiled binaries of all executables (Linux/x86) so you should be able to run perl proteinortho6.pl in the downloaded directory for Linux/x86. You could also move all executables to a local bin directory (e.g. with make install PREFIX=~/bin). If you cannot execute the src/BUILD/Linux_x86_64/proteinortho_clustering, then you have to recompile with make, see the section 2. Building and installing proteinortho from source.


Installation with (bio)conda (for Linux + OSX) install with bioconda alt

conda install -c bioconda proteinortho

If you need conda (see here) and the bioconda channel: conda config --add channels bioconda.


Installation with brew (for OSX) install with brew dl

brew install proteinortho

If you need brew (see here)


Deploy with docker install with docker

docker pull quay.io/biocontainers/proteinortho:TAG

you can find the TAG here (e.g. 6.0.23–hfd40d39_0).

how to docker (Click to expand)


First define a TAG with:

export TAG='put the version tag here'

To start a simple bash shell with the proteinortho container use:

docker run --rm -it quay.io/biocontainers/proteinortho:$TAG bash

Here you can start/use proteinortho. You can change “6.0.22–hfd40d39_0” with any tag/version that is available here. Sadly there is no “:latest” tag available …

Now lets try to mount your home in the proteinortho container

This is neccessary if you want to access your local files:

docker run --rm --mount "type=bind,src=/home/$(id -un),dst=/home/$(id -un)" -u $(id -u):$(id -g) -it quay.io/biocontainers/proteinortho:$TAG bash

now you have your home directory mounted to /home/YOURNAME. (load your bashrc within the container : source /home/YOURNAME/.bashrc)


Available at Galaxy Europe

Simply go to the european galaxy server and search for proteinortho:

https://usegalaxy.eu

Or you can integrate proteinortho into your own galaxy instance using: proteinortho (iuc repository)


Installation with dpkg (root privileges are required)

Disclamer: Be aware that this method usually lacks 6-12 months behind the latest version

The deb package can be downloaded here: unstable or stable. Afterwards the deb package can be installed with sudo dpkg -i proteinortho*deb.


Installation with apt-get

Disclamer: Be aware that this method usually lacks 6-12 months behind the latest version (current version)

proteinortho is released to stable Debian 11 (2021), so you can install it with (sudo) apt install proteinortho


Prerequisites for compiling proteinortho from source

Proteinortho uses standard software which is often installed already or is part of then package repositories and can thus easily be installed. The sources come with a precompiled version of Proteinortho for 64bit Linux x86.

To run Proteinortho, you need: (Click to expand)


To compile Proteinortho (linux/osx), you need: (Click to expand)


Building and installing proteinortho from source (linux and osx)

You need to have a working lapack library, check this e.g. with ‘dpkg –get-selections | grep lapack’. Install lapack e.g. with ‘apt-get install libatlas3-base’ or liblapack3.

If you dont have Lapack, then ‘make’ will automatically compiles an old lapack (v3.8.0) for you automatically as fallback !

Fetch the latest source code archive downloaded from here

or from here (Click to expand)

git clone https://gitlab.com/paulklemm_PHD/proteinortho

wget https://gitlab.com/paulklemm_PHD/proteinortho/-/archive/master/proteinortho-master.zip


OSX additional informations (the -fopenmp error)
Install a newer g++ compiler for -fopenmp support (multithreading) with brew (get brew here https://brew.sh/index_de)

```
brew install gcc --without-multilib
```

Then you should have a g++-7 or whatever newer version that there is (g++-8,9,...).
Next you have to tell make to use this new compiler with one of the following:
```
ln -s /usr/local/bin/gcc-7 /usr/local/bin/gcc
ln -s /usr/local/bin/g++-7 /usr/local/bin/g++
```

OR(!) specify the new g++ in 'make CXX=/usr/local/bin/g++-7 all'
‘make’ successful output (Click to expand)
[  0%] Prepare proteinortho_clustering ...
[ 20%] Building **proteinortho_clustering** with LAPACK (static/dynamic linking)
[ 25%] Building **graphMinusRemovegraph**
[ 50%] Building **cleanupblastgraph**
[ 75%] Building **po_tree**
[100%] Everything is compiled with no errors.

The compilation of proteinortho_clustering has multiple fall-back routines. If everything fails please look here Troubleshooting (proteinortho wiki).

Make test output

‘make test’ successful output (Click to expand)
Everything is compiled with no errors.
[TEST] 1. basic proteinortho6.pl -step=2 tests
 [1/11] -p=blastp+ test: passed
 [2/11] -p=blastp+ synteny (PoFF) test: passed
 [3/11] -p=diamond test: passed
 [4/11] -p=diamond (--moresensitive) test (subparaBlast): passed
 [5/11] -p=lastp (lastal) test: passed
 [6/11] -p=topaz test: passed
 [7/11] -p=usearch test: passed
 [8/11] -p=ublast test: passed
 [9/11] -p=rapsearch test: passed
 [10/11] -p=blatp (blat) test: passed
 [11/11] -p=mmseqsp (mmseqs) test: passed
[TEST] 2. -step=3 tests (proteinortho_clustering)
 [1/2] various test functions of proteinortho_clustering (-test): passed
 [2/2] Compare results of 'with lapack' and 'without lapack': passed
[TEST] Clean up all test files...
[TEST] All tests passed

If you have problems compiling/running the program go to Troubleshooting (proteinortho wiki).


SYNOPSIS

proteinortho options <fasta file(s)>

one fasta file for each input species; at least two species are required

DESCRIPTION

proteinortho is a tool to detect orthologous genes within different species.

Proteinortho assumes, that you have all your gene sequences in FASTA format either represented as amino acids or as nucleotides. The source code archive contains some examples, namely C.faa, E.faa, L.faa, M.faa located in the test/ directory. By default Proteinortho assumes amino acids sequences and thus uses diamond (-p=diamond) to compare sequences. If you have nucleotide sequences, you need to change this by adding the parameter -p=blastn+ (or some other algorithm). (In case you have only have NCBI BLAST legacy installed, you need to tell this too - either by adding -p=blastp or -p=blastn respectively.) The full command for the example files would thus be > proteinortho6.pl -project=test test/C.faa test/E.faa

test/L.faa test/M.faa. Instead of naming the FASTA files one by one, you could also use test/*.faa. Please note that the parameter -project=test is optional, for naming the output. With this, you can set the prefix of the output files generated by Proteinortho. If you skip the project parameter, the default project name will be myproject.

OPTIONS graphical user interface

Open proteinorthoHelper.html in your favorite browser or visit lechnerlab.de/proteinortho online for an interactiv exploration of the different options of proteinortho.

OPTIONS

Main parameters (can be used with – or -)

Search options (step 1-2) (output: .blast-graph)

More (Click to expand)


Synteny options (optional, step 2) (output: .ffadj-graph, .poff-graph, .poff.tsv (tab separated file with groups))

More (Click to expand)


Clustering options (step 3) (output: .proteinortho.tsv, .proteinortho.html, .proteinortho-graph)

More (Click to expand)


Misc options

(Click to expand)


Large compute jobs - –jobs=M/N If you want to involve multiple machines or separate a Proteinortho run into smaller chunks, use the -jobs=M/N option. First, run ‘proteinortho6.pl -steps=1 …’ to generate the indices. Then you can run ‘proteinortho6.pl -steps=2 -jobs=M/N …’ to run small chunks separately. Instead of M and N numbers must be set representing the number of jobs you want to divide the run into (M) and the job division to be performed by the process. E.g. to divide a Proteinortho run into 4 jobs to run on several machines, use ‘proteinortho6.pl -steps=2 -jobs=1/4’, ‘proteinortho6.pl -steps=2 -jobs=1/4’, ‘proteinortho6.pl -steps=2 -jobs=2/4’, ‘proteinortho6.pl -steps=2 -jobs=3/4’, ‘proteinortho6.pl -steps=2 -jobs=4/4’.

See [Large compute jobs, the --jobs option (proteinortho wiki)](https://gitlab.com/paulklemm_PHD/proteinortho/wikis/Large-compute-jobs-(the--jobs-option)) for more details.


PoFF

The PoFF extension allows you to use the relative order of genes (synteny) as an additional criterion to disentangle complex co-orthology relations. To do so, add the parameter -synteny.

You can use it to either come closer to one-to-one orthology relations by preferring synthetically conserved copies in the presence of two very similar paralogs (default), or just to reduce noise in the predictions by detecting multiple copies of genomic areas (add the parameter -dups=3).

Please note that you need additional data to include synteny, namely the gene positions in GFF3 format. As Proteinortho is primarily made for proteins, it will only accept GFF entries of type CDS (column #3 in the GFF-file). The attributes column (#9) must contain Name=GENE IDENTIFIER where GENE IDENTIFIER corresponds to the respective identifier in the FASTA format. It may not contain a semicolon (;)! Alternatively, you can also set ID=GENE IDENTIFIER. Example files are provided in the source code archive. Hence, we can run proteinortho6.pl -project=test -synteny test/A1.faa test/B1.faa test/E1.faa test/F1.faa to add synteny information to the calculations. Of course, this only makes sense if species are sufficiently similar. You won’t gain much when comparing e.g. bacteria with fungi.

When the analysis is done you will find an additional file in your current working directory, namely myproject.poff.tsv (tab separated file). This file is equivalent to the test.proteinortho.tsv file (above) but can be considered more accurate as synteny was involved for its construction. More information about the output files are described below and a full example is described here: Synteny example (proteinortho wiki).

Output Files Overview

BLAST Search Output (step 1-2)

filtered blast data based on adaptive reciprocal best blast matches, the reciprocal best match matches within a range of 95% by default (-sim).

A line starting with ‘#’ indicates the two species that are analysed below. E.g. ‘# M.faa L.faa’ tells that the next lines are for species M.faa versus species L.faa.

All matches are reciprocal matches. If e.g. a match for M_15 L_15 is shown, L_15 M_15 exists implicitly.

E-Values and bit scores for both directions A->B and B->A are printed behind each match. (e.g. 5.9e-51 190.7 5.6e-50 187.61)

The 4 numbers below the species (e.g. ‘# 3.8e-124 434.9…’) are representing the median evalue/bitscore values for this comparison.

myproject.blast-graph (Click to expand)

# file_a    file_b
  # a   b     evalue_ab     bitscore_ab   evalue_ba     bitscore_ba
  # E.faa     C.faa   
  # 3.8e-124        434.9   2.8e-126        442.2
  E_11  C_11  5.9e-51 190.7   5.6e-50 187.61
  E_10  C_10  3.8e-124    434.9   2.8e-126    442.2
  ...


Clustering Output (step 3)

clustered version of the myproject.blast-graph is printed in myproject.proteinortho-graph.

Its connected components are represented in myproject.proteinortho.tsv / myproject.proteinortho.html.

The format of myproject.blast-graph is the equivalent to the myproject.blast-graph (see above).

myproject.proteinortho-graph (Click to expand)

# file_a    file_b
  # a   b     evalue_ab     bitscore_ab   evalue_ba     bitscore_ba
  # E.faa     C.faa
  E_10  C_10  3.8e-124    434.9   2.8e-126    442.2
  E_11  C_11  5.9e-51 190.7   5.6e-50 187.6
  ...


The connected components of myproject.proteinortho-graph.

The very first column indicates the number of species covered by this group. The second column indicates the number of genes included in this group.

If the number of genes is bigger than the number of species, there are co-orthologs present.

The third column gives the algebraic connectivity of the respective group. This indicates how densely the genes are connected in the orthology graph that was used for clustering. A connectivity of 1 indicates a perfect dense cluster with each gene beeing connected/orthologous to each other gene.

By default, Proteinortho splits each group into two more dense subgroups when the connectivity is below 0.1 (default -conn).

Hint: you can open this file in Excel / Numbers / Open Office as a tab separated file.

myproject.proteinortho.tsv (Click to expand)

# Species   Genes   Alg.-Conn.    C.faa   C2.faa  E.faa   L.faa   M.faa
  2   5     0.16  *     *     *     L_643,L_641   M_649,M_640,M_642
  3   6     0.138   C_164,C_166,C_167,C_2   *     *     L_2   M_2
  2   4     0.489   *     *     *     L_645,L_647   M_644,M_646
  ...


myproject.proteinortho-graph.summary


myproject.proteinortho.html (Click to expand) The html version of the myproject.proteinortho.tsv file


POFF Output (-synteny)

The synteny based graph files (before clustering = myproject.ffadj-graph and after clustering = myproject.poff-graph) have two additional columns: same_strand and simscore, e.g.

# M.faa C_clean.faa # Scores: 7 15 5.500909 13.039009 M_10 C_10;test 1.71e-150 445 3.49e-150 444 1 1.0 M_11 C_11 2.34e-68 208 5.41e-67 204 1 0.997001020511701 M_14 C_14 1.68e-145 440 6.72e-150 451 1 1.0 M_15 C_15 8.33e-96 292 1.64e-99 301 1 1.0 M_16 C_16 5.15e-42 138 4.18e-42 138 1 0.620002623668878 …

The first one indicates if two genes from a match are located at the same strands (1) or not (-1). The second one is an internal score which can be interpreted as a normalized weight ranging from 0 to 1 based on the respective e-values.

myproject.ffadj-graph (Click to expand)

filtered blast data based on adaptive reciprocal best blast matches and synteny parameters

output columns are: geneA, geneB, evalue_A_vs_B, bitscore_A_vs_B, evalue_B_vs_A, bitscore_B_vs_A, same_strand, simscore

evalue* and bitscore* are computed by the specified -p blast algorithm (default: diamond) same_strand and simscore are described above

# file_a file_b # a b evalue_ab bitscore_ab evalue_ba bitscore_ba same_strand simscore # C2.faa L.faa # Scores: 0 3 2.000000 3.000000 C_10 L_10 4.30e-151 446 6.13e-153 447 1 1.0 # C2.faa M.faa # Scores: 0 3 2.000000 3.000000 C_10 M_10 3.49e-150 444 2.43e-152 445 1 1.0 # C2.faa E.faa # Scores: 0 3 2.000000 3.000000 …


myproject.poff-graph (Click to expand)

clustered ffadj graph. Its connected components are represented in myproject.poff.tsv (tab separated file) (only if -synteny is set)

output columns are same as for ffadj-graph

myproject.poff.tsv (Click to expand)

The connected components of myproject.poff-graph (clustering output), same format as the myproject.proteinortho.tsv.

output columns are: number_species, number_genes, algebraic_connectivity, speciesA_proteins, …

algebraic_connectivity defines how well this group is connected (if all proteins have a connection to all other proteins, this score is high)

if multiple proteins are present in one group they are separated by comma (if they have a comma in their name it is replaced by semicolon)

# Species Genes Alg.-Conn. C2.faa C_clean.faa E.faa L.faa M.faa 5 5 0.169 C_10 C_10;test E_10 L_10 M_10 4 4 0.449 * C_11 E_11 L_11 M_11 4 4 0.441 * C_63 E_19 L_19 M_19 4 4 0.44 * C_15 E_15 L_15 M_15 4 4 0.439 * C_64 E_18 L_18 M_18 4 4 0.435 * C_17 E_17 L_17 M_17 4 4 0.425 * C_14 E_14 L_14 M_14 4 4 0.39 * C_12 E_313 L_313 M_313 4 4 0.387 * C_16 E_16 L_16 M_16


EXAMPLES

Calling proteinortho Sequences are typically given in plain fasta format like the files in test/

test/C.faa:

C_10 VVLCRYEIGGLAQVLDTQFDMYTNCHKMCSADSQVTYKEAANLTARVTTDRQKEPLTGGY HGAKLGFLGCSLLRSRDYGYPEQNFHAKTDLFALPMGDHYCGDEGSGNAYLCDFDNQYGR …

test/E.faa:

E_10 CVLDNYQIALLRNVLPKLFMTKNFIEGMCGGGGEENYKAMTRATAKSTTDNQNAPLSGGF NDGKMGTGCLPSAAKNYKYPENAVSGASNLYALIVGESYCGDENDDKAYLCDVNQYAPNV …

To run proteinortho for these sequences, simply call

perl proteinortho6.pl test/C.faa test/E.faa test/L.faa test/M.faa

To give the outputs the name ‘test’, call

perl proteinortho6.pl -project=test test/*faa

To use blast instead of the default diamond, call

perl proteinortho6.pl -project=test -p=blastp+ test/*faa

If installed with make install, you can also call

proteinortho -project=test -p=blastp+ test/*faa

Hints

Using .faa to indicate that your file contains amino acids and .fna to show it contains nucleotides makes life much easier but is not required.

Sequence IDs must be unique within a single FASTA file. Consider renaming otherwise. Note: Till version 5.15 sequences IDs had to be unique among the whole dataset. Proteinortho now keeps track of name and species to avoid the necessissity of renaming.

You need write permissions in the directory of your FASTA files as Proteinortho will create blast databases. If this is not the case, consider using symbolic links to the FASTA files.

The directory src/ contains useful tools, e.g. proteinortho_grab_proteins.pl which fetches protein sequences of orthologous groups from Proteinortho output table. (These files are installed during ‘make install’)

Credit where credit is due

ONLINE INFORMATION

For download and online information, see https://www.bioinf.uni-leipzig.de/Software/proteinortho/ or https://gitlab.com/paulklemm_PHD/proteinortho

REFERENCES

Lechner, M., Findeisz, S., Steiner, L., Marz, M., Stadler, P. F., & Prohaska, S. J. (2011). Proteinortho: detection of (co-) orthologs in large-scale analysis. BMC bioinformatics, 12(1), 124.