Python implementation of the CARMA R Package1 for fine-mapping (work in progress).
Installation:
- Tested with Python 3.9.6 and cython 0.29.36
pip install -r requirements.txt
python setup.py build_ext --inplace
pip install .
Sample data to test CARMA available in /tests
or from: https://zenodo.org/record/7772462 (file to download: Sample_data.tar.gz
)
To Test:
- Make changes to
carmapy/carma_normal_fixed_sigma.py
- Update file paths:
- Line 2
sys.path.append()
oftests/carma_test.py
andtests/carma_py_functions_test.ipynb
- Update file paths to load
sumstats
andld
- Line 2
- Run
python ./tests/carma_test.py
to test whole fine-mapping process or test individual functions intests/carma_py_functions_test.ipynb
Notes:
-
tests/carma_py_functions_test.ipynb
function outputs need to equal to those intests/carma_r_functions_test.ipynb
-
tests/carma_cython_test.ipynb
function outputs need to equal to those intests/carma_rcpp_test.ipynb
Reference:
- Yang, Z., Wang, C., Liu, L. et al. CARMA is a new Bayesian model for fine-mapping in genome-wide association meta-analyses. Nat Genet 55, 1057–1065 (2023). https://doi.org/10.1038/s41588-023-01392-0