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β βββ 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
- Alignment and alignment statistics β minimap2 alignment to the ABO reference, with samtools coverage, flagstat and stats
- Variant calling and evidence β Clair3 calls and phasing, the BAM pileup, and both converted into per-position evidence
- ABO typing β Per-sample phenotype prediction and the runβs result tables (abotyper-core)
- 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. A sample with no reads (for example a clean negative control) has no NanoPlot report; it is still typed.
Alignment and alignment statistics
Output files
per_sample_processing/<sample>/alignment/<sample>.bamand<sample>.bam.bai: reads aligned to NG_006669.2 with minimap2, and their index.<sample>.coverage.txt: samtools coverage of the ABO reference (reads, covered bases, mean depth).<sample>.flagstat: samtools flagstat summary (total, mapped, secondary and supplementary reads).<sample>.stats: samtools stats (read lengths, mapping and base qualities, error rates).
minimap2 aligns the Nanopore reads to the single combined ABO reference (--minimap2_preset, map-ont by default). The samtools coverage, flagstat and stats files feed the read and depth metrics of the Typing sheet and the MultiQC report.
Variant calling and evidence
Output files
per_sample_processing/<sample>/clair3/<sample>_clair3.merge_output.vcf.gz: Clair3βs PASS-filtered small-variant calls.<sample>_clair3.merge_output.gvcf.gz: Clair3βs gVCF, including non-variant reference blocks.<sample>_clair3.phased_merge_output.vcf.gz: Clair3βs phased small-variant calls (GT and PS tags).<sample>_norm.vcf.gz: the Clair3 calls normalised with bcftools norm.<sample>.panel.vcf.gzand<sample>.panel.tsv: the normalised calls restricted to the ABO panel positions, and a flat table of the same, for manual review.- Each
.vcf.gzhas a.tbiindex.
per_sample_processing/<sample>/clair2metrics/<sample>.AlignmentStatistics.tsv: per-position nucleotide frequencies and depth, from Clair3, with positions Clair3 had no evidence for filled from the BAM pileup.<sample>.Haplotypes.tsv: haplotype table built from Clair3βs phased calls (phase-set allele depths, not per-read observations).<sample>.pileup_metrics.tsv: the same per-position table from the BAM pileup alone.<sample>.concordance.tsv: Clair3 and the BAM pileup compared at every panel position.<sample>.evidence_status.tsv: the evidence source of the sample (Clair3 and BAM, Clair3 only, BAM only or none) and the number of positions that disagree.
Clair3 (--gvcf --enable_phasing, restricted to the ABO exon 2-7 region) calls small variants from the aligned BAM. abotyper-clair2metrics and abotyper-clair2haplotypes (modules ABOTYPERCORE_CLAIR2METRICS and ABOTYPERCORE_CLAIR2HAPLOTYPES) convert its gVCF and phased VCF into per-position frequencies and a haplotype table. An independent pileup of the BAM (nf-core samtools/mpileup) is the second line of evidence: abotyper-pileup2metrics (ABOTYPERCORE_PILEUP2METRICS) combines the two, fills positions Clair3 had no evidence for, and records where they disagree.
ABO typing
Output files
per_sample_processing/<sample>/<sample>.ABOPhenotype.txt: the sampleβs per-position calls and its predicted phenotype, genotype and allele names (abotyper-predict-phenotype,ABOTYPERCORE_PREDICTPHENOTYPE).<sample>.log.txt: the log of that step.
- The output directory itself (
abotyper-aggregate,ABOTYPERCORE_AGGREGATE):ABO_result.xlsx: theTyping,VariantsandAboutsheets described above.ABO_result.txt: one row per sample with the full per-position counts and the QC notes.final_export.csv: the typing results for laboratory information systems.ABO_run_qc.txt: run-level QC summary.ABO_evidence_summary_mqc.tsv: per-sample evidence summary, also shown in the MultiQC report.ABO_results.log: the log of the aggregation.
The typing steps come from the abotyper-core package. They score the panel positions against the panelβs thresholds, resolve phenotype, genotype and ISBT-style allele names (per haplotype when the Clair3 phasing is clean), and add the depth, evidence, control and replicate checks that decide each sampleβs QC status (PASS or REVIEW).
MultiQC
Output files
qc_and_preprocessing/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 and samtools, 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_<date>.html,execution_timeline_<date>.html,execution_trace_<date>.txtandpipeline_dag_<date>.html. - Software versions of every step:
abotyper_software_mqc_versions.yml. - Parameters used by the pipeline run:
params_<date>.json. - The panel positions as a BED file:
abo_variant_panel.bed.
- 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.