Fast Python/Cython implementation of the PCAone Halko algorithm
Project description
Python implementation of Halko algorithm (PCAone)
This is an implementation of the PCAone Halko algorithm in Python/Cython for genetic data. It takes binary PLINK format (*.bed, *.bim, *.fam) as input. For simplicity, mean imputation is performed for missing data.
It is inspired by the lovely PCAone software! Have a look here.
Install and build
# Install via PyPI
pip3 install halkoSVD
# Download and install in a new Conda environment
conda env create --file environment.yml
# Download and install from GitHub directly
git clone https://github.com/Rosemeis/halkoSVD.git
cd halkoSVD
pip3 install .
# You can now run the program with the `halkoSVD` command
Quick usage
Provide halkoSVD
with the file prefix of the PLINK files.
# Check help message of the program
halkoSVD -h
# Extract top 10 PCs with a mini-batch size of 8192 SNPs
halkoSVD --bfile input --threads 32 --pca 10 --batch 8192 --out halko
# Increase power iterations to 16
halkoSVD --bfile input --threads 32 --pca 10 --power 16 --out halko
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
halkosvd-0.2.3.tar.gz
(166.6 kB
view details)
Built Distribution
File details
Details for the file halkosvd-0.2.3.tar.gz
.
File metadata
- Download URL: halkosvd-0.2.3.tar.gz
- Upload date:
- Size: 166.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1176dabcbfee3ad6b3fe2cee988f8cfad26cde9454e71b3437f2784fef520df |
|
MD5 | adc81cdda61fd2c917352c393ed077e7 |
|
BLAKE2b-256 | 2e307919f5cc7a9d97701ede9e26111351aaf197b25bcca69f63414208434198 |
File details
Details for the file halkoSVD-0.2.3-cp311-cp311-macosx_11_0_arm64.whl
.
File metadata
- Download URL: halkoSVD-0.2.3-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 88.9 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1238e64be6ef2fafabb66a9e976d36acd3121ec6b50605ce56fa6d13eef5114 |
|
MD5 | 05b749d090987fcc7103e185e21d1497 |
|
BLAKE2b-256 | 0844ea9273acc7cc7e28a98cd8c7722d454a5df7395770373d6e095935e5774c |