abotyper-core 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- abotyper_core-0.1.0/.gitignore +12 -0
- abotyper_core-0.1.0/CHANGELOG.md +19 -0
- abotyper_core-0.1.0/LICENSE +22 -0
- abotyper_core-0.1.0/PKG-INFO +133 -0
- abotyper_core-0.1.0/README.md +105 -0
- abotyper_core-0.1.0/pyproject.toml +75 -0
- abotyper_core-0.1.0/src/abotyper_core/__init__.py +14 -0
- abotyper_core-0.1.0/src/abotyper_core/aggregate.py +1029 -0
- abotyper_core-0.1.0/src/abotyper_core/calibrate_panel.py +525 -0
- abotyper_core-0.1.0/src/abotyper_core/calling.py +971 -0
- abotyper_core-0.1.0/src/abotyper_core/clair2haplotypes.py +269 -0
- abotyper_core-0.1.0/src/abotyper_core/clair2metrics.py +356 -0
- abotyper_core-0.1.0/src/abotyper_core/data/abo_isbt_v9_coverage.tsv +152 -0
- abotyper_core-0.1.0/src/abotyper_core/data/abo_variant_panel.csv +228 -0
- abotyper_core-0.1.0/src/abotyper_core/data/abo_variant_panel.yaml +3178 -0
- abotyper_core-0.1.0/src/abotyper_core/data/isbt_abo_alleles.tsv +209 -0
- abotyper_core-0.1.0/src/abotyper_core/inputs.py +245 -0
- abotyper_core-0.1.0/src/abotyper_core/isbt.py +380 -0
- abotyper_core-0.1.0/src/abotyper_core/naming.py +181 -0
- abotyper_core-0.1.0/src/abotyper_core/panel.py +670 -0
- abotyper_core-0.1.0/src/abotyper_core/panel_to_bed.py +108 -0
- abotyper_core-0.1.0/src/abotyper_core/phase.py +133 -0
- abotyper_core-0.1.0/src/abotyper_core/pileup2metrics.py +351 -0
- abotyper_core-0.1.0/src/abotyper_core/predict_phenotype.py +527 -0
- abotyper_core-0.1.0/src/abotyper_core/rename_samples.py +416 -0
- abotyper_core-0.1.0/src/abotyper_core/report.py +638 -0
- abotyper_core-0.1.0/tests/conftest.py +98 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_AA_barcode01/ABO_AA_barcode01.coverage.txt +2 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_AA_barcode01/ABO_AA_barcode01.flagstat +16 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_AA_barcode01/ABO_AA_barcode01.pileup.txt +196 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_AA_barcode01/ABO_AA_barcode01.stats +62 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_AA_barcode01/ABO_AA_barcode01_clair3.merge_output.gvcf.gz +0 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_AA_barcode01/ABO_AA_barcode01_clair3.phased_merge_output.vcf.gz +0 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_AB_barcode02/ABO_AB_barcode02.coverage.txt +2 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_AB_barcode02/ABO_AB_barcode02.flagstat +16 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_AB_barcode02/ABO_AB_barcode02.pileup.txt +196 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_AB_barcode02/ABO_AB_barcode02.stats +75 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_AB_barcode02/ABO_AB_barcode02_clair3.merge_output.gvcf.gz +0 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_AB_barcode02/ABO_AB_barcode02_clair3.phased_merge_output.vcf.gz +0 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_AO1_barcode03/ABO_AO1_barcode03.coverage.txt +2 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_AO1_barcode03/ABO_AO1_barcode03.flagstat +16 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_AO1_barcode03/ABO_AO1_barcode03.pileup.txt +196 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_AO1_barcode03/ABO_AO1_barcode03.stats +61 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_AO1_barcode03/ABO_AO1_barcode03_clair3.merge_output.gvcf.gz +0 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_AO1_barcode03/ABO_AO1_barcode03_clair3.phased_merge_output.vcf.gz +0 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_AO2_barcode04/ABO_AO2_barcode04.coverage.txt +2 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_AO2_barcode04/ABO_AO2_barcode04.flagstat +16 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_AO2_barcode04/ABO_AO2_barcode04.pileup.txt +196 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_AO2_barcode04/ABO_AO2_barcode04.stats +65 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_AO2_barcode04/ABO_AO2_barcode04_clair3.merge_output.gvcf.gz +0 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_AO2_barcode04/ABO_AO2_barcode04_clair3.phased_merge_output.vcf.gz +0 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_BB_barcode05/ABO_BB_barcode05.coverage.txt +2 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_BB_barcode05/ABO_BB_barcode05.flagstat +16 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_BB_barcode05/ABO_BB_barcode05.pileup.txt +196 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_BB_barcode05/ABO_BB_barcode05.stats +58 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_BB_barcode05/ABO_BB_barcode05_clair3.merge_output.gvcf.gz +0 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_BB_barcode05/ABO_BB_barcode05_clair3.phased_merge_output.vcf.gz +0 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_BO1_barcode06/ABO_BO1_barcode06.coverage.txt +2 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_BO1_barcode06/ABO_BO1_barcode06.flagstat +16 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_BO1_barcode06/ABO_BO1_barcode06.pileup.txt +196 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_BO1_barcode06/ABO_BO1_barcode06.stats +57 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_BO1_barcode06/ABO_BO1_barcode06_clair3.merge_output.gvcf.gz +0 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_BO1_barcode06/ABO_BO1_barcode06_clair3.phased_merge_output.vcf.gz +0 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_BO2_barcode07/ABO_BO2_barcode07.coverage.txt +2 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_BO2_barcode07/ABO_BO2_barcode07.flagstat +16 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_BO2_barcode07/ABO_BO2_barcode07.pileup.txt +196 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_BO2_barcode07/ABO_BO2_barcode07.stats +59 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_BO2_barcode07/ABO_BO2_barcode07_clair3.merge_output.gvcf.gz +0 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_BO2_barcode07/ABO_BO2_barcode07_clair3.phased_merge_output.vcf.gz +0 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_O1O1_barcode08/ABO_O1O1_barcode08.coverage.txt +2 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_O1O1_barcode08/ABO_O1O1_barcode08.flagstat +16 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_O1O1_barcode08/ABO_O1O1_barcode08.pileup.txt +196 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_O1O1_barcode08/ABO_O1O1_barcode08.stats +56 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_O1O1_barcode08/ABO_O1O1_barcode08_clair3.merge_output.gvcf.gz +0 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_O1O1_barcode08/ABO_O1O1_barcode08_clair3.phased_merge_output.vcf.gz +0 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_O1O2_barcode09/ABO_O1O2_barcode09.coverage.txt +2 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_O1O2_barcode09/ABO_O1O2_barcode09.flagstat +16 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_O1O2_barcode09/ABO_O1O2_barcode09.pileup.txt +196 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_O1O2_barcode09/ABO_O1O2_barcode09.stats +59 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_O1O2_barcode09/ABO_O1O2_barcode09_clair3.merge_output.gvcf.gz +0 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_O1O2_barcode09/ABO_O1O2_barcode09_clair3.phased_merge_output.vcf.gz +0 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_O2O2_barcode10/ABO_O2O2_barcode10.coverage.txt +2 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_O2O2_barcode10/ABO_O2O2_barcode10.flagstat +16 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_O2O2_barcode10/ABO_O2O2_barcode10.pileup.txt +196 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_O2O2_barcode10/ABO_O2O2_barcode10.stats +80 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_O2O2_barcode10/ABO_O2O2_barcode10_clair3.merge_output.gvcf.gz +0 -0
- abotyper_core-0.1.0/tests/fixtures/ABO_O2O2_barcode10/ABO_O2O2_barcode10_clair3.phased_merge_output.vcf.gz +0 -0
- abotyper_core-0.1.0/tests/golden/ABO_AA_barcode01/ABO_AA_barcode01.ABOPhenotype.txt +1070 -0
- abotyper_core-0.1.0/tests/golden/ABO_AA_barcode01/ABO_AA_barcode01.AlignmentStatistics.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_AA_barcode01/ABO_AA_barcode01.Haplotypes.tsv +70 -0
- abotyper_core-0.1.0/tests/golden/ABO_AA_barcode01/ABO_AA_barcode01.clair.AlignmentStatistics.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_AA_barcode01/ABO_AA_barcode01.concordance.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_AA_barcode01/ABO_AA_barcode01.evidence_status.tsv +2 -0
- abotyper_core-0.1.0/tests/golden/ABO_AA_barcode01/ABO_AA_barcode01.pileup_metrics.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_AB_barcode02/ABO_AB_barcode02.ABOPhenotype.txt +1070 -0
- abotyper_core-0.1.0/tests/golden/ABO_AB_barcode02/ABO_AB_barcode02.AlignmentStatistics.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_AB_barcode02/ABO_AB_barcode02.Haplotypes.tsv +179 -0
- abotyper_core-0.1.0/tests/golden/ABO_AB_barcode02/ABO_AB_barcode02.clair.AlignmentStatistics.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_AB_barcode02/ABO_AB_barcode02.concordance.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_AB_barcode02/ABO_AB_barcode02.evidence_status.tsv +2 -0
- abotyper_core-0.1.0/tests/golden/ABO_AB_barcode02/ABO_AB_barcode02.pileup_metrics.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_AO1_barcode03/ABO_AO1_barcode03.ABOPhenotype.txt +1070 -0
- abotyper_core-0.1.0/tests/golden/ABO_AO1_barcode03/ABO_AO1_barcode03.AlignmentStatistics.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_AO1_barcode03/ABO_AO1_barcode03.Haplotypes.tsv +87 -0
- abotyper_core-0.1.0/tests/golden/ABO_AO1_barcode03/ABO_AO1_barcode03.clair.AlignmentStatistics.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_AO1_barcode03/ABO_AO1_barcode03.concordance.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_AO1_barcode03/ABO_AO1_barcode03.evidence_status.tsv +2 -0
- abotyper_core-0.1.0/tests/golden/ABO_AO1_barcode03/ABO_AO1_barcode03.pileup_metrics.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_AO2_barcode04/ABO_AO2_barcode04.ABOPhenotype.txt +1070 -0
- abotyper_core-0.1.0/tests/golden/ABO_AO2_barcode04/ABO_AO2_barcode04.AlignmentStatistics.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_AO2_barcode04/ABO_AO2_barcode04.Haplotypes.tsv +75 -0
- abotyper_core-0.1.0/tests/golden/ABO_AO2_barcode04/ABO_AO2_barcode04.clair.AlignmentStatistics.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_AO2_barcode04/ABO_AO2_barcode04.concordance.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_AO2_barcode04/ABO_AO2_barcode04.evidence_status.tsv +2 -0
- abotyper_core-0.1.0/tests/golden/ABO_AO2_barcode04/ABO_AO2_barcode04.pileup_metrics.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_BB_barcode05/ABO_BB_barcode05.ABOPhenotype.txt +1070 -0
- abotyper_core-0.1.0/tests/golden/ABO_BB_barcode05/ABO_BB_barcode05.AlignmentStatistics.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_BB_barcode05/ABO_BB_barcode05.Haplotypes.tsv +1 -0
- abotyper_core-0.1.0/tests/golden/ABO_BB_barcode05/ABO_BB_barcode05.clair.AlignmentStatistics.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_BB_barcode05/ABO_BB_barcode05.concordance.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_BB_barcode05/ABO_BB_barcode05.evidence_status.tsv +2 -0
- abotyper_core-0.1.0/tests/golden/ABO_BB_barcode05/ABO_BB_barcode05.pileup_metrics.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_BO1_barcode06/ABO_BO1_barcode06.ABOPhenotype.txt +1070 -0
- abotyper_core-0.1.0/tests/golden/ABO_BO1_barcode06/ABO_BO1_barcode06.AlignmentStatistics.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_BO1_barcode06/ABO_BO1_barcode06.Haplotypes.tsv +89 -0
- abotyper_core-0.1.0/tests/golden/ABO_BO1_barcode06/ABO_BO1_barcode06.clair.AlignmentStatistics.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_BO1_barcode06/ABO_BO1_barcode06.concordance.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_BO1_barcode06/ABO_BO1_barcode06.evidence_status.tsv +2 -0
- abotyper_core-0.1.0/tests/golden/ABO_BO1_barcode06/ABO_BO1_barcode06.pileup_metrics.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_BO2_barcode07/ABO_BO2_barcode07.ABOPhenotype.txt +1070 -0
- abotyper_core-0.1.0/tests/golden/ABO_BO2_barcode07/ABO_BO2_barcode07.AlignmentStatistics.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_BO2_barcode07/ABO_BO2_barcode07.Haplotypes.tsv +70 -0
- abotyper_core-0.1.0/tests/golden/ABO_BO2_barcode07/ABO_BO2_barcode07.clair.AlignmentStatistics.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_BO2_barcode07/ABO_BO2_barcode07.concordance.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_BO2_barcode07/ABO_BO2_barcode07.evidence_status.tsv +2 -0
- abotyper_core-0.1.0/tests/golden/ABO_BO2_barcode07/ABO_BO2_barcode07.pileup_metrics.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_O1O1_barcode08/ABO_O1O1_barcode08.ABOPhenotype.txt +1070 -0
- abotyper_core-0.1.0/tests/golden/ABO_O1O1_barcode08/ABO_O1O1_barcode08.AlignmentStatistics.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_O1O1_barcode08/ABO_O1O1_barcode08.Haplotypes.tsv +1 -0
- abotyper_core-0.1.0/tests/golden/ABO_O1O1_barcode08/ABO_O1O1_barcode08.clair.AlignmentStatistics.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_O1O1_barcode08/ABO_O1O1_barcode08.concordance.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_O1O1_barcode08/ABO_O1O1_barcode08.evidence_status.tsv +2 -0
- abotyper_core-0.1.0/tests/golden/ABO_O1O1_barcode08/ABO_O1O1_barcode08.pileup_metrics.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_O1O2_barcode09/ABO_O1O2_barcode09.ABOPhenotype.txt +1070 -0
- abotyper_core-0.1.0/tests/golden/ABO_O1O2_barcode09/ABO_O1O2_barcode09.AlignmentStatistics.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_O1O2_barcode09/ABO_O1O2_barcode09.Haplotypes.tsv +68 -0
- abotyper_core-0.1.0/tests/golden/ABO_O1O2_barcode09/ABO_O1O2_barcode09.clair.AlignmentStatistics.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_O1O2_barcode09/ABO_O1O2_barcode09.concordance.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_O1O2_barcode09/ABO_O1O2_barcode09.evidence_status.tsv +2 -0
- abotyper_core-0.1.0/tests/golden/ABO_O1O2_barcode09/ABO_O1O2_barcode09.pileup_metrics.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_O2O2_barcode10/ABO_O2O2_barcode10.ABOPhenotype.txt +1070 -0
- abotyper_core-0.1.0/tests/golden/ABO_O2O2_barcode10/ABO_O2O2_barcode10.AlignmentStatistics.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_O2O2_barcode10/ABO_O2O2_barcode10.Haplotypes.tsv +31 -0
- abotyper_core-0.1.0/tests/golden/ABO_O2O2_barcode10/ABO_O2O2_barcode10.clair.AlignmentStatistics.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_O2O2_barcode10/ABO_O2O2_barcode10.concordance.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/ABO_O2O2_barcode10/ABO_O2O2_barcode10.evidence_status.tsv +2 -0
- abotyper_core-0.1.0/tests/golden/ABO_O2O2_barcode10/ABO_O2O2_barcode10.pileup_metrics.tsv +136 -0
- abotyper_core-0.1.0/tests/golden/abo_variant_panel.bed +135 -0
- abotyper_core-0.1.0/tests/golden/aggregate/ABO_evidence_summary_mqc.tsv +15 -0
- abotyper_core-0.1.0/tests/golden/aggregate/ABO_result.txt +12 -0
- abotyper_core-0.1.0/tests/golden/aggregate/ABO_result.xlsx.tsv +35 -0
- abotyper_core-0.1.0/tests/golden/aggregate/ABO_run_qc.txt +22 -0
- abotyper_core-0.1.0/tests/golden/aggregate/final_export.csv +11 -0
- abotyper_core-0.1.0/tests/requirements-pinned.txt +8 -0
- abotyper_core-0.1.0/tests/test_failures.py +20 -0
- abotyper_core-0.1.0/tests/test_genotype_table.py +143 -0
- abotyper_core-0.1.0/tests/test_golden.py +36 -0
- abotyper_core-0.1.0/tests/test_isbt.py +133 -0
- abotyper_core-0.1.0/tests/test_panel_settings.py +51 -0
- abotyper_core-0.1.0/tests/test_units.py +120 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0 (2026-11-12)
|
|
4
|
+
|
|
5
|
+
First release. The typing logic of nf-core/abotyper (refactor branch, `bin/` scripts) as an installable package.
|
|
6
|
+
|
|
7
|
+
- Modules: `panel`, `naming`, `inputs`, `phase`, `calling`, `report`, `aggregate`, `panel_to_bed`,
|
|
8
|
+
`clair2metrics`, `clair2haplotypes`, `pileup2metrics`, `predict_phenotype`, `calibrate_panel`,
|
|
9
|
+
`rename_samples`.
|
|
10
|
+
- Commands `abotyper-*` for each step, plus the pipeline's script names (`abo_panel.py`,
|
|
11
|
+
`predict_abo_phenotype.py`, ...) as aliases.
|
|
12
|
+
- The ABO variant panel (v2.3.0, YAML and CSV) and the ISBT coverage table ship with the package; `--panel`
|
|
13
|
+
defaults to the bundled panel.
|
|
14
|
+
- `abotyper-panel --check-isbt` compares the panel with the ISBT blood group allele database
|
|
15
|
+
(blooddatabase.isbtweb.org) and lists suggested updates: new DNA changes, new, changed or retired alleles, and
|
|
16
|
+
panel rows no current allele carries. It also reads the site's EXPORT file (`--isbt-source abo.xlsx`). The
|
|
17
|
+
baseline it diffs alleles against is the bundled snapshot of ISBT release 21 (2026-11-01).
|
|
18
|
+
- A monthly workflow runs the check and opens an issue when it has suggestions.
|
|
19
|
+
- Golden tests: per-sample and aggregated outputs are byte-identical to the pipeline's `bin/` scripts.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Fredrick M. Mobegi
|
|
4
|
+
Copyright (c) The nf-core/abotyper team
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: abotyper-core
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: ABO blood group typing logic from long-read amplicon data, as used by nf-core/abotyper
|
|
5
|
+
Project-URL: Homepage, https://github.com/fmobegi/abotyper-core
|
|
6
|
+
Project-URL: Pipeline, https://github.com/nf-core/abotyper
|
|
7
|
+
Project-URL: Publication, https://pubmed.ncbi.nlm.nih.gov/40564908/
|
|
8
|
+
Author: Fredrick M. Mobegi
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: ABO,ISBT,bioinformatics,blood group,genotyping,nanopore
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
17
|
+
Requires-Python: >=3.11
|
|
18
|
+
Requires-Dist: numpy>=1.26
|
|
19
|
+
Requires-Dist: openpyxl>=3.1
|
|
20
|
+
Requires-Dist: pandas>=2.2
|
|
21
|
+
Requires-Dist: pyyaml>=6.0
|
|
22
|
+
Requires-Dist: xlsxwriter>=3.1
|
|
23
|
+
Provides-Extra: test
|
|
24
|
+
Requires-Dist: openpyxl>=3.1; extra == 'test'
|
|
25
|
+
Requires-Dist: pytest>=8; extra == 'test'
|
|
26
|
+
Requires-Dist: ruff>=0.14; extra == 'test'
|
|
27
|
+
Description-Content-Type: text/markdown
|
|
28
|
+
|
|
29
|
+
# abotyper-core
|
|
30
|
+
|
|
31
|
+
A Python package to assign ABO genotypes and alleles from variant calls using the ISBT database panel.
|
|
32
|
+
|
|
33
|
+
The ABO blood group typing logic from [nf-core/abotyper](https://github.com/nf-core/abotyper), packaged as a Python
|
|
34
|
+
library and a set of command-line tools.
|
|
35
|
+
|
|
36
|
+
It loads and validates the ABO variant panel, turns Clair3 calls and BAM pileups into per-position evidence,
|
|
37
|
+
resolves phenotype, genotype and ISBT allele names, and writes the per-sample and aggregated result tables.
|
|
38
|
+
|
|
39
|
+
> **Research use only.** Not validated for clinical diagnosis or transfusion decisions.
|
|
40
|
+
|
|
41
|
+
## Install
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pip install abotyper-core # PyPI
|
|
45
|
+
conda install -c conda-forge -c bioconda abotyper-core # Bioconda
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Containers: `quay.io/biocontainers/abotyper-core` (BioContainers, built from the Bioconda package).
|
|
49
|
+
|
|
50
|
+
Python 3.11 or newer. Dependencies: pandas, numpy, pyyaml, xlsxwriter and openpyxl.
|
|
51
|
+
|
|
52
|
+
## Commands
|
|
53
|
+
|
|
54
|
+
| Command | What it does |
|
|
55
|
+
| --- | --- |
|
|
56
|
+
| `abotyper-panel` | Validate and summarise a variant panel; `--check-isbt` compares it with the ISBT allele table |
|
|
57
|
+
| `abotyper-panel-to-bed` | BED of panel positions for Clair3 `--bed_fn` and `bcftools view -R` |
|
|
58
|
+
| `abotyper-clair2metrics` | Per-position metrics from Clair3 VCFs |
|
|
59
|
+
| `abotyper-clair2haplotypes` | Phased haplotypes from Clair3 VCFs |
|
|
60
|
+
| `abotyper-pileup2metrics` | Per-position metrics from BAM pileups |
|
|
61
|
+
| `abotyper-predict-phenotype` | Phenotype, genotype and ISBT allele calls per sample |
|
|
62
|
+
| `abotyper-aggregate` | Aggregate per-sample results into the final report (xlsx, csv) |
|
|
63
|
+
| `abotyper-calibrate-panel` | Fill amplicon coordinates into a panel from a reference |
|
|
64
|
+
| `abotyper-rename-samples` | Rename samples from a mapping sheet |
|
|
65
|
+
|
|
66
|
+
Each command takes `--help`. Commands that read the panel default to the bundled
|
|
67
|
+
`abotyper_core/data/abo_variant_panel.yaml`; pass `--panel` to use another one.
|
|
68
|
+
|
|
69
|
+
### Checking the panel against ISBT
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
abotyper-panel --check-isbt # fetch the live ISBT ABO allele table
|
|
73
|
+
abotyper-panel --isbt-source ABO_allele_table.xlsx # or the file the site's EXPORT button downloads
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
The check reads the ABO alleles from the [ISBT blood group allele database](https://blooddatabase.isbtweb.org/system/ABO)
|
|
77
|
+
and compares them with the panel and its coverage table (`abo_isbt_v9_coverage.tsv`, which records how the panel
|
|
78
|
+
handles every ISBT DNA change). It lists suggestions; it never edits the panel:
|
|
79
|
+
|
|
80
|
+
| Kind | Meaning |
|
|
81
|
+
| --- | --- |
|
|
82
|
+
| `new_change` | a DNA change in a current allele that neither the panel nor the coverage table knows (exon 1 changes are flagged as assay gaps) |
|
|
83
|
+
| `new_allele` | an allele not in the baseline snapshot, and whether its changes are already handled |
|
|
84
|
+
| `changed_allele` | an allele whose changes or phenotype differ from the baseline |
|
|
85
|
+
| `retired_allele` | a baseline allele that is gone or marked obsolete |
|
|
86
|
+
| `panel_change_not_in_isbt` | a panel row whose change no current allele carries |
|
|
87
|
+
| `release` | the ISBT release differs from the one the panel was last checked against |
|
|
88
|
+
|
|
89
|
+
Alleles are compared with a baseline snapshot, by default the bundled `isbt_abo_alleles.tsv` (ISBT release 21,
|
|
90
|
+
2026-11-01). After reviewing and updating the panel, save a new baseline with `--isbt-snapshot`. Use
|
|
91
|
+
`--isbt-report` to write the suggestions as a TSV and `--fail-on-changes` (exit status 3) in scheduled jobs; the
|
|
92
|
+
repository's monthly `ISBT check` workflow opens an issue when there is something to review.
|
|
93
|
+
|
|
94
|
+
The ISBT site has no documented allele API: the check reads the allele records the ABO page embeds, and fails
|
|
95
|
+
with a clear message if the page layout changes. `--isbt-source` with an export file always works.
|
|
96
|
+
|
|
97
|
+
### Legacy names
|
|
98
|
+
|
|
99
|
+
The package also installs the script names the pipeline's modules call today (`abo_panel.py`, `panel_to_bed.py`,
|
|
100
|
+
`clair2metrics.py`, `clair2haplotypes.py`, `pileup2metrics.py`, `predict_abo_phenotype.py`,
|
|
101
|
+
`aggregate_abo_reports.py`), so the pipeline can switch from its `bin/` scripts to this package without changing
|
|
102
|
+
module scripts.
|
|
103
|
+
|
|
104
|
+
## Library use
|
|
105
|
+
|
|
106
|
+
```python
|
|
107
|
+
from abotyper_core import load_panel, default_panel_path
|
|
108
|
+
|
|
109
|
+
panel = load_panel(default_panel_path())
|
|
110
|
+
for marker in panel.calibrated():
|
|
111
|
+
print(marker.id, marker.resolved_position())
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Development
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
pip install -e ".[test]"
|
|
118
|
+
ruff check src tests
|
|
119
|
+
pytest
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
The golden tests run every step on ten fixture samples and compare the outputs byte for byte (xlsx cell by cell)
|
|
123
|
+
with `tests/golden/`. After an intended output change, regenerate them with `UPDATE_GOLDEN=1 pytest` and review the
|
|
124
|
+
diff. `tests/requirements-pinned.txt` lists the versions the golden files were made with.
|
|
125
|
+
|
|
126
|
+
## Citation
|
|
127
|
+
|
|
128
|
+
If you use this package, please cite [nf-core/abotyper](https://github.com/nf-core/abotyper) and its publication:
|
|
129
|
+
[PubMed 40564908](https://pubmed.ncbi.nlm.nih.gov/40564908/).
|
|
130
|
+
|
|
131
|
+
## Licence
|
|
132
|
+
|
|
133
|
+
MIT. See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# abotyper-core
|
|
2
|
+
|
|
3
|
+
A Python package to assign ABO genotypes and alleles from variant calls using the ISBT database panel.
|
|
4
|
+
|
|
5
|
+
The ABO blood group typing logic from [nf-core/abotyper](https://github.com/nf-core/abotyper), packaged as a Python
|
|
6
|
+
library and a set of command-line tools.
|
|
7
|
+
|
|
8
|
+
It loads and validates the ABO variant panel, turns Clair3 calls and BAM pileups into per-position evidence,
|
|
9
|
+
resolves phenotype, genotype and ISBT allele names, and writes the per-sample and aggregated result tables.
|
|
10
|
+
|
|
11
|
+
> **Research use only.** Not validated for clinical diagnosis or transfusion decisions.
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pip install abotyper-core # PyPI
|
|
17
|
+
conda install -c conda-forge -c bioconda abotyper-core # Bioconda
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Containers: `quay.io/biocontainers/abotyper-core` (BioContainers, built from the Bioconda package).
|
|
21
|
+
|
|
22
|
+
Python 3.11 or newer. Dependencies: pandas, numpy, pyyaml, xlsxwriter and openpyxl.
|
|
23
|
+
|
|
24
|
+
## Commands
|
|
25
|
+
|
|
26
|
+
| Command | What it does |
|
|
27
|
+
| --- | --- |
|
|
28
|
+
| `abotyper-panel` | Validate and summarise a variant panel; `--check-isbt` compares it with the ISBT allele table |
|
|
29
|
+
| `abotyper-panel-to-bed` | BED of panel positions for Clair3 `--bed_fn` and `bcftools view -R` |
|
|
30
|
+
| `abotyper-clair2metrics` | Per-position metrics from Clair3 VCFs |
|
|
31
|
+
| `abotyper-clair2haplotypes` | Phased haplotypes from Clair3 VCFs |
|
|
32
|
+
| `abotyper-pileup2metrics` | Per-position metrics from BAM pileups |
|
|
33
|
+
| `abotyper-predict-phenotype` | Phenotype, genotype and ISBT allele calls per sample |
|
|
34
|
+
| `abotyper-aggregate` | Aggregate per-sample results into the final report (xlsx, csv) |
|
|
35
|
+
| `abotyper-calibrate-panel` | Fill amplicon coordinates into a panel from a reference |
|
|
36
|
+
| `abotyper-rename-samples` | Rename samples from a mapping sheet |
|
|
37
|
+
|
|
38
|
+
Each command takes `--help`. Commands that read the panel default to the bundled
|
|
39
|
+
`abotyper_core/data/abo_variant_panel.yaml`; pass `--panel` to use another one.
|
|
40
|
+
|
|
41
|
+
### Checking the panel against ISBT
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
abotyper-panel --check-isbt # fetch the live ISBT ABO allele table
|
|
45
|
+
abotyper-panel --isbt-source ABO_allele_table.xlsx # or the file the site's EXPORT button downloads
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
The check reads the ABO alleles from the [ISBT blood group allele database](https://blooddatabase.isbtweb.org/system/ABO)
|
|
49
|
+
and compares them with the panel and its coverage table (`abo_isbt_v9_coverage.tsv`, which records how the panel
|
|
50
|
+
handles every ISBT DNA change). It lists suggestions; it never edits the panel:
|
|
51
|
+
|
|
52
|
+
| Kind | Meaning |
|
|
53
|
+
| --- | --- |
|
|
54
|
+
| `new_change` | a DNA change in a current allele that neither the panel nor the coverage table knows (exon 1 changes are flagged as assay gaps) |
|
|
55
|
+
| `new_allele` | an allele not in the baseline snapshot, and whether its changes are already handled |
|
|
56
|
+
| `changed_allele` | an allele whose changes or phenotype differ from the baseline |
|
|
57
|
+
| `retired_allele` | a baseline allele that is gone or marked obsolete |
|
|
58
|
+
| `panel_change_not_in_isbt` | a panel row whose change no current allele carries |
|
|
59
|
+
| `release` | the ISBT release differs from the one the panel was last checked against |
|
|
60
|
+
|
|
61
|
+
Alleles are compared with a baseline snapshot, by default the bundled `isbt_abo_alleles.tsv` (ISBT release 21,
|
|
62
|
+
2026-11-01). After reviewing and updating the panel, save a new baseline with `--isbt-snapshot`. Use
|
|
63
|
+
`--isbt-report` to write the suggestions as a TSV and `--fail-on-changes` (exit status 3) in scheduled jobs; the
|
|
64
|
+
repository's monthly `ISBT check` workflow opens an issue when there is something to review.
|
|
65
|
+
|
|
66
|
+
The ISBT site has no documented allele API: the check reads the allele records the ABO page embeds, and fails
|
|
67
|
+
with a clear message if the page layout changes. `--isbt-source` with an export file always works.
|
|
68
|
+
|
|
69
|
+
### Legacy names
|
|
70
|
+
|
|
71
|
+
The package also installs the script names the pipeline's modules call today (`abo_panel.py`, `panel_to_bed.py`,
|
|
72
|
+
`clair2metrics.py`, `clair2haplotypes.py`, `pileup2metrics.py`, `predict_abo_phenotype.py`,
|
|
73
|
+
`aggregate_abo_reports.py`), so the pipeline can switch from its `bin/` scripts to this package without changing
|
|
74
|
+
module scripts.
|
|
75
|
+
|
|
76
|
+
## Library use
|
|
77
|
+
|
|
78
|
+
```python
|
|
79
|
+
from abotyper_core import load_panel, default_panel_path
|
|
80
|
+
|
|
81
|
+
panel = load_panel(default_panel_path())
|
|
82
|
+
for marker in panel.calibrated():
|
|
83
|
+
print(marker.id, marker.resolved_position())
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Development
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
pip install -e ".[test]"
|
|
90
|
+
ruff check src tests
|
|
91
|
+
pytest
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
The golden tests run every step on ten fixture samples and compare the outputs byte for byte (xlsx cell by cell)
|
|
95
|
+
with `tests/golden/`. After an intended output change, regenerate them with `UPDATE_GOLDEN=1 pytest` and review the
|
|
96
|
+
diff. `tests/requirements-pinned.txt` lists the versions the golden files were made with.
|
|
97
|
+
|
|
98
|
+
## Citation
|
|
99
|
+
|
|
100
|
+
If you use this package, please cite [nf-core/abotyper](https://github.com/nf-core/abotyper) and its publication:
|
|
101
|
+
[PubMed 40564908](https://pubmed.ncbi.nlm.nih.gov/40564908/).
|
|
102
|
+
|
|
103
|
+
## Licence
|
|
104
|
+
|
|
105
|
+
MIT. See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling>=1.25"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "abotyper-core"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "ABO blood group typing logic from long-read amplicon data, as used by nf-core/abotyper"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "MIT"
|
|
11
|
+
license-files = ["LICENSE"]
|
|
12
|
+
requires-python = ">=3.11"
|
|
13
|
+
authors = [{ name = "Fredrick M. Mobegi" }]
|
|
14
|
+
keywords = ["ABO", "blood group", "genotyping", "ISBT", "nanopore", "bioinformatics"]
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Development Status :: 4 - Beta",
|
|
17
|
+
"Intended Audience :: Science/Research",
|
|
18
|
+
"Operating System :: OS Independent",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Topic :: Scientific/Engineering :: Bio-Informatics",
|
|
21
|
+
]
|
|
22
|
+
dependencies = [
|
|
23
|
+
"pandas>=2.2",
|
|
24
|
+
"numpy>=1.26",
|
|
25
|
+
"pyyaml>=6.0",
|
|
26
|
+
"xlsxwriter>=3.1",
|
|
27
|
+
"openpyxl>=3.1",
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
[project.optional-dependencies]
|
|
31
|
+
test = ["pytest>=8", "openpyxl>=3.1", "ruff>=0.14"]
|
|
32
|
+
|
|
33
|
+
[project.urls]
|
|
34
|
+
Homepage = "https://github.com/fmobegi/abotyper-core"
|
|
35
|
+
Pipeline = "https://github.com/nf-core/abotyper"
|
|
36
|
+
Publication = "https://pubmed.ncbi.nlm.nih.gov/40564908/"
|
|
37
|
+
|
|
38
|
+
[project.scripts]
|
|
39
|
+
# one command per pipeline step
|
|
40
|
+
abotyper-panel = "abotyper_core.panel:main"
|
|
41
|
+
abotyper-panel-to-bed = "abotyper_core.panel_to_bed:main"
|
|
42
|
+
abotyper-clair2metrics = "abotyper_core.clair2metrics:main"
|
|
43
|
+
abotyper-clair2haplotypes = "abotyper_core.clair2haplotypes:main"
|
|
44
|
+
abotyper-pileup2metrics = "abotyper_core.pileup2metrics:main"
|
|
45
|
+
abotyper-predict-phenotype = "abotyper_core.predict_phenotype:main"
|
|
46
|
+
abotyper-aggregate = "abotyper_core.aggregate:main"
|
|
47
|
+
abotyper-calibrate-panel = "abotyper_core.calibrate_panel:main"
|
|
48
|
+
abotyper-rename-samples = "abotyper_core.rename_samples:main"
|
|
49
|
+
# the script names nf-core/abotyper calls today, so its modules can switch to the package unchanged
|
|
50
|
+
"abo_panel.py" = "abotyper_core.panel:main"
|
|
51
|
+
"panel_to_bed.py" = "abotyper_core.panel_to_bed:main"
|
|
52
|
+
"clair2metrics.py" = "abotyper_core.clair2metrics:main"
|
|
53
|
+
"clair2haplotypes.py" = "abotyper_core.clair2haplotypes:main"
|
|
54
|
+
"pileup2metrics.py" = "abotyper_core.pileup2metrics:main"
|
|
55
|
+
"predict_abo_phenotype.py" = "abotyper_core.predict_phenotype:main"
|
|
56
|
+
"aggregate_abo_reports.py" = "abotyper_core.aggregate:main"
|
|
57
|
+
|
|
58
|
+
[tool.hatch.version]
|
|
59
|
+
path = "src/abotyper_core/__init__.py"
|
|
60
|
+
|
|
61
|
+
[tool.hatch.build.targets.wheel]
|
|
62
|
+
packages = ["src/abotyper_core"]
|
|
63
|
+
|
|
64
|
+
[tool.hatch.build.targets.sdist]
|
|
65
|
+
include = ["src/abotyper_core", "tests", "README.md", "LICENSE", "CHANGELOG.md"]
|
|
66
|
+
|
|
67
|
+
[tool.pytest.ini_options]
|
|
68
|
+
testpaths = ["tests"]
|
|
69
|
+
|
|
70
|
+
[tool.ruff]
|
|
71
|
+
target-version = "py311"
|
|
72
|
+
line-length = 140
|
|
73
|
+
|
|
74
|
+
[tool.ruff.lint]
|
|
75
|
+
select = ["E4", "E7", "E9", "F", "B006", "B008", "B904"]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""abotyper-core: ABO blood group typing logic from long-read amplicon data.
|
|
2
|
+
|
|
3
|
+
The panel-driven typing used by nf-core/abotyper: loading and validating the ABO variant panel, turning Clair3 and
|
|
4
|
+
BAM-pileup evidence into per-position calls, resolving phenotype, genotype and ISBT allele names, and writing the
|
|
5
|
+
result tables. Each step is also a command-line tool (see the README).
|
|
6
|
+
|
|
7
|
+
Research use only; not validated for clinical diagnosis.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
__version__ = "0.1.0"
|
|
11
|
+
|
|
12
|
+
from .panel import Panel, PanelError, VariantMarker, default_panel_path, load_panel # noqa: E402
|
|
13
|
+
|
|
14
|
+
__all__ = ["Panel", "PanelError", "VariantMarker", "default_panel_path", "load_panel", "__version__"]
|