Skip to content
hillerlabPublic

About

TOGA2: A faster, more versatile successor of Tool to infer Orthologs from Genome Alignments

Resources

Stars

58 stars

Watchers

4 watching

Forks

Repository files navigation

TOGA2

GitHub License

TOGA2: A faster, more versatile successor of Tool to infer Orthologs from Genome Alignments
The Hiller Lab at the Senckenberg Research Institute

docs . install . preprint . us


Changelog

v2.0.10

  • run mode:
    • Deprecated use of fragments on the same chromosome for fragmented projection assembly. The legacy behavior can be enable with the --enable_same_contigs flag.
  • integrate mode:
    • Fixed gene disjointing problem leading to paralogs and lost orthologous overlapping functional orthologs form independent gene units;
    • Iterative novelty filter for paralogous and lost projections to minimize the number of added projections;

For the full list of code changes, see changelog.md .

Installation

from Github

TOGA2 Makefile provided in this repository contains directives for code compilation, third party software installation, Python package download, and model training.

git clone --recurse-submodules https://github.com/hillerlab/TOGA2
cd TOGA2
make

Important

Executing the Makefile will not install Nextflow and Cargo on your machine.

Since the Make directive also installs Python packages globally, you might want to create a dedicated virtual environment beforehand (Python version 3.13 or higher):

git clone --recurse-submodules https://github.com/hillerlab/TOGA2
cd TOGA2
python3 -m venv toga2
source toga2/bin/activate
make

from Github + Conda

As an alternative to Python virtual environment, you can also use Conda for environment creation. TOGA2 comes with a Conda configuration file which creates an environment with Python, Cargo, and Nextflow:

git clone --recurse-submodules https://github.com/hillerlab/TOGA2
cd TOGA2
conda env create -f assets/venv/conda.yaml
conda activate toga2
make

via Apptainer

Container image definition file for Apptainer is provided with TOGA2 under supply/containers/apptainer.def. To build the container, make sure you have Apptainer installed, then run the following commands:

git clone --recurse-submodules https://github.com/hillerlab/TOGA2
TMPDIR=${tmp_dir} apptainer build ${container.sif} supply/apptainer.def

where:

  • ${tmp_dir} is the path to the directory to store Nextflow temporary files in;
  • ${container.sif} is the path to save the resulting image to.

The resulting container has toga2.py as an entry point. If you run the following or similar command:

TMPDIR=${tmp_dir} apptainer run --bind ${bound_dir1},${bound_dir2} ${container.sif} toga2.py

you should see the TOGA2 start menu.

Note

The image provided in supply/ directory contains the latest TOGA2 release, third-party software used for input preparation and TOGA2 annotation, and Nextflow for parallel process management. The container, however, does not contain any Nextflow-compatible parallel job executor. To set up your container for batch manager compatibility, see README at supply/containers and example recipe at supply/containters/apptainer_slurm.def


Running TOGA2

If activated without additional arguments (toga2.py), the following start screen is displayed in the user's terminal:

Usage: toga2.py [OPTIONS] COMMAND [ARGS]...

  MMP""MM""YMM   .g8""8q.     .g8"""bgd      db          `7MMF'`7MMF'
  P'   MM   `7 .dP'    `YM. .dP'     `M     ;MM:           MM    MM  
       MM     dM'      `MM dM'       `     ,V^MM.          MM    MM  
       MM     MM        MM MM             ,M  `MM          MM    MM  
       MM     MM.      ,MP MM.    `7MMF'  AbmmmqMA         MM    MM  
       MM     `Mb.    ,dP' `Mb.     MM   A'     VML        MM    MM  
     .JMML.     `"bmmd"'     `"bmmmdPY .AMA.   .AMMA.    .JMML..JMML.

  TOGA2 - Tool for Ortholog Inference from Genome Alignment

Options:
  -V, --version      Show the version and exit.
  -help, -h, --help  Show this message and exit.

Commands:
  cookbook            List example commands for 'run' mode
  from-config         Run TOGA2 pipeline with a configuration file
  integrate           Prepare an integrated TOGA2 annotation  by combining annotation with different references
  merge               Merge complementing TOGA2 results for the same reference and query
  postoga             Run postprocessing analysis with Postoga
  prepare-input       Prepare reference annotation files for TOGA2 input
  run                 Run TOGA2 pipeline with command line arguments
  sequence-alignment  Align orthologous sequences from multiple TOGA2 results
  spliceai            Generate SpliceAI predictions for query assembly
  test                Test TOGA2 with companion dataset

Except for toga2.py test, invoking any of the listed commands without arguments also displays the help message. You can also invoke help message for TOGA2 or any of its commands with --help/-h option.


Test run

To ensure that TOGA2 was installed properly, run the following command:

toga2.py test

Provided the successful installation, you will see the TOGA2 execution log printed to stdout, with the results stored at TOGA2/sample_output.

Note

If you are running TOGA2 from Apptainer, you might have to provide a custom output directory with --output/-o option to bypass the read-only container configuration:

apptainer run --bind ${bound_dir1},${bound_dir2} --env NXF_HOME="${TMPDIR}/.nextflow" ${container.sif} toga2.py test -o ${output_dir}

See supply/containers/README.md for more info.

About

TOGA2: A faster, more versatile successor of Tool to infer Orthologs from Genome Alignments

Resources

Stars

58 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors

Languages