Introduction

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.

For each sample, the pipeline aligns reads once against a single combined ABO reference (spanning exons 2–7) and generates BAM files, BAM metrics, and per-position variant statistics.

The output directory generated by this Nextflow pipeline will look something like this:

OUTDIR/
β”œβ”€β”€ ABO_results.log
β”œβ”€β”€ ABO_result.txt
β”œβ”€β”€ ABO_result.xlsx
β”œβ”€β”€ final_export.csv
β”œβ”€β”€ per_sample_processing
β”‚ └── SAMPLE1_barcode01
β”‚ └── combined
β”‚ β”œβ”€β”€ ABOReadPolymorphisms.txt
β”‚ β”œβ”€β”€ alignment
β”‚ β”‚ β”œβ”€β”€ SAMPLE1_barcode01.bam
β”‚ β”‚ β”œβ”€β”€ SAMPLE1_barcode01.bam.bai
β”‚ β”‚ β”œβ”€β”€ SAMPLE1_barcode01.coverage.txt
β”‚ β”‚ β”œβ”€β”€ SAMPLE1_barcode01.flagstat
β”‚ β”‚ └── SAMPLE1_barcode01.stats
β”‚ β”œβ”€β”€ SAMPLE1_barcode01.ABOPhenotype.txt
β”‚ β”œβ”€β”€ SAMPLE1_barcode01.AlignmentStatistics.tsv
β”‚ β”œβ”€β”€ SAMPLE1_barcode01.Haplotypes.tsv
β”‚ └── SAMPLE1_barcode01.log.txt
β”œβ”€β”€ pipeline_info
β”‚Β Β  β”œβ”€β”€ execution_report_DATETIME.html
β”‚Β Β  β”œβ”€β”€ execution_timeline_DATETIME.html
β”‚Β Β  β”œβ”€β”€ execution_trace_DATETIME.txt
β”‚Β Β  β”œβ”€β”€ nf_core_pipeline_software_mqc_versions.yml
β”‚Β Β  β”œβ”€β”€ params_DATETIME.json
β”‚Β Β  └── pipeline_dag_DATETIME.html
└── qc-reports
β”œβ”€β”€ fastqc
β”‚Β Β  β”œβ”€β”€ SAMPLE1_barcode01_fastqc.html
β”‚Β Β  β”œβ”€β”€ SAMPLE1_barcode01_fastqc.zip
└── multiqc
β”œβ”€β”€ multiqc_data
β”œβ”€β”€ multiqc_plots
β”‚Β Β  β”œβ”€β”€ pdf
β”‚Β Β  β”œβ”€β”€ png
β”‚Β Β  └── svg
└── multiqc_report.html

The ABO_result.xlsx Excel worksheet contains details of all SNVs and metrics used to deduce the ABO phenotype for each sample.

A summary of the ABO typing results is provided in final_export.csv

Feel free to raise an issue or reach out if you need any support getting this tool running, or with suggestions for improvement.

Pipeline overview

The pipeline is built using Nextflow and processes data using the following steps:

FastQC

Output files
  • fastqc/
    • *_fastqc.html: FastQC report containing quality metrics.
    • *_fastqc.zip: Zip archive containing the FastQC report, tab-delimited data file and plot images.

FastQC provides general quality metrics about your sequenced reads, including base quality scores, GC content, adapter contamination, and overrepresented sequences.

Minimap2

Output files
  • alignment/
    • *.bam: Aligned reads in BAM format.
    • *.bai: BAM index files.

Minimap2 is used to align Nanopore reads to the single combined ABO reference FASTA. It supports long-read data and is optimized for speed and accuracy.

SAMtools Modules

This set of modules use SAMtools and its subtools to extract key metrics and data from aligned BAM files. These outputs are used for quality control and coverage analysis.

Output subtool files
  • coverage/
    • *.coverage.txt: Coverage metrics per sample.
  • flagstat/
    • *.flagstat.txt: Summary of alignment flags.
  • stats/
    • *.stats.txt: Detailed alignment statistics.

Coverage: Calculates per-base and overall coverage statistics to assess sequencing depth and uniformity.

Flagstat: Provides a quick summary of alignment quality, including total reads, mapped reads, duplicates, and other key metrics.

Stats: Generates comprehensive metrics such as insert size distributions, read lengths, and mapping quality.

Nucleotide Quantification

Output files
  • combined/
    • *.AlignmentStatistics.tsv: Per-position nucleotide frequency and coverage table.
    • *.Haplotypes.tsv: Per-read haplotype table, enabling cis-phasing across every diagnostic position on the same read.
    • ABOReadPolymorphisms.txt: Summary of polymorphic positions observed.

pysam_haploscan.py (the HAPLOSCAN module) computes per-position nucleotide frequencies and per-read haplotypes directly from the aligned BAM in a single pass, replacing a separate samtools mpileup step.

ABO SNP Interpretation

Output files
  • phenotype/
    • *.snp_summary.txt: Summary of ABO-related SNPs.
    • *.phenotype.txt: Predicted ABO phenotype per sample.

This custom module interprets SNP data to infer ABO blood group phenotypes using curated reference profiles and decision rules.

MultiQC

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 aggregates results from FastQC, SAMtools, and other modules into a single interactive report. It also includes software version tracking for reproducibility.

Pipeline information

Output files
  • pipeline_info/
    • Reports generated by Nextflow: execution_report.html, execution_timeline.html, execution_trace.txt and pipeline_dag.dot/pipeline_dag.svg.
    • Reports generated by the pipeline: pipeline_report.html, pipeline_report.txt and software_versions.yml. The pipeline_report* files will only be present if the --email / --email_on_fail parameter’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.

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.