HaploNet
HaploNet is a program that performs dimensionality reduction and clustering of haplotypes using neural networks. We utilize a variational autoencoder framework using a Gaussian mixture prior to model haplotypes in windows along the window. The learnt encodings and clusterings can be joint to infer population structure using PCA and to estimate ancestry proportions using haplotype information.
The preprint for the method can be found here: [1]
Get HaploNet and build
git clone https://github.com/Rosemeis/HaploNet.git cd HaploNet python setup.py build_ext --inplace
HaploNet is based on the PyTorch library (v.1.7) and therefore has GPU support which we also recommend for faster training of the windows. PyTorch can be installed using either 'conda' or 'pip' [2]. OpenMP is assumed to be installed. HaploNet has the following requirements:
- Python (>3.6)
- PyTorch
- Cython
- NumPy
- scikit-allel