These are the mitogenome related sources including MITOS and other (more or less) helpful tools. Note that some of the tools are unfinished and not in a production state.
Usage on Galaxy
MITOS should primarily be used via Galaxy. It is available for instance on usegalaxy.eu
this will create a conda environment and install MITOS2. For MITOS use conda create --strict-channel-priority -c conda-forge -c bioconda -n mitos "mitos<2"
enable the conda environment with conda activate mitos2 (resp. conda activate mitos)
in case of problems with resolving environments try to use use --solver libmamba or replace conda by mamba.
git clone https://gitlab.com/YOUR_USERNAME/MITOS.git
cd MITOS
Set up development environment:
Option A: Python-only (for basic development):
pip install -r dev_requirements.txt
Option B: Full conda environment (required for integration tests):
# Create conda environment with all dependencies
conda create --strict-channel-priority -c conda-forge -c bioconda -n mitos2-dev python=3.13 \
biopython=1.86 "blast<3" hmmer=3.4 "infernal<2" viennarna r-base r-ggplot2 \
r-reshape2 openjdk reportlab pillow libtiff pip
# Activate environment and install MITOS in development mode
conda activate mitos-dev
pip install -r dev_requirements.txt
Optional: Set up pre-commit hooks for automatic linting:
pip install pre-commit
pre-commit install
This will automatically take care of things like trailing whitespace, empty lines at the end of files and it will run black, isort, flake8 and mypy before each commit. See configuration in .pre-commit-config.yaml.
Development Workflow
Running tests:
# Linting and code style
tox -e lint
# Type checking
tox -e type
# Unit tests
tox -e py37
# Integration tests (requires conda and reference data)
tox -e integration-py37
Before submitting a merge request:
Ensure all tests pass: tox
Follow the existing code style
Add tests for new functionality
Update documentation if needed
MITOS
runmitos.py: standalone CLI MITOS
From runmitos.py help:
mandatory options:
-c CODE, --code CODE the genetic code
-o OUTDIR, --outdir OUTDIR
the directory where the output is written
--linear treat sequence as linear (not mandatory for circular sequences)
-r REFSEQVER, --refseqver REFSEQVER
directory containing the reference data (relative to --refdir)
Please note that the reference data for the -r flag needs to be downloaded from Zenodo (MITOS, MITOS2).
see also runmitos.py --help or README.MITOS
genbank file handling
refseqsplit:
splits a file consisting of concatenated gb files into single genbank files
its possible to apply filters (taxonomy, prefix)
skewness related programs
skew:
compute skewness values for a gene of given genbank files
skewcum:
compute cumulative skewness for given genbank files
skewsvm:
do svm classification of skewness values .. and try to relate misclassifications to rearrangements
These are the mitogenome related sources including MITOS and other (more or less) helpful tools. Note that some of the tools are unfinished and not in a production state.
Usage on Galaxy
MITOS should primarily be used via Galaxy. It is available for instance on usegalaxy.eu
Installation
There are two ways to install. Preferred is the installation via conda since this also takes care of non-python requirements of the main mitos script.
conda create --strict-channel-priority -c conda-forge -c bioconda -n mitos2 "mitos>=2"conda create --strict-channel-priority -c conda-forge -c bioconda -n mitos "mitos<2"conda activate mitos2(resp.conda activate mitos)--solver libmambaor replacecondabymamba.pip install mitosFor the non-python requirements see README.MITOS.
Development Setup
For developers who want to contribute to MITOS:
Fork the repository on GitLab: https://gitlab.com/Bernt/MITOS
Clone your fork:
Set up development environment:
Option A: Python-only (for basic development):
Option B: Full conda environment (required for integration tests):
Optional: Set up pre-commit hooks for automatic linting:
This will automatically take care of things like trailing whitespace, empty lines at the end of files and it will run black, isort, flake8 and mypy before each commit. See configuration in
.pre-commit-config.yaml.Development Workflow
Running tests:
Before submitting a merge request:
toxMITOS
From runmitos.py help:
Please note that the reference data for the
-rflag needs to be downloaded from Zenodo (MITOS, MITOS2).see also
runmitos.py --helpor README.MITOSgenbank file handling
skewness related programs
MISC