indrikwijaya/nf-mgx-short is a bioinformatics pipeline that takes raw metagenomic (short reads) (MGX) and annotates them at the taxonomic, functional and resistome levels.
The pipeline is built using Nextflow DSL2 , a workflow tool to run tasks across multiple compute infrastructures in a very portable manner. It uses Docker containers (also compatible with Singularity) for ease of installation and computational reproducibility.
This pipeline currently only accepts paired-end reads as inputs.
-
Adapter trimming and quality control using fastp (0.22.0)
-
Removal of host (human) reads by mapping to a reference genome using bwa (0.7.17)
-
Taxonomic classification of non-human reads
a. using Kraken2 (2.1.2) and taxonomic abundance re-estimation using Bracken (2.6.1)
b. using Metaphlan4 (4.0.6)
-
Functional annotation of reads using HUMANN3
-
Resistome annotation of reads using SRST2
-
Install
Nextflow
(>=21.04.0
) and add the nextflow executable to your $PATH -
Install
Docker
-
Clone the pipeline and refer to the help message
$ git clone https://github.com/indrikwijaya/nf-mgx-short $ nextflow run ./nf-mgx-short/main.nf --help
- Add a custom config file which contains the paths to various pre-installed databases. Refer to the test.config file in this repo for an example.
- Add a custom profile in the nextflow.config file, allowing you to specify the use of docker or singularity, and/or a task scheduler.
-
Make sure all helper scripts in nf-mgx-short/bin have execute permissions
$ cd bin/ $ chmod +x ./nf-mgx-short/bin/*
-
Run the pipeline
$ nextflow run ./nf-mgx-short/main.nf -profile docker,your_profile --profilers metaphlan4 --read_path /path/to/metagenomes --outdir /path/to/results
- You can specifiy multiple profiles separated by comma, e.g. -profile docker,sge.
- The taxonomic classification, nucleotide alignment, translated search and annotation modules can be quite memory intensive depending on the databases used
- Delete the work/ directory after running the pipeline to free up space taken up by intermediate files
Contact: Indrik Wijaya indrik_wijaya@gis.a-star.edu.sg, indrik.wijaya@gmail.com