Mag
Assembly and binning of metagenomes
Install / Use
npx skills add nf-core/magInstalls into whichever agent you are using.
README
Introduction
nf-core/mag is a bioinformatics best-practice analysis pipeline for assembly, binning and annotation of metagenomes.
<p> <picture> <source media="(prefers-color-scheme: dark)" srcset="docs/images/mag_metromap_dark.png"> <img alt="nf-core/mag metromap diagram" src="docs/images/mag_metromap_light.png"> </picture> </p>Pipeline summary
By default, the pipeline currently performs the following: it supports both short and long reads, quality trims the reads and adapters with fastp, AdapterRemoval, or trimmomatic and Porechop, and performs basic QC with FastQC, and merges multiple sequencing runs.
The pipeline then:
- performs assembly using MEGAHIT and SPAdes, and checks their quality using Quast and ALE (if short read data is used)
- (optionally) polishes long-read assemblies with short reads using pypolca
- (optionally) performs ancient DNA assembly validation using PyDamage and contig consensus sequence recalling with Freebayes and BCFtools
- predicts protein-coding genes for the assemblies using Prodigal, and bins with Prokka and optionally MetaEuk
- performs metagenome binning using MetaBAT2, MaxBin2, CONCOCT, COMEBin, MetaBinner, and/or SemiBin2
- checks the quality of the genome bins using Busco, CheckM, or CheckM2 and optionally GUNC
- Performs ancient DNA validation and repair with pyDamage and freebayes
- optionally refines bins with DAS Tool
- assigns taxonomy to bins using GTDB-Tk and/or CAT and optionally identifies viruses in assemblies using geNomad, or Eukaryotes with Tiara
Furthermore, the pipeline creates various reports in the results directory specified, including a MultiQC report summarizing some of the findings and software versions.
Usage
[!NOTE] If you are new to Nextflow and nf-core, please refer to this page on how to set-up Nextflow. Make sure to test your setup with
-profile testbefore running the workflow on actual data.
nextflow run nf-core/mag -profile <docker/singularity/podman/shifter/charliecloud/conda/institute> --input samplesheet.csv --outdir <OUTDIR>
[!WARNING] Please provide pipeline parameters via the CLI or Nextflow
-params-fileoption. Custom config files including those provided by the-cNextflow option can be used to provide any configuration except for parameters; see docs.
For more details and further functionality, please refer to the usage documentation and the parameter documentation.
Pipeline output
To see the results of an example test run with a full size dataset refer to the results tab on the nf-core website pipeline page. For more details about the output files and reports, please refer to the output documentation.
Group-wise co-assembly and co-abundance computation
Each sample has an associated group ID (see input specifications). This group information can be used for group-wise co-assembly with MEGAHIT or SPAdes and/or to compute co-abundances for the binning step with MetaBAT2. By default, group-wise co-assembly is disabled, while the computation of group-wise co-abundances is enabled. For more information about how this group information can be used see the documentation for the parameters --coassemble_group and --binning_map_mode.
When group-wise co-assembly is enabled, SPAdes is run on accordingly pooled read files, since metaSPAdes does not yet allow the input of multiple samples or libraries. In contrast, MEGAHIT is run for each group while supplying lists of the individual readfiles.
Credits
nf-core/mag was written by Hadrien Gourlé at SLU, Daniel Straub and Sabrina Krakau at the Quantitative Biology Center (QBiC). James A. Fellows Yates and Maxime Borry at the Max Planck Institute for Evolutionary Anthropology joined in version 2.2.0.
Other code contributors include:
- Antonia Schuster
- Alexander Ramos
- Carson Miller
- Daniel Lundin
- Danielle Callan
- Gregory Sprenger
- Jim Downie
- Phil Palmer
- William Rosenbaum
- Adam Rosenbaum
- Diego Alvarez
- Nikolaos Vergoulidis
- Greg Fedewa
- Vini Salazar
- Alex Caswell
- Jeferyd Yepes
Long read processing was inspired by caspargross/HybridAssembly written by Caspar Gross @caspargross
We thank the following people for their extensive assistance in the development of this pipeline:
- Alexander Peltzer
- Phil Ewels
- Gisela Gabernet
- [Harshil Patel](https
Related Skills
node-connect
385.5kDiagnose OpenClaw Android, iOS, or macOS node pairing, QR/setup code, route, auth, and connection failures.
blender-python-addon
40.5kBlender Python add-on rules for operators, panels, properties, registration, testing, and API-safe scripting
flutter-development-guidelines-cursorrules-prompt-file
40.5kCursor rules for Flutter development with MVVM architecture, Riverpod state management, Material widgets, and Dart style guidelines.
commit-push-pr
140.7kCommit, push, and open a PR
