Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LAST search option #786

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Thanks to Rosa Fernández & Jesus Lozano-Fernandez for organising this excellent
- [FastME](#fastme)
- [Optional: BLAST+](#optional-blast)
- [Optional: MMseqs2](#optional-mmseqs2)
- [Optional: LAST](#optional-last)
- [config.json : Adding addtional programs for tree inference, local alignment or MSA](#configjson--adding-addtional-programs-for-tree-inference-local-alignment-or-msa)
- [Adding Extra Species](#adding-extra-species)
- [Removing Species](#removing-species)
Expand Down Expand Up @@ -329,6 +330,18 @@ Download the appropriate version for your machine, extract it and copy the execu
or alternatively if you don't have root privileges, instead of the last step above, add the directory containing the directory to your PATH variable
- ``export PATH=$PATH:`pwd`/mmseqs2/bin/``

#### Optional: LAST
Available here: https://gitlab.com/mcfrith/last/-/tags

Download latest version, extract it, compile and copy the executable to a directory in your system path, e.g.:
- `wget https://gitlab.com/mcfrith/last/-/archive/1447/last-1447.tar.gz`
- `tar xzf last-1447.tar.gz`
- `cd last-1447; make; cd ..`
- `sudo cp last-1447/bin/* /usr/local/bin`

or alternatively if you don't have root privileges, instead of the last step above, add the directory containing the directory to your PATH variable
- ``export PATH=$PATH:`pwd`/last-1447/bin/``

### config.json : Adding addtional programs for tree inference, local alignment or MSA
You can actually use **any** alignment or tree inference program you like the best! Be careful with the method you chose, OrthoFinder typically needs to infer about 10,000-20,000 gene trees. If you have many species or if the tree/alignment method isn't super-fast then this can take a very long time! MAFFT + FastTree provides a reasonable compromise. OrthoFinder already knows how to call:
- mafft
Expand All @@ -344,6 +357,7 @@ OrthoFinder also knows how to use the following local sequence alignment program
- BLAST
- DIAMOND
- MMSeqs2
- LAST

If you want to use a different program, there is a simple configuration file called **"config.json"** in the orthofinder directory and you can also create a file of the same format called **"config_orthofinder_user.json"** in your user home directory. You just need to add an entry to tell OrthoFinder what the command line looks like for the program you want to use. There are lots of examples in the file that you can follow. The "config.json" file is read first and then the "config_orthofinder_user.json", if it is present. The config_orthofinder_user.json file can be used to add user-specific options and to overwrite options from config.json. In most cases it is best to add additional options to the "config_orthofinder_user.json" since these will continue to apply if you update your version of OrthoFinder.

Expand Down
6 changes: 6 additions & 0 deletions scripts_of/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,11 @@
"program_type": "search",
"db_cmd": "makeblastdb -dbtype nucl -in INPUT -out OUTPUT",
"search_cmd": "blastn -outfmt 6 -evalue 0.001 -query INPUT -db DATABASE | gzip > OUTPUT.gz"
},

"last":{
"program_type": "search",
"db_cmd": "lastdb -p -cR01 OUTPUT INPUT",
"search_cmd": "lastal -f BlastTab+ -D 1e6 DATABASE INPUT | sed -n '/^#/!p' | gzip > OUTPUT.gz"
}
}
5 changes: 5 additions & 0 deletions scripts_of/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,11 @@ def WriteCitation(d):
BLAST protein alignment:
Altschul, S.F., Gish, W., Miller, W., Myers, E.W. & Lipman, D.J. Basic local
alignment search tool (1990) J. Mol. Biol. 215:403-410

LAST protein alignment:
Kiełbasa, S.M., Wan, R., Sato, K., Horton, P. & Frith, M.C. Adaptive seeds tame
genomic sequence comparison. (2011) Genome Research, 21(3)
doi.org/10.1101/gr.113985.110
"""

with open(d + "Citation.txt", 'w') as outfile:
Expand Down