TOGA2: A faster, more versatile successor of Tool to infer Orthologs from Genome Alignments
Important
TOGA2 is currently in early access phase. This means, certain TOGA2 features and most of the documentation at TOGA2 wiki are currently missing and will be added in the following days. If you want to use the early access version and experience problems with installing or running code in this repository, please open an issue here or contact the TOGA2 team (yury.malovichko@senckenberg.de).
Detailed explanations of all output files can be found in our TOGA2 Wiki.
runmode:- Replacing positional arguments with keyword arguments
--isoform_file,--u12_file, and--spliceai_diroptions are now "semi-mandatory"; the user is expected to provide the respective arguments unless the explicit deprecative flags are set- Alternative input formatting with
--input_directory,--ref_name, and--query_nameshortcuts: Format your data storage tree once and enjoy simplified command line interface - Postoga summary table (
toga.table.gz) added to the output forrunmode - Projections of the same reference gene/transcript overlapping by absolute coding sequence coordinates are now collapsed into a single query gene regardless of their overlap by coding exon coordinates
- NEW MODE:
postogafor Postoga integration - NEW MODE:
sequence-alignmentfor orthologous sequence alignment across multiple same-referenced TOGA2 runs (alpha version) - Apptainer support (see
supply/containers):- Stable local execution container image
- Batch manager-compatible image template
- Removing
toga2.pyas a container entry point - Adding container support for parallel step scripts (see
supply/containers/README.md)
- Updated local installation
- Postoga installation
- Conda environment support
- Updated
bigWigToWigversion (-bedand-headeroptions) now distributed with TOGA2
For the full list of code changes, see changelog.md## Installation
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
makeImportant
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
makeAs 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 conda.yaml
conda activate toga2
makeContainer 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.defwhere:
${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.pyyou 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
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.
To ensure that TOGA2 was installed properly, run the following command:
toga2.py testProvided 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:
TMPDIR=${tmp_dir} apptainer run --bind ${bound_dir1},${bound_dir2} ${container.sif} toga2.py test -o ${output_dir}
