Academic Journal

HapNet: a new python package for automated population-aware haplotype network analysis and visualization.

Bibliographic Details
Title: HapNet: a new python package for automated population-aware haplotype network analysis and visualization.
Authors: Davinack, Andrew A.1 (AUTHOR) davinack_drew@wheatoncollege.edu
Source: Mitochondrial DNA. Part A. Jul-Aug2026, Vol. 36 Issue 6, p130-136. 7p.
Subject Terms: *Haplotypes, *Python programming language, *Data visualization, *Population genetics, *Sequence alignment, *Spanning trees, *Phylogeography
Abstract: Haplotype networks are widely used in population genetics, phylogeography, and molecular ecology to visualize relationships among DNA sequences and summarize patterns of population connectivity. Existing tools vary in interface, algorithmic approach, input requirements, and output format. Here, I introduce HapNet, an open-source Python command-line package for constructing population-aware, minimum-spanning-tree-based haplotype graphs from aligned FASTA files. HapNet collapses identical sequences into haplotypes, calculates Hamming distances among haplotypes, constructs an MST-based graph, and generates publication-ready visualizations in which node size reflects haplotype frequency and pie-chart sectors indicate population composition. HapNet also produces machine-readable tabular outputs documenting haplotype membership, shared and private haplotypes, individual assignments, summary statistics, and run metadata. This version adds optional metadata input, phased diploid sequence support, individual-level genotype summaries, and label-free figure export. Utility is demonstrated using a published Hydroides dianthus COI dataset and a simulated phased diploid dataset. [ABSTRACT FROM AUTHOR]
Database: Academic Search Index
Description
ISSN:24701394
DOI:10.1080/24701394.2026.2705539