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).
ABO sequences were acquired from the NCBI RefSeq and dbRBC databases:
Pipeline steps
The pipeline performs the following analysis steps:
- Index preparation - Convert FASTA index files (FAI) to BED format (
MAKEINDEX
) - Read quality control - Quality assessment of input FASTQ files (
FastQC
) - Read alignment - Map reads to ABO exon reference sequences (
Minimap2
) - Alignment statistics - Generate coverage, flagstat, and alignment statistics (
SAMtools
) - Variant calling - Generate mpileup files for variant detection (
SAMtools mpileup
) - Nucleotide frequency analysis - Calculate nucleotide frequencies at polymorphic positions (
MPILEUP_NUCL_FREQ
) - SNP extraction - Identify ABO-relevant single nucleotide variants (
GETABOSNPS
) - Phenotype prediction - Predict ABO blood group phenotype from SNP patterns (
ABOSNPS2PHENO
) - Quality control reporting - Compile comprehensive QC report (
MultiQC
)
Exon 7 CDS reference sequence was truncated at 817 bp as this captures the targeted SNVs within the exon and UTR’s
If you would like to get up to speed with ABO genotyping, there is detailed reading material here. All SNVs relevant to ABO blood group genotyping have also been documented extensively here
Core dependencies
The pipeline makes use of the following core dependencies:
- bwa
- fastqc
- minimap2
- multiqc (v1.28 prefered for now)
- samtools
- biopython
- python>=3.8
- pip
- pip:
- pandas>=2.2.0
- Bio>=1.6.0
- ncurses
- openpyxl>=3.1.0
- XlsxWriter>=3.2.0
Required input files structure
Ensure that all input fastq files have a naming convention that matches this regular expression (regex
)
## python regex for matching samples
pattern = r"^(IMM|INGS|NGS|[A-Z0-9]+)(-[0-9]+-[0-9]+)?_barcode\d+$"
The regex does the following:
^(IMM|INGS|NGS|[A-Z0-9]+)
allows for files strating with the prefixes IMM, INGS, NGS, or any combination of lettersA-to-Z
and digits0-to-9
.(-[0-9]+-[0-9]+)?
handles optional segments of digits separated by a dash(-)._barcode\d+$
ensures the filename ends with_barcode followed by digits to denote barcode numbers.
There is a file handling logic in the code filename.split("_")
that assumes the barcode is always the last part of the filename.
The names are split into basename
and barcode
which are then used in later reporting.
Please Adjust this if necessary based on actual filename structure in your assays.
Here are a few examples of acceptable input file names:
NGSPOS_barcode13.fastq
NGSNEG_barcode12.fastq
INGSPOS_barcode01.fastq
INGSNEG_barcode96.fastq
BTGSPOS_barcode19.fastq
2025705_barcode14.fastq
IMM-45-44874_barcode25.fastq
Sample1-2024-12345_barcode22.fastq
Platform compatibility
This pipeline was originally developed to process amplicon sequencing data from Oxford Nanopore Technologies platforms where multiple samples are expected to be barcoded. The pipeline has been extensively validated using Oxford Nanopore MinION data targeting ABO exons 6 and 7, which are the primary regions containing clinically relevant polymorphisms for ABO blood group determination.
While we recommend using the above naming convention for optimal compatibility, the pipeline can also handle FASTQ files from other sequencing platforms including:
- PacBio (currently undergoing testing)
- Ion Torrent (currently undergoing testing)
- Illumina (currently undergoing testing)
The pipeline will attempt to extract the sample name and barcode from the filenames using standard genomic sequence naming conventions, but will fall back to a default barcode00 if filenames lack the expected barcode format. For non-Nanopore platforms, ensure your FASTQ files contain reads spanning the ABO exon 6 and exon 7 regions for accurate genotyping.
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.
To run this pipeline, use:
nextflow run nf-core/abotyper \
-resume \
-profile "<conda/docker/singularity>" \
--input samplesheet.csv \
--outdir "$PWD/OUTDIR"
Once improved, other workload managers and containerisation environments could be used in a similar manner:
nextflow nf-core/abotyper \
-resume \
-profile <docker/singularity/.../institute> \
--input samplesheet.csv \
--outdir <OUTDIR>
Renaming samples
The code by permits renaming of samples using a tab-delimited file with sequencingID
and sampleName
(see nextflow.config
file under $params.renaming_file
).
This option is controlled by the parameter $params.skip_renaming
and can be overridden via the commandline using option --skip_renaming true
to skip the process.
Output
For each sample and each of exon6 and exon7, the pipeline will generate BAM
files, BAM metrics
, and PILEUP
results.
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
│ │ ├── exon6
│ │ │ ├── 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.log.txt
│ │ │ └── mpileup
│ │ │ └── SAMPLE1_barcode01.mpileup.gz
│ │ └── exon7
│ │ ├── 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.log.txt
│ │ └── mpileup
│ │ └── SAMPLE1_barcode01.mpileup.gz
├── 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.
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
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).
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.