Installation¶
CREDTOOLS requires Python 3.9 or higher. The base installation includes all dependencies needed for fine-mapping analysis.
Basic Installation¶
To install the base CREDTOOLS package, run this command in your terminal:
This is the preferred method to install CREDTOOLS, as it will always install the most recent stable release.
Development Installation¶
For development, you may want to install CREDTOOLS in "editable" mode:
Check that CREDTOOLS is installed correctly:
Conda Installation¶
You can also install CREDTOOLS using conda:
Source¶
The source for CREDTOOLS can be downloaded from the Github repo.
You can either clone the public repository:
Or download the tarball:
Once you have a copy of the source, you can install it with:
External Tool Dependencies¶
Some fine-mapping tools in CREDTOOLS require external software to be installed separately. The core tools (SuSiE, ABF, MultiSuSiE, RSparsePro) are pure Python and work out of the box. The following tools need additional setup:
SuSiEx¶
SuSiEx requires a pre-compiled binary. See the SuSiEx documentation for installation instructions.
MESuSiE¶
MESuSiE (Multiple Ancestry Sum of Single Effects) is an R-based multi-ancestry fine-mapping tool. It requires R and the MESuSiE R package to be installed on your system.
Option 1: Native R Installation¶
Step 1: Install R
Step 2: Install MESuSiE R package
MESuSiE depends on RcppArmadillo, which requires a Fortran compiler. Make sure gfortran is available:
Then install MESuSiE from GitHub:
# In R console
install.packages("devtools")
devtools::install_github("borangao/MESuSiE")
# Verify installation
library(MESuSiE)
Or from the command line:
Rscript -e 'install.packages("devtools", repos="https://cran.r-project.org")'
Rscript -e 'devtools::install_github("borangao/MESuSiE")'
# Verify
Rscript -e 'library(MESuSiE); cat("MESuSiE installed successfully\n")'
Option 2: Conda Environment¶
If you prefer using conda to manage R and its dependencies:
# Create a conda environment with R
conda create -n credtools_env python=3.12 r-base r-devtools r-rcpp r-rcpparmadillo -c conda-forge
# Activate the environment
conda activate credtools_env
# Install credtools
pip install credtools
# Install MESuSiE R package
Rscript -e 'devtools::install_github("borangao/MESuSiE")'
# Verify both are available
credtools --version
Rscript -e 'library(MESuSiE); cat("MESuSiE installed successfully\n")'
Conda Tips
- Make sure to install
r-rcpparmadillofrom conda-forge to avoid Fortran compiler issues. - If
devtools::install_githubfails inside conda, try installing additional R packages first:
Option 3: HPC / Module System¶
On HPC clusters with a module system:
# Load R module (exact name varies by cluster)
module load R/4.3.0
# or
module load r/4.3.0
# Install MESuSiE to a user library
Rscript -e 'devtools::install_github("borangao/MESuSiE")'
HPC Note
On some HPC systems, you may need to load additional modules (e.g., gcc, openblas) before compiling R packages with C++/Fortran code. Check your cluster's documentation or contact your sysadmin.
Verifying MESuSiE Setup¶
After installation, verify that CREDTOOLS can find MESuSiE:
# Check Rscript is on PATH
which Rscript
# Check MESuSiE is loadable
Rscript -e 'library(MESuSiE); cat("OK\n")'
If either command fails, CREDTOOLS will provide a clear error message with installation instructions when you try to run MESuSiE.
Troubleshooting¶
If you encounter any issues during installation, please check:
- Python version (3.9+ required)
- pip is up to date
- You have write permissions for the installation directory
MESuSiE-Specific Issues¶
Rscript not found: Ensure R is installed and Rscript is on your PATH. Run which Rscript to verify.
library 'gfortran' not found (macOS): Install gfortran via brew install gcc and create ~/.R/Makevars as described above.
ggrepel not available for this version of R: Install an older compatible version:
RcppArmadillo compilation errors: Ensure you have a C++ compiler and Fortran compiler available. On macOS, install Xcode Command Line Tools (xcode-select --install) and gcc (brew install gcc).