Workflow Type: Nextflow
Stable

Mobilome Annotation Pipeline (former MoMofy)

Bacteria can acquire genetic material through horizontal gene transfer, allowing them to rapidly adapt to changing environmental conditions. These mobile genetic elements can be classified into three main categories: plasmids, phages, and integrative elements. Plasmids are mostly extrachromosmal; phages can be found extrachromosmal or as temperate phages (prophages); whereas integrons are stable inserted in the chromosome. Autonomous elements are those integrative elements capable of excising themselves from the chromosome and reintegrate elsewhere. They can use a transposase (like insertion sequences and transposons) or an integrase/excisionase (like ICEs and IMEs).

The Mobilome Annotation Pipeline is a wrapper that integrates the output of different tools designed for the prediction of plasmids, phages, insertion sequences, and other autonomous integrative mobile genetic elements such as ICEs, IMEs and integrons in prokaryotic genomes and metagenomes. The output is a PROKKA gff file with extra entries for the mobilome.

Contents

Workflow

This workflow has the following main subworkflows:

  • Preprocessing: Rename and filter contigs, and run PROKKA annotation
  • Prediction: Run geNomad, ICEfinder, IntegronFinder, and ISEScan
  • Annotation: Generate extra-annotation for antimicrobial resistance genes (AMRFinderPlus) and other mobilome-related proteins (MobileOG).
  • Integration: Parse and integrate the outputs generated on Prediction and Annotation subworkflows. In this step optional results of VIRify v3.0.0 can be incorporated. MGEs <500 bp lengh and predictions with no genes are discarded.
  • Postprocessing: Write the mobilome fasta file, write a report of the location of AMR genes (either mobilome or chromosome), and generate three new GFF files:
  1. mobilome_clean.gff: mobilome + associated CDSs
  2. mobilome_extra.gff: mobilome + ViPhOGs/mobileOG annotated genes (note that ViPhOG annotation is generated by VIRify)
  3. mobilome_nogenes.gff: mobilome only The output mobilome_nogenes.gff is validated in this subworkflow.

Setup

This workflow is built using Nextflow. It uses Singularity containers making installation trivial and results highly reproducible. Explained in this section, there is one manual step required to build the singularity image for ICEfinder, as we can't distribute that software due to license issues.

Install and dependencies

To get a copy of the Mobilome Annotation Pipeline, clone this repo by:

$ git clone https://github.com/EBI-Metagenomics/mobilome-annotation-pipeline.git

The mobileOG-database is required to run an extra step of annotation on the mobilome coding sequences. The first time you run the Mobilome Annotation Pipeline, you will need to download the Beatrix 1.6 v1 database, move the tarball to mobilome-annotation-pipeline/databases, decompress it, and run the script to format the db for diamond:

$ mv beatrix-1-6_v1_all.zip /PATH/mobilome-annotation-pipeline/databases
$ cd /PATH/mobilome-annotation-pipeline/databases
$ unzip beatrix-1-6_v1_all.zip
$ nextflow run /PATH/mobilome-annotation-pipeline/format_mobileOG.nf

Two additional databases need to be manually downloaded and extracted: AMRFinder plus db and the geNomad database databases. Then you can provide the paths to your databases using the mobileog_db, the amrfinder_plus_db and the genomad_db respectively when you run the pipeline.

Most of the tools are available on quay.io and no install is needed. However, in the case of ICEfinder, you will need to contact the author to get a copy of the software, visit the ICEfinder website for more information. Once you have the ICEfinder_linux.tar.gz tarball, move it to mobilome-annotation-pipeline/templates and build the singularity image using the following command:

$ mv ICEfinder_linux.tar.gz /PATH/mobilome-annotation-pipeline/templates/
$ cd /PATH/mobilome-annotation-pipeline/templates/
$ sudo singularity build ../../singularity/icefinder-v1.0-local.sif icefinder-v1.0-local.def

The path to the ICEfinder image needs to be provided when running the pipeline, unless a custom config file is created.

Inputs

To run the Mobilome Annotation Pipeline on multiple samples, prepare a samplesheet with your input data that looks as in the following example. Note that virify_gff is an optional input for this pipeline generated with VIRify v3.0.0 tool.

samplesheet.csv:

sample,assembly,user_proteins_gff,virify_gff
minimal,/PATH/assembly.fasta,,
assembly_proteins,/PATH/assembly.fasta,/PATH/proteins.gff,
assembly_proteins_virify,/PATH/assembly.fasta,/PATH/proteins.gff,/PATH/virify_out.gff

Each row represents a sample. The minimal input is the (meta)genome assembly in fasta format.

Basic run:

$ nextflow run /PATH/mobilome-annotation-pipeline/main.nf --input samplesheet.csv [--icefinder_sif icefinder-v1.0-local.sif]

Note that the final output in gff format is created by adding information to PROKKA output. If you have your own protein prediction files, provide the path the the uncompressed gff file in the samplesheet.csv. This file will be used to generate a user_mobilome_extra.gff file containing the mobilome plus any extra annotation generated on the annotation subworkflow.

If you want to integrate VIRify results to the final output provide the path to the GFF file generated by VIRify v3.0.0 in your samplesheet.csv.

Outputs

Results will be written by default in the mobilome_results directory unless the --outdir option is used. There, you will find the following outputs:

mobilome_results/
├── mobilome.fasta
├── mobilome_prokka.gff
├── overlapping_integrons.txt
├── discarded_mge.txt
├── func_annot/
├── gff_output_files/
├── prediction/
└── preprocessing

The AMRFinderPlus results are generated by default. The func_annot/amr_location.txt file contains a summary of the AMR genes annotated and their location (either mobilome or chromosome).

The file discarded_mge.txt contains a list of predictions that were discarded, along with the reason for their exclusion. Possible reasons include:

  1. 'mge < 500bp' Discarded by length.
  2. 'no_cds' If there are no genes encoded in the prediction.

The file overlapping_integrons.txt is a report of long-MGEs with overlapping coordinates. No predictions are discarded in this case.

The main output files containing the mobilome predictions are mobilome.fasta containing the nucleotide sequences of every prediction, and mobilome_prokka.gff containing the mobilome annotation plus any other feature annotated by PROKKA, mobileOG, or ViPhOG (only when VIRify results are provided).

The mobilome prediction IDs are build as follows:

  1. Contig ID
  2. MGE type: flanking_site recombination_site prophage viral_sequence plasmid phage_plasmid integron conjugative_integron insertion_sequence
  3. Start and end coordinates separated by ':'

Example:

>contig_id|mge_type-start:end

Any CDS with a coverage >= 0.9 in the boundaries of a predicted MGE is considered as part of the mobilome and labelled acordingly in the attributes field under the key location.

The labels used in the Type column of the gff file corresponds to the following nomenclature according to the Sequence Ontology resource when possible:

Type in gff file Sequence ontology ID Element description Reporting tool
insertion_sequence SO:0000973 Insertion sequence ISEScan, PaliDIS
terminal_inverted_repeat_element SO:0000481 Terminal Inverted Repeat (TIR) flanking insertion sequences ISEScan, PaliDIS
integron SO:0000365 Integrative mobilizable element IntegronFinder, ICEfinder
attC_site SO:0000950 Integration site of DNA integron IntegronFinder
conjugative_integron SO:0000371 Integrative Conjugative Element ICEfinder
direct_repeat SO:0000314 Flanking regions on mobilizable elements ICEfinder
prophage SO:0001006 Temperate phage geNomad, VIRify
viral_sequence SO:0001041 Viral genome fragment geNomad, VIRify
plasmid SO:0000155 Plasmid geNomad

Tests

Nextflow tests are executed with nf-test. It takes around 3 min in executing.

Run:

$ cd mobilome-annotation-pipeline/
$ nf-test test

Citation

The Mobilome Annotation Pipeline parses and integrates the output of the following tools and DBs sorted alphabetically:

Version History

v3.0.0 (latest) Created 17th Jun 2025 at 15:20 by Martin Beracochea

Dev (#44)

  • Refactor pipeline and code improvement
  • Migration of input to samplesheets
  • Added tuple(meta) in all the modules
  • Inputs validation
  • Virify input is a single gff file (v3.0.0)
  • CrisprCasFinder and palidis modules removed
  • Changing the protein coverage threshold from 0.75 to 0.9 to be in line with VIRify: https://github.com/EBI-Metagenomics/emg-viral-pipeline/pull/137/files
  • Tests refactoring
  • Plasmid-phages function debugged and added to test

Frozen v3.0.0 d952a00

main @ 9ed4ca9 (earliest) Created 6th Apr 2023 at 10:40 by Alejandra Escobar

Merge pull request #5 from EBI-Metagenomics/dev

MoMofy to public


Frozen main 9ed4ca9
help Creators and Submitter
Activity

Views: 2759   Downloads: 429

Created: 6th Apr 2023 at 10:40

Last updated: 17th Jun 2025 at 15:24

Annotated Properties
help Attributions

None

Total size: 847 KB
Powered by
(v.1.17.0-main)
Copyright © 2008 - 2025 The University of Manchester and HITS gGmbH