Skip to content

Latest commit

 

History

History
111 lines (74 loc) · 6.04 KB

README.md

File metadata and controls

111 lines (74 loc) · 6.04 KB

LDpred2 standalone

Software container build(s) and utilities for computing polygenic scores (PGS), based on our main development repository CoMorMent/Containers

Dependencies

To set up this project on the local machine, the following may be required:

  • git
  • git LFS
  • Docker. Recommended for MacOS users (with M1, M2, or newer chips)
  • Singularity or Apptainer. Recommended for Linux users, or for MacOS users (with Intel chips), or for secure systems with no direct internet access.
  • ORAS CLI. Recommended for Linux users, or for users wishing to download the Singularity container from the GitHub Container Registry
  • Python version 3.11 or newer

There are multiple methods to install these dependencies, and the user should choose the one that best fits their system. Please refer to the respective websites for installation instructions.

Conda environment

For ease of use, a Conda environment file is provided in the conda-environment.yml in this repository.

To create a new Conda environment with the required dependencies, issue in the terminal:

conda env create -f conda-environment.yml
conda activate ldpred2_standalone

To obtain Conda, please refer to the Conda installation instructions.

Obtaining these files

To use these files and codes, clone this repository by pressing the green Code button above and follow the instructions.

For those who will not need the entire development history, a shallow clone may be performed by issuing:

git clone --depth 1 https://github.com/comorment/ldpred2_standalone.git

This repository may use git LFS for large, non-code files. After cloning the repository, initialize git LFS locally by issuing in the terminal:

cd </path/to/>ldpred2_standalone
git lfs install
git pull

Build status

License Documentation Status Flake8 lint Dockerfile lint

Description of available containers

  • ldpred2.sif - a minimal Singularity container with R and RStudio based on rocker/r-ver, Python with some common numerics and plotting packages, PLINK version 1.9 and 2.0, and PRSice-2, and dependencies for running PGS using LDpred2.

Using

Please refer to the scripts and README files in the scripts directory for usage

Software versions

This table contains the list of tools included in the different Dockerfile(s) and installer bash scripts for each container. Please keep up to date when pushing new container builds:

Pulling/Building/rebuilding containers

For instructions on how to build or rebuild containers using Docker and Singularity or Apptainer refer to <ldpred2_standalone>/docker/README.md.

Build the documentation

Within this repository, the html-documentation can be built from source files put here using Sphinx. To do so, install Sphinx and some additional packages in Python using Conda by issuing:

cd <ldpred2_standalone>/docs/source
conda env create -f environment.yml  # creates environment "sphinx"
conda activate sphinx  # activates environment "sphinx
make html  # builds html documentation into _build/html/ subdirectory

The built documentation can be viewed locally in a web browser by opening the file <ldpred2_standalone>/docs/source/_build/html/index.html

The documentation may also be hosted online on readthedocs.org.

SLURM job script example

A basic job script example for running a Singularity container in an HPC setting with the SLURM job scheduler is provided in the file singularity_slurm_job.sh, and should be modified as needed. It expects a few environment variables and can be submitted as

export JOBNAME=ldpred2_standalone
export ACCOUNT=<project allocation account name>
export WALLTIME="00:05:00"  # expected run time HH:MM:SS format
export CPUS_PER_TASK=1  # number of CPU cores
export MEM_PER_CPU=2000MB  # RAM per CPU
export SINGULARITY_MODULE=singularity/3.7.1  # name of Singularity module and version

sbatch singularity_slurm_job.sh  # submit job

The output of the job will be written to the text files ldpred2_standalone.out (output) and ldpred2_standalone.err (errors).

Feedback

If you face any issues, or if you need additional software, please let us know by creating a new issue.