nf-core/abotyper
A pipeline for characterising the Human Blood Group and Red Cell Antigens using Oxford Nanopore third-generation sequencing data.
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_result.xlsxβββ ABO_result.txtβββ ABO_results.logβββ ABO_run_qc.txtβββ ABO_evidence_summary_mqc.tsvβββ final_export.csvβββ per_sample_processingβ βββ SAMPLE1_barcode01β βββ alignmentβ β βββ SAMPLE1_barcode01.bamβ β βββ SAMPLE1_barcode01.bam.baiβ β βββ SAMPLE1_barcode01.coverage.txtβ β βββ SAMPLE1_barcode01.flagstatβ β βββ SAMPLE1_barcode01.statsβ βββ clair3β β βββ SAMPLE1_barcode01_clair3.merge_output.gvcf.gzβ β βββ SAMPLE1_barcode01_clair3.merge_output.vcf.gzβ β βββ SAMPLE1_barcode01_clair3.phased_merge_output.vcf.gzβ βββ clair2metricsβ β βββ SAMPLE1_barcode01.AlignmentStatistics.tsvβ β βββ SAMPLE1_barcode01.Haplotypes.tsvβ β βββ SAMPLE1_barcode01.concordance.tsvβ β βββ SAMPLE1_barcode01.evidence_status.tsvβ β βββ SAMPLE1_barcode01.pileup_metrics.tsvβ βββ combinedβ βββ SAMPLE1_barcode01.ABOPhenotype.txtβ βββ SAMPLE1_barcode01.log.txtβββ pipeline_infoβ βββ abo_variant_panel.bedβ βββ abotyper_software_mqc_versions.ymlβ βββ execution_report_DATETIME.htmlβ βββ execution_timeline_DATETIME.htmlβ βββ execution_trace_DATETIME.txtβ βββ params_DATETIME.jsonβ βββ pipeline_dag_DATETIME.htmlβββ qc_and_preprocessing βββ nanoplot β βββ SAMPLE1_barcode01_NanoPlot-report.html β βββ SAMPLE1_barcode01_NanoStats.txt βββ multiqc βββ multiqc_data βββ multiqc_plots β βββ pdf β βββ png β βββ svg βββ multiqc_report.htmlABO_result.xlsx has three sheets: Typing (one row per sample with read, mapping and depth metrics, the evidence source, the ISBT-style typing result, phenotype, genotype, the variants detected, a depth check and QC status), Variants (one column per panel position with the call and depth, for example A 50% (215x), ref (215x) or no data; the rare positions marked report: detected in the panel appear only when a sample carries them; the full pileup counts are in ABO_result.txt) and About (script, panel and ISBT-table versions and the research-use statement).
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:
- NanoPlot β Raw long-read quality control
- Minimap2 β Mapping reads to the combined ABO reference
- SAMtools Coverage β Coverage metrics
- SAMtools Flagstat β Alignment summary statistics
- SAMtools Stats β Detailed alignment metrics
- Clair3 β Small-variant calling and phasing, converted into per-position nucleotide frequencies and a haplotype table
- ABO SNP Interpretation β Custom logic to infer ABO phenotype
- MultiQC β Aggregate report describing results and QC from the whole pipeline
NanoPlot
Output files
qc_and_preprocessing/nanoplot/<sample>_NanoPlot-report.html: NanoPlot report with read length and quality distributions.<sample>_NanoStats.txt: Summary statistics (number of reads, mean and median read length, N50, mean and median read quality).
NanoPlot (part of NanoPack) provides quality metrics designed for long reads, including the read length distribution, mean read quality, and the number of reads and bases. The NanoStats files are also read by MultiQC. Because the sequencing is an amplicon of the ABO gene, read lengths cluster around the amplicon size; a very different distribution, or few reads, points to a library or run problem before alignment.
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.
Variant Calling and Quantification
Output files
clair3/*.merge_output.vcf.gz: Clair3βs PASS-filtered small-variant calls.*.merge_output.gvcf.gz: Clair3βs gVCF, including non-variant reference blocks.*.phased_merge_output.vcf.gz: Clair3βs phased small-variant calls (GT + PS tags).*.panel.vcf.gz/*.panel..tsv: normalized calls restricted to the ABO panel positions, and a flat TSV of the same, for manual review (VARIANTS_QC).
clair2metrics/*.AlignmentStatistics.tsv: Per-position nucleotide frequency and coverage table, converted from Clair3βs gVCF.*.Haplotypes.tsv: Haplotype table, synthesized from Clair3βs phased-VCF phase-set allele depths (not literal per-read observations).
Clair3 (--gvcf --enable_phasing) calls small variants directly from the aligned BAM, with phasing. clair2metrics.py (the ABO_CLAIR2METRICS module) and clair2haplotypes.py (the ABO_CLAIR2HAPLOTYPES module) then convert its gVCF and phased VCF into per-position nucleotide frequencies and a haplotype table respectively, in the same formats the retired BAM-pileup-based HAPLOSCAN module used to produce, so downstream phenotype prediction needs no changes.
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 NanoPlot, SAMtools, and other modules, plus the per-sample ABO evidence summary table, 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.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.