HapFinder is an open-source R framework for haplotype genotyping of multivariant genetic markers from both second- and third-generation sequencing data.
Unlike existing software that primarily focuses on SNP-based microhaplotypes (MHs) from targeted sequencing assays, HapFinder supports a broad spectrum of haplotype markers, including:
- SNP-based Microhaplotypes (MHs)
- Multi-InDel markers
- DIP-MHs
- Custom multivariant marker systems
The framework is compatible with both targeted sequencing panels and untargeted datasets such as whole-genome sequencing (WGS) and whole-exome sequencing (WES), enabling scalable haplotype analysis across diverse forensic and genetic applications.
In addition to haplotype genotyping, HapFinder integrates population frequency estimation, forensic statistical analysis, DNA mixture interpretation workflows, and data export modules compatible with established forensic software such as EuroForMix and Familias.
HapFinder is freely available and designed as an extensible platform for current and emerging haplotype-based forensic genetic analyses.
HapFinder was developed by providing a unified and platform-agnostic framework for haplotype analysis. Key advantages include:
HapFinder supports multiple classes of multivariant genetic markers:
- Microhaplotypes (MHs)
- Multi-InDels
- DIP-MHs
- User-defined multivariant loci
Compatible with:
- Illumina sequencing
- MGI sequencing
- Oxford Nanopore sequencing
- Other BAM-based sequencing datasets
Supports:
- Targeted forensic sequencing panels
- Whole-genome sequencing (WGS)
- Whole-exome sequencing (WES)
Provides downstream tools for:
- Population frequency estimation
- Forensic parameter calculation
- DNA mixture interpretation
- EuroForMix database generation
- Familias-compatible outputs
- Command-line workflow
- Shiny graphical interface
- Open-source and fully reproducible
This repository contains the following files:
| File | Description |
|---|---|
| HapFinder_1.0.0.tar.gz | HapFinder R package source file for local installation |
| HapFinder_install_dependencies.R | Script for installing all required package dependencies |
| HapFinder.pdf | Complete user manual and software documentation |
| README.md | Project overview and installation guide |
Download the following files from this repository:
HapFinder_1.0.0.tar.gz
HapFinder_install_dependencies.R
HapFinder.pdf
Before installing HapFinder, install all required dependencies:
source("HapFinder_install_dependencies.R")This script automatically installs all required R packages.
Install the package locally:
install.packages(
"HapFinder_1.0.0.tar.gz",
repos = NULL,
type = "source"
)Load the package:
library(HapFinder)HapFinder::runHapFinder()The graphical interface will automatically open in your web browser.
- Direct genotyping from BAM files
- Supports paired-end (PE) and single-end (SE) sequencing data
- Read-level haplotype reconstruction
- CIGAR- and MD-tag-based variant parsing
- Quality filtering at both read and base levels
- Microhaplotype calling for mixed DNA samples
- Allele count estimation
- Haplotype frequency estimation
- Mixture interpretation support
- Population haplotype frequency estimation
- Construction of frequency databases
- Population-level marker evaluation
Automatically calculates:
- Expected Heterozygosity (He)
- Effective Number of Alleles (Ae)
- Polymorphism Information Content (PIC)
- Discrimination Power (DP)
- Probability of Exclusion (PE)
- Shannon Information Index
- Generation of EuroForMix-compatible frequency databases
- Generation of EuroForMix mixture input files
- Generation of reference individual profiles
The built-in Shiny GUI supports:
- Data upload
- Parameter configuration
- Genotyping analysis
- Mixture analysis
- Result visualization
- Report export
| Function | Description |
|---|---|
| MicrohapCalling | Individual microhaplotype genotyping |
| MixMicrohapCall | Mixture microhaplotype analysis |
| analyzeMicrohaplotypeResults | Zygosity and ACR analysis |
| computeForensicStatsDetailed | Forensic statistical analysis |
| popMicroHapFreq | Population frequency estimation |
| recalculateMHcallsByThreshold | Threshold optimization |
| toEuroForMixFreqData | EuroForMix frequency database generation |
| toEuroforMixInput | EuroForMix mixture input generation |
| toIndReference | Individual reference profile generation |
| runHapFinder | Launch Shiny GUI |
A complete user manual is available in:
HapFinder.pdf
The manual includes:
- Installation instructions
- Input file preparation
- Parameter descriptions
- Example datasets
- Function documentation
- Workflow tutorials
- EuroForMix integration examples
GPL-3 License
Jiaming Xue
Department of Forensic Biology West China School of Basic Medical Sciences and Forensic Medicine Sichuan University, Chengdu, China
Email: xuejohn55@gmail.com
GitHub: https://github.com/xjmin/HapFinder
We thank all contributors and users of HapFinder for their support and feedback.
HapFinder is freely available for academic and research use.