#A variety of clustering algorithms has been applied to determine Clusters of Orthologous Groups (COGs).
#Proteinortho is a tool to detect orthologous genes within different species.
#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.
#more info here:https://www.bioinf.uni-leipzig.de/Software/proteinortho/manual.html###
#Lechner, Marcus, et al. “Proteinortho: Detection of (Co-) orthologs in large-scale analysis.” BMC bioinformatics 12.1 (2011): 124.
###
###1. Make sure you are familiar with the terminal and a few basix unix command
###Tips: a dollar sign indicates a command typed in the terminal. A number sign, is a comment. Do NOT fear an error message..
#what do these commands do?
top, cd, man, ls, cp, less, mv, which, pwd, nano, grep, mkdir
$ ls
$ man ls

###
###2. Make sure prerequisites are installed (blast, perl, python, make)
###
#2.1 You should be running a recent version of MAC OS (>10.9) or Linux
#2.2 Install Make if you don’t have it yet. (Make is part of Xcode, https://itunes.apple.com/ca/app/id497799835?mt=12)
#2.3 Verify that perl is there.
$ perl -v
$ perl
#2.4 python should be there too
$ python -V
$ which python
#2.5 Verify that BLAST is there. If not, get it from: ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.2.30/ncbi-blast-2.2.30+-src.tar.gz
#Note that there is a downloadable image for blast (.dmg), but this may not work. Alternatively, download the latest tar.gz and compile it for your OS.
#2.6 Untar (tar -zxvf tar.gz) and move it in applications directory
#2.7 Compile
$ ./configure
$ make
$ sudo make install
#2.8 Check that all blast executable are installed in /usr/local/bin/
$ which blastx
$ ls /usr/local/bin/*blast*
#2.9 Familiarize yourself with BLAST options
$ blastx -h
$ blastn -h
$ tblastx -h
$ tblastn -h

###
###3.Installing proteinortho
###
#3.1 https://www.bioinf.uni-leipzig.de/Software/proteinortho/proteinortho_v5.11.tar.gz
#3.2 untar and move it to applications directory
#3.3 Compile (Note that you may need to remove binaries if working on MAC, but probably not). #$ rm proteinortho5_clean_edges proteinortho5_clustering
$ make
$ sudo make install