nf-core/abotyper
A pipeline for characterising the Human Blood Group and Red Cell Antigens using Oxford Nanopore third-generation sequencing data.
ABO blood typing using Oxford Nanopore MinION sequencing
nf-core/abotyper is a bioinformatics pipeline that analyses data obtained from Third Generation Sequencing of the Homo sapiens ABO, alpha 1-3-N-acetylgalactosaminyltransferase and alpha 1-3-galactosyltransferase (ABO) gene to deduce the ABO blood type.
It takes a samplesheet and FASTQ files as input, performs quality control (QC), mapping to the reference sequences, variant characterisation, and finally deduce the Blood Group Statistics based on known ABO-related Single nucleotide variants (SVNs).
Research use only. This pipeline has not been validated for clinical diagnosis or transfusion decisions. Results must be confirmed by an accredited method before any clinical use. See the intended use statement.

ABO sequences were acquired from the NCBI RefSeq and dbRBC databases:
- ABO RefSeqGene (NG_006669.2) - single combined reference used for alignment
- dbMHC and IHWG data
Pipeline steps
If you are new to Nextflow and nf-core, please refer to this page on how to set-up Nextflow. Make sure to test your setup with -profile test before running the workflow on actual data.
- Read quality control - Quality assessment of the long-read input FASTQ files using NanoPlot (
NANOPLOT) - Read alignment - Align reads to a single combined ABO reference (NG_006669.2) using Minimap2 (
MINIMAP2_ALIGN) - Alignment statistics - Generate comprehensive alignment metrics including coverage, flagstat, and detailed statistics:
- Coverage analysis (
SAMTOOLS_COVERAGE) - Flagstat metrics (
SAMTOOLS_FLAGSTAT) - Detailed statistics (
SAMTOOLS_STATS)
- Coverage analysis (
- Variant calling - Call small variants (with phasing) directly from the aligned BAM using Clair3 (
CLAIR3) - Variant quantification - Convert Clair3βs gVCF and phased VCF into per-position allele frequencies and per-read-equivalent haplotypes (
ABOTYPERCORE_CLAIR2METRICS,ABOTYPERCORE_CLAIR2HAPLOTYPES) - Independent BAM pileup - Count bases at every panel position directly from the aligned BAM, as a second line of evidence (nf-core
samtools/mpileup) - Evidence combination - Compare Clair3 and the BAM pileup at every panel position, fill positions Clair3 had no evidence for, and flag disagreement (
ABOTYPERCORE_PILEUP2METRICS) - SNP extraction - Extract and analyze ABO-relevant single nucleotide variants using the panel-driven coordinate system (
ABOTYPERCORE_PREDICTPHENOTYPE) - Phenotype prediction - Predict ABO blood group phenotype from combined SNP and haplotype patterns, with ISBT-style allele names and QC flags (
ABOTYPERCORE_AGGREGATE) - Quality control reporting - Compile a QC report with read, alignment and evidence metrics (
MULTIQC)
The pipeline uses NG_006669.2 (RefSeqGene, LRG_792) as a single combined ABO reference. Variant marker positions and coordinate calibration are defined in the variant panel bundled with abotyper-core (abotyper_core/data/abo_variant_panel.yaml); pass your own with --abo_panel.
Summary of tools and version used in the pipeline
The pipeline makes use of the following core dependencies:
| Dependency | Minimum version | Used for |
|---|---|---|
| Core Tools | ||
| nanoplot | 1.48.0 | long-read quality control |
| minimap2 | 2.30 | long-read alignment |
| samtools | 1.23 | BAM sort, index, alignment QC |
| clair3 | 2.0.0 | variant calling, phasing |
| bcftools | 1.23.1 | VCF normalize, filter (QC export) |
| multiqc | 1.35 | aggregate QC report |
| Typing | ||
| abotyper-core | 0.4.1 | panel, evidence and ABO typing |
The typing steps are the abotyper-core Python package (pip install abotyper-core or Bioconda), which has its own tests and command-line tools. It also provides abotyper-rename-samples, a standalone lab-export utility that is not part of the pipeline, and abotyper-calibrate-panel.
Required input files structure
The samplesheet has one row per sample, with the columns sample and fastq_1 (the sampleβs Nanopore reads), and the optional columns control and barcode (see usage).
Sample names and barcodes come from the samplesheet, not from file names. The sample name is used in every result table and may contain letters, digits, ., _ and -. The barcode column sets the barcode reported for the sample (7, 07 or barcode07). Without it, a name ending in _barcode<digits> is reported with that barcode (S1_barcode07 is sample S1, barcode 07); any other name is reported whole, with barcode00.
Here are a few examples of sample names:
POSCTRL_barcode13NTC_barcode122025705_barcode14Sample-45-44874_barcode25Sample1-2024-12345_barcode22ABO_AA_barcode01patient-01S1.r1Controls are declared in the control column (negative or positive), not recognised from the sample name.
.gzfiles are also accepted.
Sequencing platform compatibility
The pipeline types Oxford Nanopore amplicon reads of ABO exons 2-7 (about 7 kb), aligned to the NG_006669.2 reference, with multiple barcoded samples per run. It was validated on Oxford Nanopore MinION data. Clair3 runs with platform ont and an ONT model, so only Nanopore minimap2 presets are offered (--minimap2_preset: map-ont, the default, or lr:hq for high-accuracy Nanopore reads).
Ion Torrent and Illumina reads from the pilot study typed correctly with an earlier version of the pipeline. Their Clair3 settings have not yet been validated in this version, so other platforms are not supported in 1.0.0.
Running nf-core/abotyper
This pipeline has been extensively tested using conda, docker, and singularity profiles. Other containerisation methods are being improved, tested and documented. It is advised to run a minimal test run to check your environment before submitting big jobs.
To run this pipeline, use:
# Quick testnextflow run nf-core/abotyper --outdir test_working -profile test,conda -resume
# Complete runnextflow run nf-core/abotyper \ -resume \ -profile <docker/singularity/.../institute> \ --input samplesheet.csv \ --outdir <OUTDIR>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.
Output
For each sample, the pipeline aligns reads once against a single combined ABO reference (NG_006669.2, 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β βββ 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.
Credits
nf-core/abotyper was originally written by Fredrick M. Mobegi: @fmobegi at the Department of Clinical Immunology, PathWest Laboratory Medicine WA.
We thank the following people for their extensive assistance in the development and testing of this pipeline:
Maintenance and future developements will be led by Fredrick Mobegi.
Acknowledgements
We thank Stem Cell Donors Australia for the registry samples used to pilot and validate this pipeline, Eurobio-GenDx for the licence to pilot their ABO module, and PathWest Laboratory Medicine WA and The University of Western Australia for the resources to run the project. Further acknowledgements are given in the publication.
Use of AI
Claude Code running Opus 5.5 was used to run batch tests and pre-release checks.
Contributions and Support
If you would like to contribute to this pipeline, please see the contributing guidelines.
For further information or help, donβt hesitate to get in touch on the Slack #abotyper channel (you can join with this invite).
Further reading
Results generated from this pipeline should be interpreted together with the corresponding publication and literature on ABO genotyping.
To get up to speed with ABO genotyping, there is detailed reading material here.
Verified SNVs relevant to ABO blood group genotyping have also been documented extensively here
Citations
If you use nf-core/abotyper for your analysis, please cite it using the following publication:
Characterisation of the ABO Blood Group Phenotypes Using Third-Generation Sequencing.
Fredrick M. Mobegi, Samuel Bruce, Naser El-Lagta, Felipe Ayora, Benedict M. Matern, Mathijs Groeneweg, Lloyd J. DβOrsogna & Dianne De Santis.
Int. J. Mol. Sci. 2025 Jun 06. doi: 10.3390/ijms26125443.
An extensive list of references for the tools used by the pipeline can be found in the CITATIONS.md file.
You can cite the nf-core publication as follows:
The nf-core framework for community-curated bioinformatics pipelines.
Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.
Nat Biotechnol. 2020 Feb 13. doi: 10.1038/s41587-020-0439-x.
