MAGs generation pipeline
MGnify genomes generation pipeline to generate prokaryotic and eukaryotic MAGs from reads and assemblies.
This pipeline does not support co-binning.
Pipeline summary
The pipeline performs the following tasks:
- Supports short reads.
- Changes read headers to their corresponding assembly accessions (in the ERZ namespace).
- Quality trims the reads, removes adapters fastp.
Afterward, the pipeline:
- Runs a decontamination step using BWA to remove any host reads. By default, it uses the hg39.fna.
- Bins the contigs using Concoct, MetaBAT2 and MaxBin2.
- Refines the bins using the metaWRAP bin_refinement compatible subworkflow supported separately.
For prokaryotes:
- Conducts bin quality control with CAT, GUNC, and CheckM.
- Performs dereplication with dRep.
- Calculates coverage using MetaBAT2 calculated depths.
- Detects rRNA and tRNA using cmsearch.
- Assigns taxonomy with GTDBtk.
For eukaryotes:
- Estimates quality and merges bins using EukCC.
- Dereplicates MAGs using dRep.
- Calculates coverage using MetaBAT2 calculated depths.
- Assesses quality with BUSCO and EukCC.
- Assigns taxonomy with BAT.
Final steps:
- Tools versions are available in software_versions.yml
- Pipeline generates a tsv table for public MAG uploader
- TODO: finish MultiQC
Usage
If this the first time running nextflow please refer to this page
Required reference databases
You need to download the mentioned databases and add them to config/dbs.config.
Don't forget to add this configuration to the main .nextflow.config.
- BUSCO
- CAT
- CheckM
- EukCC
- GUNC
- GTDB-Tk + ar53_metadata_r214.tsv, bac120_metadata_r214.tsv from here
- Rfam
- The reference genome of your choice for decontamination, as a .fasta.
Citation
If you use this pipeline please make sure to cite all used software.
Version History
1.3.2 (latest) Created 16th Jul 2026 at 09:59 by Martin Beracochea
Merge pull request #66 from EBI-Metagenomics/bugfix/bins_mags_alias_redefinition
Fix bin/mag alias when submitting to ENA
Frozen
1.3.2
8f1caf4
main @ c90ea38 (earliest) Created 16th May 2024 at 13:19 by Ekaterina Sakharova
Merge pull request #26 from EBI-Metagenomics/fix/euk-subwf-remove-alignment
Fix/euk subwf remove alignment
Frozen
main
c90ea38
Creators and SubmitterCreators
Submitter
Views: 71 Downloads: 5
Created: 16th May 2024 at 13:19
Last updated: 16th Jul 2026 at 09:59
AttributionsNone
View on GitHub
https://orcid.org/0000-0003-3472-3736