Notes and code to calculate a weighted PRS in the UKB.
Please note the pipeline is built on University of Bristol infrastructure, though the code should be adaptable to other working environments. Further details are provided in the MRCIEU UKBionak data users guidance material. If you notice any issues please get in touch.
- Create input files.
- Clone repo.
- Create .env file (using .example_env template).
- Update .env as appropriate.
- Update job id and email details in slurm submission script.
- Run analysis.
Two input files are required to generate the weighted score: (1) a list of rsids (SNPLISTFILE) and (2) a two column file indicating the rsids and weights derived from a relevant GWAS (SCORE). Local storage of the ukb genetic and sample data are maintained by MRCIEU and are described elsewhere.
To use the pipeline, clone the repo to your working directory on BC4: git clone [email protected]:GenevieveLeyden/ukb.weighted.prs.git
.
To set the environment variables, within the repo you will need to copy the .example_env
file to .env
. Note these files are hidden, to list them use ls -a
. Update the filepaths and names of all input/output files in .env
as appropriate. Please note the paths to GENDIR
and SAMPLE
are provided in the guidance material.
Update --job-name
and --mail-user
in the slurm submission script as appropriate to receive an update on the progress of your analysis.
To run the analysis, submit the job to the slurm scheduler using sbatch slurm_submission.sh
. It may be useful to take note of the job id to check the progress of the analysis.