nf-core/abotyper
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 (SNVs).
Warning
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
Note
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.5 | variant calling, phasing |
| bcftools | 1.25 | 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_barcode13
NTC_barcode12
2025705_barcode14
Sample-45-44874_barcode25
Sample1-2024-12345_barcode22
ABO_AA_barcode01
patient-01
S1.r1
Controls 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 test
nextflow run nf-core/abotyper --outdir test_working -profile test,conda -resume
# Complete run
nextflow run nf-core/abotyper \
-resume \
-profile <docker/singularity/.../institute> \
--input samplesheet.csv \
--outdir <OUTDIR>
Warning
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
│ │ └── S