https://pypi.org/project/fast-kernel-set-test
This folder has been updated with both the FastKAST and QuadKAST
Please check sub-branch for detailed instruction on each specific method.
- You need python >= 3.60 in order to run the code (anaconda3 recommended)
pip install fast-kernel-set-test
or install from source
You can either follow the standard pipeline FastKAST_annot.py
and QuadKAST_annot.py
, or import the neccessary function to build based on your own I/O.
To run the demo FastKAST code with a customized window size, you can generate a annotation file with "start_index end_index" as a row, and run
python FastKAST_annot.py --bfile ./example/sim --phen ./example/sim.pheno --annot ./example/sim.new.annot
Or directly run
sh run_rbf_annot.sh
To run the demo QuadKAST code with a customized window size, you can generate a annotation file with "start_index end_index" as a row, and run
python QuadKAST_annot.py --bfile ./example/sim --phen ./example/sim.pheno --annot ./example/sim.new.annot
Or directly run
sh run_quad_annot.sh
- Single trait analysis
## Given covariates c: (NxM), input Z: (NxD), and output y: (Nx1)
from FastKAST import getfullComponentPerm
results = getfullComponentPerm(c,Z,y,Perm=10)
## results: {'pval': [obs_pval, perm_pval1, ..., perm_pval10]}
- Multi-traits analysis
## Given covariates c: (NxM), input Z: (NxD), and output y: (NxK)
from FastKAST import getfullComponentMulti
results = getfullComponentMulti(c,Z,y)
## results: {'pval': [obs_pval1, obs_pval2, ..., obs_pvalK]}
The detailed statistics used to generate the main table and the Venn diagram of the paper are provided in the Data
folder
✅ Efficient multi-traits analysis (Sep 30, 2024)