EM-PCA for inferring population structure in the presence of missingness
Project description
EMU (v1.3.0)
EMU is a software for performing principal component analysis (PCA) in the presence of missingness for genetic datasets. EMU can handle both random and non-random missingness by modelling it directly through a truncated SVD approach. EMU uses binary PLINK files as input.
Citation
Please cite our paper in Bioinformatics
Installation
# Option 1: Build and install via PyPI
pip install emu-popgen
# Option 2: Download source and install via pip
git clone https://github.com/Rosemeis/emu.git
cd emu
pip install .
# Option 3: Download source and install in a new Conda environment
git clone https://github.com/Rosemeis/emu.git
conda env create -f emu/environment.yml
conda activate emu
You can now run the program with the emu command.
If you run into issues with your installation on a HPC system, it could be due to a mismatch of CPU architectures between login and compute nodes (illegal instruction). You can try and remove every instance of the march=native compiler flag in the setup.py file which optimizes emu to your specific hardware setup. Another alternative is to use the uv package manager, where you can run emu in a temporary and isolated environment by simply adding uvx in front of the emu command.
# uv tool run example
uvx emu --bfile test --eig 2 --threads 64 --out test.emu
Quick usage
Running EMU
Provide emu with the file prefix of the PLINK files.
# Check help message of the program
emu -h
# Model and extract 2 eigenvectors using the EM-PCA algorithm
emu --bfile test --eig 2 --threads 64 --out test.emu
Memory-efficient variant
Very memory-efficient variant of emu for large-scale datasets.
# Example run using '--mem' argument
emu --mem --bfile test -eig 2 -threads 64 -out test.emu.mem
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file emu_popgen-1.3.0.tar.gz.
File metadata
- Download URL: emu_popgen-1.3.0.tar.gz
- Upload date:
- Size: 339.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9f48772e117818f01b558c3c7eb5c22deeb5e9f73d05831bf82a6db734acf9e
|
|
| MD5 |
7f6fa7d3467f3765f66c701c43e8d7a3
|
|
| BLAKE2b-256 |
588c5fb1a42970234f86bef958d07277754fac6a5e1b29ebffecea6da903a29b
|