We have found that including the polyenic score (PGS), calculated on a leave-one-chromosome-out (LOCO) basis, as a fixed effect significantly improves the power of GWAS. The scripts here are intended to facilitate the calculation of the LOCO PGS and its inclusion as a fixed effect in a Linear Mixed Model (LMM) implemented with fastGWA. The pipeline is written for a HPC system running SLURM resource scheduler but can be modified easily for use with other schedulers such as SGE
.
Add absolute path to software and data files to 'config.txt' as well as required variables
bash pipeline.sh
This will submit the job scripts to the HPC scheduler with a previous job completion dependency for each script.
Currently the pipeline will generate covariate files on the fly for 10 PCs, age, sex, genotyping batch and assessment centre. Any deviation from these covariates will require the user to update the covariate generating scripts makeCovars.sh
& makePgsCovars.sh
. An example of how to add covariates can be found here
LDpred2 can be used for inferring the LOCO PGS. Follow the instructions here on how to set up the genotype objects. This pipeline has been written to allow a large number of phenotypes to be processed relatively quickly by generating LOCO objects once.
Brief summary of each script
All QC thresholds are defined in config.txt
Extract sample set from pfile input and apply filters to create an association variant set and PCA/GRM set
- Minor allele frequency, Hardy-Weinberg equilibrium, Imputation quality, genotype missingness, LD-pruning
Create LD-pruned set of variants for PCA and GRM calculation
Concatenate LD-pruned SNPs set into one population level dataset
Perform PCA analysis on LD-pruned set
Make multipart genetic relationship matrix (GRM) on LD-pruned SNP set
Concatenate multipart GRM
Create sparse GRM
Create covariate file
Run initial fastGWA analysis without PGS effect
Create LOCO summary statistic files
Run LOCO polygenic score calculation
Create LOCO covariates from PGS-LOCO scores
Run fastGWA per chromosome with PGS-LOCO score included as fixed effect
plink2
bgzip
fastGWA
PRSice2
LDpred2
*optional