This document describes the output produced by the pipeline. Most of the plots are taken from the MultiQC report, which summarises results at the end of the pipeline.
The directories listed below will be created in the results directory after the pipeline has finished. All paths are relative to the top-level results directory.
The pipeline is built using Nextflow and processes data using the following steps:
- UNTAR - Optionally saved decompressed input databases
- FastQC - Raw read QC
- falco - Alternative to FastQC for raw read QC
- fastp - Adapter trimming for Illumina data
- AdapterRemoval - Adapter trimming for Illumina data
- Nonpareil - Read redundancy and metagenome coverage estimation for short reads
- BBDuk - Quality trimming and filtering for Illumina data
- PRINSEQ++ - Quality trimming and filtering for Illunina data
- Porechop - Adapter removal for Oxford Nanopore data
- Porechop_ABI - Adapter removal for Oxford Nanopore data
- Filtlong - Quality trimming and filtering for Nanopore data
- Nanoq - Quality trimming and filtering for Nanopore data
- Bowtie2 - Host removal for Illumina reads
- minimap2 - Host removal for Nanopore reads
- SAMtools stats - Statistics from host removal
- SAMtools fastq - Converts unmapped BAM file to fastq format (minimap2 only)
- Analysis Ready Reads - Optional results directory containing the final processed reads used as input for classification/profiling.
- mOTUs - Tool for marker gene-based OTU (mOTU) profiling.
- MultiQC - Aggregate report describing results and QC from the whole pipeline
- Pipeline information - Report metrics generated during the workflow execution
untar is used in zellerlab/flexprofiler to decompress various input files ending in .tar.gz. This process is mainly used for decompressing input database archive files.
Output files
untar/database/<database_file_name>: directory containing contents of the decompressed archive
This directory will only be present if --save_untarred_databases is supplied. The contained directories can be useful for moving the decompressed directories to a central 'cache' location allowing users to re-use the same databases. This is useful to save unnecessary computational time of decompressing the archives on every run.
Output files
{fastqc,falco}/- {raw,preprocessed}
*html: FastQC or Falco report containing quality metrics in HTML format.*.txt: FastQC or Falco report containing quality metrics in TXT format.*.zip: Zip archive containing the FastQC report, tab-delimited data file and plot images (FastQC only).
- {raw,preprocessed}
FastQC gives general quality metrics about your sequenced reads. It provides information about the quality score distribution across your reads, per base sequence content (%A/T/G/C), adapter contamination and overrepresented sequences. For further reading and documentation see the FastQC help pages.
If preprocessing is turned on, zellerlab/flexprofiler runs FastQC/Falco twice -once before and once after adapter removal/read merging, to allow evaluation of the performance of these preprocessing steps. Note in the General Stats table, the columns of these two instances of FastQC/Falco are placed next to each other to make it easier to evaluate. However, the columns of the actual preprocessing steps (i.e, fastp, AdapterRemoval, and Porechop) will be displayed after the two FastQC/Falco columns, even if they were run 'between' the two FastQC/Falco jobs in the pipeline itself.
:::info
Falco produces identical output to FastQC but in the falco/ directory.
:::
fastp is a FASTQ pre-processing tool for quality control, trimmming of adapters, quality filtering and other features.
It is used in zellerlab/flexprofiler for adapter trimming of short-reads.
Output files
fastp/<sample_id>.fastp.fastq.gz: File with the trimmed unmerged fastq reads.<sample_id>.merged.fastq.gz: File with the reads that were successfully merged.<sample_id>.*{log,html,json}: Log files in different formats.
By default zellerlab/flexprofiler will only provide the <sample_id>.fastp.fastq.gz file if fastp is selected. The file <sample_id>.merged.fastq.gz will be available in the output folder if you provide the argument --shortread_qc_mergepairs (optionally retaining un-merged pairs when in combination with --shortread_qc_includeunmerged).
You can change the default value for low complexity filtering by using the argument --shortread_complexityfilter_fastp_threshold.
AdapterRemoval searches for and removes remnant adapter sequences from High-Throughput Sequencing (HTS) data and (optionally) trims low quality bases from the 3' end of reads following adapter removal. It is popular in the field of palaeogenomics. The output logs are stored in the results folder, and as a part of the MultiQC report.
Output files
adapterremoval/<sample_id>.settings: AdapterRemoval log file containing general adapter removal, read trimming and merging statistics<sample_id>.collapsed.fastq.gz- read-pairs that merged and did not undergo trimming (only when--shortread_qc_mergepairssupplied)<sample_id>.collapsed.truncated.fastq.gz- read-pairs that merged underwent quality trimming (only when--shortread_qc_mergepairssupplied)<sample_id>.pair1.truncated.fastq.gz- read 1 of pairs that underwent quality trimming<sample_id>.pair2.truncated.fastq.gz- read 2 of pairs that underwent quality trimming (and could not merge if--shortread_qc_mergepairssupplied)<sample_id>.singleton.truncated.fastq.gz- orphaned read pairs where one of the pair was discarded<sample_id>.discard.fastq.gz- reads that were discarded due to length or quality filtering
By default zellerlab/flexprofiler will only provide the .settings file if AdapterRemoval is selected.
You will only find the .fastq files in the results directory if you provide --save_preprocessed_reads. If this is selected, you may receive different combinations of .fastq files for each sample depending on the input types - e.g. whether you have merged or not, or if you're supplying both single- and paired-end reads. Alternatively, if you wish only to have the 'final' reads that go into classification/profiling (i.e., that may have additional processing), do not specify this flag but rather specify --save_analysis_ready_fastqs, in which case the reads will be in the folder analysis_ready_reads.
:::warning
The resulting .fastq files may not always be the 'final' reads that go into taxprofiling, if you also run other steps such as complexity filtering, host removal, run merging etc..
:::
nonpareil is a tool for estimating metagenome 'coverage' from short-read libraries, i.e, whether all genomes within the metagenome have had at least one read sequenced. The lower the redundancy, the more sequencing can be done until the entire metagenome has been captured. The output can be used to guide the amount of further sequencing is required.
Output files
-
nonpareil/<sample_id>.npl- log file of the nonpareil run.<sample_id>.npo- redundancy summary file. This is the most useful file and contains the information for generating metagenome coverage curves. These six columns are: seq. effort (n reads), average redundancy, standard deviation, quartile 1, median (quartile 2), and quartile 3.<sample_id>.npa- raw version of npo but with all replicates not just a summary (average) at each point. These three columns are: seq. effort (n reads), replicate ID, redundancy value.<sample_id>.npc- raw list with the number of reads in the dataset matching a query read.<sample_id>.png- rendered version of a Nonpareil curve, with extrapolation and sequencing effort information.nonpareil_all_samples_mqc.{png,pdf}summary of the plot of curves for all samples with sequencing effort information.nonpareil_all_samples_mqc.{json,tsv,csv}basic summary statistics of model, with additional curve and plotting information in the JSON.
In most cases you will just want to look at the PNG files which contain the extrapolation information for estimating how much of the metagenome 'coverage' you will recover if you sequence more (i.e., to help indicate at what point you will just keep sequencing redundant reads that provide no more new taxonomic information).
The .npo files can be used for re-generating and customising the plots using the companion Nonpareil R package.
Porechop is a tool for finding and removing adapters from Oxford Nanopore reads. Adapters on the ends of reads are trimmed and if a read has an adapter in its middle, it is considered a chimeric and it chopped into separate reads.
Output files
porechop/<sample_id>.log: Log file containing trimming statistics<sample_id>.fastq.gz: Adapter-trimmed file
The output logs are saved in the output folder and are part of MultiQC report.You do not normally need to check these manually.
You will only find the .fastq files in the results directory if you provide --save_preprocessed_reads. Alternatively, if you wish only to have the 'final' reads that go into classification/profiling (i.e., that may have additional processing), do not specify this flag but rather specify --save_analysis_ready_fastqs, in which case the reads will be in the folder analysis_ready_reads.
:::warning We do not recommend using Porechop if you are already trimming the adapters with ONT's basecaller Guppy. :::
Porechop_ABI is an extension of Porechop. Unlike Porechop, Porechop_ABI does not use any external knowledge or database for the adapters. Adapters are discovered directly from the reads using approximate k-mers counting and assembly. Then these sequences can be used for trimming, using all standard Porechop options. The software is able to report a combination of distinct sequences if a mix of adapters is used. It can also be used to check whether a dataset has already been trimmed out or not, or to find leftover adapters in datasets that have been previously processed with Guppy.
Output files
porechop_abi/<sample_id>.log: Log file containing trimming statistics<sample_id>.fastq.gz: Adapter-trimmed file
The output logs are saved in the output folder and are part of MultiQC report.You do not normally need to check these manually.
You will only find the .fastq files in the results directory if you provide --save_preprocessed_reads. Alternatively, if you wish only to have the 'final' reads that go into classification/profiling (i.e., that may have additional processing), do not specify this flag but rather specify --save_analysis_ready_fastqs, in which case the reads will be in the folder analysis_ready_reads.
BBDuk stands for Decontamination Using Kmers. BBDuk was developed to combine most common data-quality-related trimming, filtering, and masking operations into a single high-performance tool.
It is used in zellerlab/flexprofiler for complexity filtering using different algorithms. This means that it will remove reads with low sequence diversity (e.g. mono- or dinucleotide repeats).
Output files
bbduk/<sample_id>.bbduk.log: log file containing filtering statistics<sample_id>.fastq.gz: resulting FASTQ file without low-complexity reads
By default zellerlab/flexprofiler will only provide the .log file if BBDuk is selected as the complexity filtering tool. You will only find the complexity filtered reads in your results directory if you provide --save_complexityfiltered_reads. Alternatively, if you wish only to have the 'final' reads that go into classification/profiling (i.e., that may have additional processing), do not specify this flag but rather specify --save_analysis_ready_fastqs, in which case the reads will be in the folder analysis_ready_reads.
:::warning
The resulting .fastq files may not always be the 'final' reads that go into taxprofiling, if you also run other steps such as host removal, run merging etc..
:::
PRINSEQ++ is a C++ implementation of the prinseq-lite.pl program. It can be used to filter, reformat or trim genomic and metagenomic sequence data.
It is used in zellerlab/flexprofiler for complexity filtering using different algorithms. This means that it will remove reads with low sequence diversity (e.g. mono- or dinucleotide repeats).
Output files
prinseqplusplus/<sample_id>.log: log file containing number of reads. Row IDs correspond to:min_len, max_len, min_gc, max_gc, min_qual_score, min_qual_mean, ns_max_n, noiupac, derep, lc_entropy, lc_dust, trim_tail_left, trim_tail_right, trim_qual_left, trim_qual_right, trim_left, trim_right<sample_id>_good_out.fastq.gz: resulting FASTQ file without low-complexity reads
By default zellerlab/flexprofiler will only provide the .log file if PRINSEQ++ is selected as the complexity filtering tool. You will only find the complexity filtered .fastq files in your results directory if you supply --save_complexityfiltered_reads. Alternatively, if you wish only to have the 'final' reads that go into classification/profiling (i.e., that may have additional processing), do not specify this flag but rather specify --save_analysis_ready_fastqs, in which case the reads will be in the folder analysis_ready_reads.
:::warning
The resulting .fastq files may not always be the 'final' reads that go into taxprofiling, if you also run other steps such as host removal, run merging etc..
:::
Filtlong is a quality filtering tool for long reads. It can take a set of small reads and produce a smaller, better subset.
Output files
filtlong/<sample_id>_filtered.fastq.gz: Quality or long read data filtered file<sample_id>_filtered.log: log file containing summary statistics
You will only find the .fastq files in the results directory if you provide --save_preprocessed_reads. Alternatively, if you wish only to have the 'final' reads that go into classification/profiling (i.e., that may have additional processing), do not specify this flag but rather specify --save_analysis_ready_fastqs, in which case the reads will be in the folder analysis_ready_reads.
:::warning We do not recommend using Filtlong if you are performing filtering of low quality reads with ONT's basecaller Guppy. :::
nanoq is an ultra-fast quality filtering tool that also provides summary reports for nanopore reads.
Output files
nanoq/<sample_id>_filtered.fastq.gz: Quality or long read data filtered file<sample_id>_filtered.stats: Summary statistics report
You will only find the .fastq files in the results directory if you provide --save_preprocessed_reads. Alternatively, if you wish only to have the 'final' reads that go into classification/profiling (i.e., that may have additional processing), do not specify this flag but rather specify --save_analysis_ready_fastqs, in which case the reads will be in the folder analysis_ready_reads.
Bowtie 2 is an ultrafast and memory-efficient tool for aligning sequencing reads to long reference sequences. It is particularly good at aligning reads of about 50 up to 100s or 1,000s of characters, and particularly good at aligning to relatively long (e.g. mammalian) genomes.
It is used with zellerlab/flexprofiler to allow removal of 'host' (e.g. human) and/or other possible contaminant reads (e.g. Phi X) from short-read .fastq files prior to profiling.
Output files
bowtie2/build/*.bt2: Bowtie2 indicies of reference genome, only if--save_hostremoval_indexsupplied.
align/<sample_id>.bam: BAM file containing reads that aligned against the user-supplied reference genome as well as unmapped reads<sample_id>.bowtie2.log: log file about the mapped reads<sample_id>.unmapped.fastq.gz: the off-target reads from the mapping that is used in downstream steps.
By default zellerlab/flexprofiler will only provide the .log file if host removal is turned on. You will only have a .bam file if you specify --save_hostremoval_bam. This will contain both mapped and unmapped reads. You will only get FASTQ files if you specify to save --save_hostremoval_unmapped - these contain only unmapped reads. Alternatively, if you wish only to have the 'final' reads that go into classification/profiling (i.e., that may have additional processing), do not specify this flag but rather specify --save_analysis_ready_fastqs, in which case the reads will be in the folder analysis_ready_reads.
:::info
Unmapped reads in FASTQ are only found in this directory for short-reads, for long-reads see samtools/fastq/.
:::
:::info
The resulting .fastq files may not always be the 'final' reads that go into taxprofiling, if you also run other steps such as run merging etc..
:::
:::info While there is a dedicated section in the MultiQC HTML for Bowtie2, these values are not displayed by default in the General Stats table. Rather, alignment statistics to host genome is reported via samtools stats module in MultiQC report for direct comparison with minimap2 (see below). :::
minimap2 is an alignment tool suited to mapping long reads to reference sequences.
It is used with zellerlab/flexprofiler to allow removal of 'host' (e.g. human) or other possible contaminant reads from long-read .fastq files prior to taxonomic classification/profiling.
Output files
minimap2/build/*.mmi2: minimap2 indices of reference genome, only if--save_hostremoval_indexsupplied.
align/<sample_id>.bam: Alignment file in BAM format containing both mapped and unmapped reads.
By default, zellerlab/flexprofiler will only provide the .bam file containing mapped and unmapped reads if saving of host removal for long reads is turned on via --save_hostremoval_bam.
:::info minimap2 is not yet supported as a module in MultiQC and therefore there is no dedicated section in the MultiQC HTML. Rather, alignment statistics to host genome is reported via samtools stats module in MultiQC report. :::
:::info
Unlike Bowtie2, minimap2 does not produce an unmapped FASTQ file by itself. See samtools/fastq.
:::
SAMtools fastq converts a .sam, .bam, or .cram alignment file to FASTQ format
Output files
samtools/stats/<sample_id>_interleaved.fq.gz: Unmapped reads only in FASTQ gzip format
This directory will be present and contain the unmapped reads from the .fastq format from long-read minimap2 host removal, if --save_hostremoval_unmapped is supplied. Alternatively, if you wish only to have the 'final' reads that go into classification/profiling (i.e., that may have additional processing), do not specify this flag but rather specify --save_analysis_ready_fastqs, in which case the reads will be in the folder analysis_ready_reads.
:::info For short-read unmapped reads, see bowtie2. :::
:::info
This optional results directory will only be present in the pipeline results when supplying --save_analysis_ready_fastqs.
:::
Output files
analysis_ready_fastqs/<sample_id>_{fq,fastq}.gz: Final reads that underwent preprocessing and were sent for classification/profiling.
The results directory will contain the 'final' processed reads used as input for classification/profiling. It will only include the output of the last step of any combinations of preprocessing steps that may have been specified in the run configuration. For example, if you perform the read QC and host-removal preprocessing steps, the final reads that are sent to classification/profiling are the host-removed FASTQ files - those will be the ones present in this directory.
:::warning If you turn off all preprocessing steps, then no results will be present in this directory. This happens independently for short- and long-reads. I.e. you will only have FASTQ files for short reads in this directory if you skip all long-read preprocessing. :::
SAMtools stats collects statistics from a .sam, .bam, or .cram alignment file and outputs in a text format.
Output files
samtools/stats/<sample_id>.stats: File containing samtools stats output.
In most cases you do not need to check this file, as it is rendered in the MultiQC run report.
zellerlab/flexprofiler offers the option to merge FASTQ files of multiple sequencing runs or libraries that derive from the same sample, as specified in the input samplesheet.
This is the last possible preprocessing step, so if you have multiple runs or libraries (and run merging turned on), this will represent the final reads that will go into classification/profiling steps.
Output files
run_merging/*.fastq.gz: Concatenated FASTQ files on a per-sample basis
Note that you will only find samples that went through the run merging step in this directory. For samples that had a single run or library will not go through this step of the pipeline and thus will not be present in this directory.
This directory and its FASTQ files will only be present if you supply --save_runmerged_reads. Alternatively, if you wish only to have the 'final' reads that go into classification/profiling (i.e., that may have additional processing), do not specify this flag but rather specify --save_analysis_ready_fastqs, in which case the reads will be in the folder analysis_ready_reads.
mOTUS is a taxonomic profiler that maps reads to a unique marker specific database and estimates the relative abundance of known and unknown species.
Output files
motus/<db_name>/<sample_id>.log: A log file that contains summary statistics<sample_id>.out: A classification file that summarises taxonomic identifiers and their raw abundace in the profiled sample
motus_<db_name>_combined_reports.txt: A combined profile of all samples aligned to a given database (as generated bymotus_merge)
Normally *_combined_reports.txt is the most useful file for downstream analyses, but the per sample .out file can provide additional more specific information.
Output files
multiqc/multiqc_report.html: a standalone HTML file that can be viewed in your web browser.multiqc_data/: directory containing parsed statistics from the different tools used in the pipeline.multiqc_plots/: directory containing static images from the report in various formats.
MultiQC is a visualization tool that generates a single HTML report summarising all samples in your project. Most of the pipeline QC results are visualised in the report and further statistics are available in the report data directory.
Results generated by MultiQC collate pipeline QC from supported tools e.g. FastQC. The pipeline has special steps which also allow the software versions to be reported in the MultiQC output for future traceability. For more information about how to use MultiQC reports, see http://multiqc.info.
All tools in flexprofiler supported by MultiQC will have a dedicated section showing summary statistics of each tool based on information stored in log files.
You can expect in the MultiQC reports either sections and/or general stats columns for the following tools:
- fastqc
- adapterremoval
- fastp
- nonpareil
- bbduk
- prinseqplusplus
- nanoq
- porechop_abi
- porechop
- filtlong
- bowtie2
- minimap2
- samtools (stats)
- kraken
- bracken
- centrifuge
- kaiju
- diamond
- malt
- motus
- metaphlan
:::info
The 'General Stats' table by default will only show statistics referring to pre-processing steps, and will not display possible values from each classifier/profiler, unless turned on by the user within the 'Configure Columns' menu or via a custom MultiQC config file (--multiqc_config).
For example, DIAMOND output does not have a dedicated section in the MultiQC HTML, only in the general stats table. To turn this on, copy the zellerlab/flexprofiler MultiQC config and change the DIAMOND entry in table_columns_visible: to True.
:::
Output files
pipeline_info/- Reports generated by Nextflow:
execution_report.html,execution_timeline.html,execution_trace.txtandpipeline_dag.dot/pipeline_dag.svg. - Reports generated by the pipeline:
pipeline_report.html,pipeline_report.txtandsoftware_versions.yml. Thepipeline_report*files will only be present if the--email/--email_on_failparameter's are used when running the pipeline. - Reformatted samplesheet files used as input to the pipeline:
samplesheet.valid.csv. - Parameters used by the pipeline run:
params.json.
- Reports generated by Nextflow:
Nextflow provides excellent functionality for generating various reports relevant to the running and execution of the pipeline. This will allow you to troubleshoot errors with the running of the pipeline, and also provide you with other information such as launch commands, run times and resource usage.