zellerlab/flexprofiler is a bioinformatics best-practice analysis pipeline for (microbiome) taxonomic and functional classification and profiling of shotgun and 16S metagenomic data. It allows for in-parallel identification of reads or taxonomic abundance estimation with multiple classification and profiling tools against multiple databases, and produces standardised output tables for facilitating results comparison between different tools and databases. It aims to enable microbiome profiling not only of single datasets but also of collections of studies for meta-analysis.
zellerlab/flexprofiler started as a fork of nf-core/taxprofiler. It was also inspired by the previous zellerlab taxonomic/functional profiling pipeline, cschu/vortex_knight. Many features of nf-core/taxprofiler that are not needed for the intended use case of zellerlab/flexprofiler been removed for simplicity, and support for 16S sequencing data, functional profiling, and meta-analyses has been added. We plan to contribute to nf-core modules or other components of more general interest, and to implement relevant nf-core developments in this pipeline on an irregular schedule.
- Optional repair of the order of PE reads (BBMap repair)
- Read pre-processing
- Short reads (Illumina): adapter clipping and merging with fastp
- Long reads (PacBio,
AMPLICONruns only): quality filtering with vsearch and BBDuk - Shotgun (
WGS) runs: host-read removal with Bowtie2 - Or, for low-biomass human samples, after run merging, the stringent host filtering of PathSeq-T2T (Dohlman et al. 2026): alignment to GRCh38 (bwa, or STAR for RNA-seq), GATK PathSeq filters, and alignment to T2T-CHM13 (
--pathseq_t2t) - Amplicon (
AMPLICON, e.g. 16S) runs: primer detection with PIMENTO and trimming with cutadapt, and merging of the read pairs
- Optional concatenation of the runs of each sample
- Read QC of the raw and of the preprocessed reads (
FalcoorFastQC) - Performs classification and/or profiling using one or more of:
- Standardises and collates output tables (tool-specific)
- Reports the read counts of each sample after each step
- Presents the QC and the read counts (
MultiQC)
A set of pre-configured options used internally in the group is documented here.
Note
If you are new to Nextflow and nf-core, please refer to this page on how to set-up Nextflow. The pipeline tests can be run with nf-test: nf-test test --tag pipeline --profile +docker.
First, prepare a samplesheet with your input data that looks as follows:
sample,run_accession,instrument_platform,fastq_1,fastq_2
2612,run1,ILLUMINA,2612_run1_R1.fq.gz,2612_run1_R2.fq.gz
2612,run2,ILLUMINA,2612_run2_R1.fq.gz,2612_run2_R2.fq.gz
2612,run3,ILLUMINA,2612_run3_R1.fq.gz,2612_run3_R2.fq.gzAdditionally, you will need a database sheet that looks as follows:
tool,db_name,db_params,db_path,annot_db_name,annot_db_path
motus4,db_mOTU,,/<path>/<to>/motus4/db_mOTU,,That includes directories or .tar.gz archives containing databases for the tools you wish to run the pipeline against.
Now, you can run the pipeline using:
nextflow run zellerlab/flexprofiler \
-profile <docker/singularity/.../institute> \
--input samplesheet.csv \
--databases databases.csv \
--outdir <OUTDIR> \
--run_motus4Warning
Please provide pipeline parameters via the CLI or Nextflow -params-file option. Custom config files including those provided by the -c Nextflow 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.
To use zellerlab/flexprofiler you need the databases that the profiling tools that you want to run require.
These can be downloaded using this script, which requires as argument the path where the databases will be downloaded, and optionally the number of cpus.
Each database is downloaded only on request, by setting its variable to 1: FETCH_MOTUS4 (mOTUs 4.0.4), FETCH_MOTUS3 (mOTUs 3.1), FETCH_CAYMAN (the GMGC10 human gut gene catalogue with its bwa index and the Cayman annotation), FETCH_GQLIB (the gqlib database, built by annotating the gene catalogue with eggNOG-mapper, which takes long; not tested), FETCH_PATHSEQ_T2T (the references of --pathseq_t2t, ~200 GB), FETCH_PATHSEQ_T2T_STAR (the STAR index of GRCh38 for --pathseq_t2t_grch38_aligner star) and FETCH_KRAKEN2 (the Kraken2 PlusPF 2024-12-28 database, ~75 GB).
See the database documentation for the details.
The script also generates a flexprofiler_databases.csv file in the local directory, which can be used in input for the pipeline.
FETCH_MOTUS4=1 FETCH_CAYMAN=1 fetch_databases.sh <out_database_path> [cpus]Important
If you are a member of the Zeller lab, most likely you do not need to download the databases as this has already been done for you in a centralised location. Databases have been already set up for the following compute environments with corresponding profiles:
- LUMC SHARK cluster (nextflow profile name:
zellerlab_shark)
You just need to use the correct profile in the nextflow run so that they are loaded correctly, for example:
nextflow run zellerlab/flexprofiler -profile zellerlab_shark <YOUR OTHER NEXTFLOW ARGUMENTS>For more details about the output files and reports, please refer to the output documentation.
zellerlab/flexprofiler is developed and maintained by Saul Pierotti. nf-core/taxprofiler was originally written by James A. Fellows Yates, Sofia Stamouli, Moritz E. Beber, Lili Andersson-Li, and the nf-core/taxprofiler team. cschu/vortex_knight was originally written by Christian Schudoma at the European Molecular Biology Laboratory. We refer the reader to nf-core/taxprofiler and cschu/vortex_knight for further credits.
An extensive list of references for the tools used by the pipeline can be found in the CITATIONS.md file.