Fast Ancestry Estimation
Project description
fastmixture (v0.93.3)
fastmixture
is a new software for estimating ancestry proportions in unrelated individuals. It is significantly faster than previous model-based software while providing accurate and robust ancestry estimates.
Table of Contents
Installation
# Build and install via PyPI
pip install fastmixture
# or download source and install via pip
git clone https://github.com/Rosemeis/fastmixture.git
cd fastmixture
pip install .
# or download source and install in new Conda environment
git clone https://github.com/Rosemeis/fastmixture.git
conda env create -f environment.yml
conda activate fastmixture
# You can now run the program with the `fastmixture` command
Citation
Please cite our preprint on BioRxiv.
Usage
fastmixture
requires input data in binary PLINK format.
- Choose the value of
K
that best fits your data. We recommend performing principal component analysis (PCA) first as an exploratory analysis before runningfastmixture
. - Use multiple seeds for your analysis to ensure robust and reliable results (e.g. ≥ 5).
# Using binary PLINK files for K=3
fastmixture --bfile data --K 3 --threads 32 --seed 1 --out test
# Outputs Q and P files (test.K3.s1.Q and test.K3.s1.P)
Supervised
A supervised mode is available in fastmixture
using --supervised
. Provide a file of population assignments for individuals as integers in a single column file. Unknown or admixed individuals must be given a value of '0'.
# Using binary PLINK files for K=3
fastmixture --bfile data --K 3 --threads 32 --seed 1 --out super.test --supervised data.labels
# Outputs Q and P files (super.K3.s1.Q and super.K3.s1.P)
Extra options
--iter
, specify maximum number of iterations for EM algorithm (1000)--tole
, specify tolerance for convergence in EM algorithm (0.5)--batches
, specify number of initial mini-batches (32)--check
, specify number of iterations performed before convergence check (5)--power
, specify number of power iterations in SVD (11)--chunk
, number of SNPs to process at a time in randomized SVD (8192)--als-iter
, specify maximum number of iterations in ALS procedure (1000)--als-tole
, specify tolerance for convergence in ALS procedure (1e-4)--no-freqs
, do not save ancestral allele frequencies (P-matrix)--random-init
, random parameter initialization instead of SVD--safety
, only perform safety updates
License
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details
Authors and Acknowledgements
- Jonas Meisner, Novo Nordisk Foundation Center for Basic Metabolic Research, University of Copenhagen
- Cindy Santander, Computational and RNA Biology, University of Copenhagen
- Alba Refoyo Martinez, Center for Health Data Science, University of Copenhagen
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
Built Distribution
File details
Details for the file fastmixture-0.93.3.tar.gz
.
File metadata
- Download URL: fastmixture-0.93.3.tar.gz
- Upload date:
- Size: 492.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf6c4704a3c5e4cb77a30c65333343e9ee84b7d6db511dc4c6b6cddfe795e1ba |
|
MD5 | 78445705adb99e513f38cb7d8c0add33 |
|
BLAKE2b-256 | e80e44ea6375e2dd8a407bfdb809393a045f6e181784f480e867f1d7c0a30cfb |
File details
Details for the file fastmixture-0.93.3-cp311-cp311-macosx_11_0_arm64.whl
.
File metadata
- Download URL: fastmixture-0.93.3-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 269.2 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 | 0dbfe93c40831c0e21896941d96aea8339a93fa9533fd9e8ebc2ee6a93c6b039 |
|
MD5 | 0b59c9f631ee60daf47a5623a5f7e517 |
|
BLAKE2b-256 | a94db4cfa5d046d3317de143bea3d051b08ecc0a9501866a823674c749dc7326 |