Skip to content

OrthoFinder

OrthoFinder finds the orthogroups and orthologs of a set of species from their proteomes. It also infers rooted gene trees, a rooted species tree and gene duplication events, and computes comparative genomics statistics.

License

Free to use and open source under the GNU General Public License v3.0.

Available

  • Roihu-CPU: 3.2, via the bio-apps module.

Usage

OrthoFinder is part of the bio-apps collection on Roihu. Load the bio-apps module tree and then the OrthoFinder module:

module load bio-apps/v202603
module load orthofinder/3.2

The module also loads the programs OrthoFinder runs. With the default options, OrthoFinder uses DIAMOND, MCL, FAMSA and FastTree. The other programs are used only with the options that choose them: BLAST+, MMseqs2, MAFFT, MUSCLE, IQ-TREE and RAxML for the alternative methods listed below, FastME for DendroBLAST gene trees (-M dendroblast), and ASTRAL-Pro for species trees with -ST astral-pro and when adding species with --assign.

Input

OrthoFinder needs one FASTA file of protein sequences for each species, all in one directory. Each file should contain one representative sequence for each gene. If your proteomes contain several transcript isoforms per gene, keep only the longest isoform of each gene with primary_transcript:

primary_transcript proteomes/

This writes the filtered files to proteomes/primary_transcripts/.

Running OrthoFinder

orthofinder -f proteomes/ -t 16 -a 4

The -t option sets the number of threads for the sequence searches and -a the number of threads for the analysis steps. The results are written to proteomes/OrthoFinder/Results_<date>, unless you give another directory with -o. The main orthogroup file is Orthogroups/Orthogroups.tsv; see the guide to the results for the other files.

You can choose other programs for the different steps, for example:

  • -S sequence search: diamond (default), diamond_ultra_sens, blastp, mmseqs
  • -A alignment: famsa (default), mafft, muscle
  • -T gene trees: fasttree (default), fasttree_fastest, raxml, iqtree3

For more than about 100 species, run OrthoFinder first on a core set of species and then add the others to the results with --assign <new species dir> --core <Results_dir>. Run orthofinder -h to see all options.

To test OrthoFinder, copy the example data to your own directory and run it there:

cp -r $ORTHOFINDER_INSTROOT/share/orthofinder/ExampleData .
orthofinder -f ExampleData -t 4

Example batch script

#!/bin/bash
#SBATCH --job-name=orthofinder
#SBATCH --account=<project>
#SBATCH --output=output_%j.txt
#SBATCH --error=errors_%j.txt
#SBATCH --partition=small
#SBATCH --time=24:00:00
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=32
#SBATCH --mem=64G

module load bio-apps/v202603
module load orthofinder/3.2

orthofinder -f proteomes/ -t $SLURM_CPUS_PER_TASK -a 8

Replace <project> with your CSC project (for example project_2001234).

See creating a batch job script for Roihu for more information about running batch jobs.

Support

CSC Service Desk

More information

December 2, 2026