GigaPRS

GigaPRS is our new tool for constructing polygenic risk scores (PRS) from GWAS summary statistics. Its key feature is that it can efficiently analyze results from multiple sets of GWAS corresponding to a variety of traits and ancestries. GigaPRS uses pre-computed SNP-SNP correlations (LD matrices); if you prefer to compute correlations yourself, you should instead use MegaPRS. Meanwhile, if you are analyzing individual-level data, we recommend you switch to Elastic-Predict.

Please note that this page explains how to run GigaPRS within LDAK. An alternative is to instead run Step 1 of GigaPRS using the PGS Fusion website (see details here) and Step 2 using the GigaPRS R package (see details here).

Always read the screen output, which suggests arguments and estimates memory usage.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Overview of a GigaPRS analysis:

GigaPRS requires three sets of inputs: summary statistics from one or more GWAS, SNP-SNP correlations for one or more ancestries, and genotypes for the target individuals. Given these, GigaPRS performs two steps: Step 1 produces ancestry-specific estimates of effect sizes; Step 2 computes ancestry-specific PRS for the target individuals, then merges these into the final PRS using weights that account for each individual’s inferred ancestry.

Most GigaPRS analyses use summary statistics from single-ancestry GWAS. When this is the case, you should start by deciding which sets of summary statistics are focal; these should provide results from GWAS of the target trait, and usually there will be one set of focal summary statistics per ancestry. The remaining summary statistics should be divided into primary, if they also provide results from a GWAS for the target trait, and secondary, if they provide results from a GWAS of a different trait. GigaPRS Step 1 will then output estimates of SNP effect sizes for each ancestry that has a set of focal summary statistics. The primary summary statistics will always contribute to the effect size estimates, whereas the secondary summary statistics will only contribute if they are sufficiently informative (their inclusion is estimated to increase the effective sample size by at least 5%).

Note that it is possible to run GigaPRS when the main set of summary statistics provide results from a multi-ancestry GWAS for the target trait. This set of summary statistics should be classified as multi-ancestry focal; if there are additional sets of summary statistics, they should be from single-ancestry GWAS for different traits and classified as secondary. GigaPRS Step 1 will output one set of effect size estimates (these will be multi-ancestry estimates of effect sizes).

The figure below illustrates five different Step 1 analyses, each of which outputs estimates of SNP effect sizes for Type 1 Diabetes. The analyses differ according to their input summary statistics, and how these are classified. Analyses A & B each have one set of focal summary statistics, and therefore produce only one set of effect size estimates (the focal summary statistics are European, and therefore the analyses produce European effect size estimates). Meanwhile, Analyses C & D have three sets of focal summary statistics, and therefore produces three sets of effect size estimates (for Europeans, Africans and East Asians). Lastly, Analysis E has one set of multi-ancestry focal summary statistics, and produces one set of effect size estimates.

Note that Analyses A and E are the simplest, because they each involve only one set of summary statistics: for Analysis A, the summary statistics from a single-ancestry GWAS, whereas for Analysis E, they come from a multi-ancestry GWAS. Analyses B, C & D are more complicated, because they each involve multiple sets of summary statistics: for Analysis B, the summary statistics come from GWAS of different traits but for the same ancestry; for Analysis C, the summary statistics come from GWAS of the same trait but for different ancestries; for Analysis D, the summary statistics come from GWAS for a variety of traits and a variety of ancestries.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Preparation:

First you should obtain summary statistics from one or more GWAS, and ensure these are in the format required by LDAK (see Summary Statistics for details). Note that we provide links to some of the major sources of GWAS summary statistics in Resources, as well bulk summary statistics from 52 European GWAS.

Second you should download and extract predictor-predictor correlations for the ancestries that match to your GWAS summary statistics. For example, Analyses A & B in the figure above use only results from European GWAS, so require only European correlations. By contrast, Analyses C & D use results from European, African and East Asian GWAS, so require European, African and East Asian correlations.

In total, we provide ten sets of correlation. Below are links to the four main sets, which should suffice for most analyses (click here for links to the remaining correlations and for more details on how the correlations were computed). Note that when using a UNIX operating system, you can download a file by typing wget followed by its web address (you can obtain the web address of the files below by right-clicking on the corresponding links).

African Correlations (prefix HAPMAP.CARAFR)
East Asian Correlations (prefix HAPMAP.EAS)
European Correlations (prefix HAPMAP.UK)
South Asian Correlations (prefix HAPMAP.INDPAK)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Step 1 - estimate SNP effect sizes:

The main argument is --giga-prs <outfile>.

This requires the options

--cors <corstem> or --corslist <corsdetails> - to provide one or more sets of predictor-predictor correlations. In general, --cors is used when performing a single-ancestry analysis, while --corslist is used when performing a multi-ancestry analysis.

--summary <sumsfile> or --sumslist <sumsdetails> - to provide details of the summary statistics. In general, --summary is used when analyzing results from one GWAS, while --sumslist is used when analyzing results from multiple GWAS (note that --summary can only be used with --cors, and not with --corslist).

If using --sumslist, then <sumsfile> should have one row for each set of summary statistics. Each row should have three elements: the first element provides the name of the file containing the summary statistics; the second element is one of the letters F, P, S or M, indicating whether the summary statistics are focal, primary, secondary or multi-ancestry focal; the third element is the index of the correlations to which the correlations match (for multi-ancestry summary statistics, we recommend providing the index of the correlations corresponding to the most-prominent ancestry).

See below for some examples of how to provide details of the summary statistics.

Use --bulk-summaries <bulkfile> to provide bulk summary statistics (i.e.., those provided in Resources). These will be classified as secondary summary statistics, meaning that only those sets determined to be sufficiently informative will contribute to the analysis.

If the summary statistics files contain A1 frequencies, LDAK will compute the difference between the frequencies in the summary statistics and those in the matching correlations, then exclude predictors for which the difference is greater than 0.2 (you can stop this by adding --check-frequencies NO or change the threshold using --max-frequency-difference <float>). In addition, LDAK will compute the average difference in frequencies between each set of summary statistics and all sets of correlations, and report an error if the set of summary statistics appears wrongly assigned; you can override this error by adding --check-assignments YES.

By default, LDAK will predict the values for missing summary statistics (however, it will only predict values for windows where summary statistics are present for at least half the predictors); you can turn this off by adding --summary-imputation NO. If there is more than one set of focal summary statistics, LDAK requires that the focal summary statistics have average sample size over 10,000 (so that it is possible to obtain reasonably accurate estimates of genetic correlations between sets of summary statistics); you can override this error by adding --check-size NO.

In general, we recommend estimating effect sizes using Variational Bayes. The exception is when using an in-sample reference panel, in which case MCMC can perform better. To force LDAK to use MCMC, use --MCMC-solve YES (by default, LDAK will then use four MCMC chains, each with 250 iterations, the first 50 of which are discarded; you can change these values using --MCMC-chains <integer>, --MCMC-iterations <integer> and --MCMC-burn <integer>). Note that if LDAK detects an in-sample reference panel, it will recommend you switch to MCMC (you can override this warning adding --check-MCMC NO).

If you wish to compute PRS standard deviations, you should add --PRS-variance YES. Note that this is only possible when there is only one set of focal summary statistics, and when estimating effect sizes using MCMC (LDAK will then save effect sizes every tenth MCMC iteration; change this frequency using --MCMC-step <integer>).

You can use --model <type> to specify the prior distribution for predictor effect sizes. By default, LDAK will assume a BayesR prior distribution (equivalent to adding --model bayesr), which is what we recommend; the alternatives are --model lasso, --model lasso-sparse, --model ridge, --model bolt, --model bayesr-shrink and --model elastic. Meanwhile, if you use --model mega, LDAK will use a combination of lasso, ridge, BayesR and elastic prior distributions.

By default, LDAK will consider multiple sets of model parameters, then use pseudo cross-validation to identify the best-fitting set (to understand how this works, see Pseudo Summaries). Note that if you add --save-all-models YES, then LDAK will additionally report effect sizes for all sets of model parameters (this is only possible when there is one set of focal summary statistics).

By default, LDAK will assume a slightly modified version of the Baseline LD Heritability Model (using the SNP annotations provided in Resources); if you add --use-annotations NO, then LDAK will instead assume the Human Default Heritability Model.

When computing the model likelihood, LDAK estimates the residual variance (instead of fixing it equal to the phenotypic variance). In general, we find this beneficial when a set of summary statistics is a poor match to the corresponding SNP-SNP correlations, but you can stop it by adding --fix-residual-variance YES.

If there is one set of focal summary statistics, the estimated effect sizes are saved in <outfile>.effects. This file will usually have five columns, providing the predictor names, the A1 and A2 alleles, the average numbers of A1 alleles, then the raw effect sizes (relative to the A1 allele). Note that if you used --PRS-variance YES, then <outfile>.effects will contain extra columns corresponding to the MCMC samplings. Meanwhile, if you used --save-all-models YES, then LDAK will also create the file <outfile>.full.effects, which contains effect sizes corresponding to all sets of model parameters.

If there is more than one set of focal summary statistics, the estimated effect sizes are saved in <outfile>.combined.effects. This file will have three header columns, which provide the predictor names and the A1 and A2 alleles, followed by pairs of columns that provide the average number of A1 alleles and raw effect size for each ancestry.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Some examples of how to provide details of the summary statistics:

Here we explain how to perform the five Step 1 analyses illustrated in the figure at the top of this page. Suppose we have downloaded the European, African and East Asian sets of correlations, which have prefixes HAPMAP.UK, HAPMAP.CARAFR and HAPMAP.EAS, respectively. Moreover, suppose we have a file called cors.txt, which contains the following three rows:
HAPMAP.UK
HAPMAP.CARAFR
HAPMAP.EAS

Each analysis uses a command of the form ./ldak.out --corslist cors.txt --sumslist sumsX.txt
The figure below show the contents of the file sumsX.txt for each analysis.

For example, Analysis D involves five sets of summary statistics, so the file sumsD.txt has five rows. The first column of sumsD.txt provides the names of the files containing the five sets of summary statistics. The second column indicates that the first, fourth and fifth sets of summary statistics are focal (F), while the second and third sets are secondary (S). Finally, the third column of sumsD.txt specifies that the first three sets of summary statistics match to Correlations 1 (those with prefix HAPMAP.UK), the fourth set of summary statistics match to Correlations 2 (those with prefix HAPMAP.CARAFR), while the fifth set of summary statistics match to Correlations 3 (those with prefix HAPMAP.EAS).

Note Analysis A uses only one set of summary statistics and one ancestry, so it is equivalent to run the command ./ldak.out --cors HAPMAP.UK --summary T1D.EUR.summaries.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Step 2 - compute the polygenic scores:

The main argument is --calc-scores <outfile>.

This requires the options

--scorefile <scorefile> or --multi-scorefile <multiscorefile> - to provide the estimated SNP effect sizes. You should use --scorefile for analyses with one set of focal summary statistics (i.e., when Step 1 produced estimates for one ancestry), and use --multi-scorefile for analyses with multiple sets of focal summary statistics (i.e., when Step 1 produced estimates for multiple ancestries).

–bfile/–gen/–sp/–speed <prefix> or --bgen <datafile> - to specify genetic data files for the target individuals (see File Formats).

Note that if you used the option --PRS-variance YES in Step 1, then you should also add --PRS-variance YES when calculating scores.

If you have phenotypes for the target individuals, you can provide these by adding --pheno <phenofile>.

The polygenic scores will be saved in Column 5 of <outfile>.profile. If you added the option --PRS-variance YES, then Column 6 will report standard deviations. If you used --save-all-models YES in Step 1, then <outfile>.profile will contain multiple sets of polygenic scores, one for each set of model parameters (these will be saved in Columns 5, 7, 9, etc). Note that when using --multi-scorefile, the estimated ancestries of target individuals will be saved in <outfile>.ancestry.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Example:

Please note that examples using real data are provided in Worked Examples.

The following examples use fake multi-ancestry data, constructed using genotypes from the 1000 Genome Project. You can either click here to download them in your browser, or download them from a terminal using the command

wget https://genetics.ghpc.au.dk/doug/gigaprs.data.zip

The data were designed to mimic those used in the figures above. In total, there are five sets of summary statistics, corresponding to three different traits (T1D, Glucose & BMI) and spanning three ancestries (European, African and East Asian). There are also three sets of SNP-SNP correlations (European, African and East Asian), as well as genotypes for target individuals. Please note that the data are not realistic; in particular, there are only four chromosomes and 50,000 SNPs.

We will perform five analyses, all of which use the file cors.txt, that contains the following three rows
fake.EUR
fake.AFR
fake.EAS

The analyses differ based on which file is used to specify the summary statistics.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Analysis A

Step 1 uses the command

./ldak.out --giga-prs gigaA --corslist cors.txt --sumslist sumsA.txt

where the file sumsA.txt contains the following one row:
fake.T1D.EUR.summaries F 1

This tells LDAK that there is one set of summary statistics, which has file name fake.T1D.EUR.summaries, is classified as focal, and is assigned to the first set of correlations (those with prefix fake.EUR).

Step 2 uses the command

./ldak.out --calc-scores PRSA --scorefile gigaA.effects --bfile target

The main output of Step 1 is the file gigaA.effects, which contains European effect size estimates, while the main output of Step 2 is the file PRSA.profile, which contains PRS for the target individuals.

The first few rows of gigaA.effects look as follows
Predictor A1 A2 Centre Model5
SNP1 T G 0.480000 -2.8335e-04
SNP2 T C 0.450000 2.1482e-03

Meanwhile, the first few rows of PRSA.profile look as follows
ID1 ID2 Phenotype Covariates Profile_1 BLANK
EUR Ind1 NA 0.000000 1.625389 NA
EUR Ind2 NA 0.000000 1.810327 NA
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Analysis B

Step 1 uses the command

./ldak.out --giga-prs gigaB --corslist cors.txt --sumslist sumsB.txt

where the file sumsB.txt contains the following three rows:
fake.T1D.EUR.summaries F 1
fake.Glucose.EUR.summaries S 1
fake.BMI.EUR.summaries S 1

This tells LDAK that there are three sets of summary statistics, which have filenames fake.T1D.EUR.summaries, fake.Glucose.EUR.summaries and fake.BMI.EUR.summaries, that the first set is classified as focal, while the second and third sets are secondary, and that all three sets are assigned to the first set of correlations (those with prefix fake.EUR).

Step 2 uses the command

./ldak.out --calc-scores PRSB --scorefile gigaB.effects --bfile target

The main output of Step 1 is the file gigaB.effects, which contains European effect size estimates, while the main output of Step 2 is the file PRSB.profile, which contains PRS for the target individuals.

Note that the screen output from Step 1 tells us that including the Glucose summary statistics is estimated to increase the effective sample size by 0.7%, while including the BMI summary statistics is estimated to increase the effective sample size by 25%. The default threshold for including a set of secondary summary statistics is 5%, and therefore LDAK includes the BMI summary statistics, but excludes the Glucose summary statistics.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Analysis C

Step 1 uses the command

./ldak.out --giga-prs gigaC --corslist cors.txt --sumslist sumsC.txt

where the file sumsC.txt contains the following five rows:
fake.T1D.EUR.summaries F 1
fake.T1D.AFR.summaries F 2
fake.T1D.EAS.summaries F 3

This tells LDAK that there are three sets of summary statistics, which have filenames fake.T1D.EUR.summaries, fake.T1D.AFR.summaries and fake.T1D.EAS.summaries, and that all three sets are classified as focal. Furthermore, the file specifies that the first, second and third sets of summary statistics are assigned to the first, second and third sets of correlations, respectively (those with prefixes fake.EUR, fake.AFR and fake.EAS).

Step 2 uses the command

./ldak.out --calc-scores PRSC --multi-scorefile gigaC.combined.effects --bfile target

The main output of Step 1 is the file gigaC.combined.effects, which contains European, African and East Asian effect size estimates, while the main output of Step 2 is the file PRSC.profile, which contains PRS for the target individuals.

Note that the screen output from Step 1 tells us that there is high genetic overlap between the three sets of summary statistics (all pairwise estimates of genetic correlation are over 0.8).

Step 2 also produces the files PRSC.profile.single and PRSC.ancestry. The former provides PRS computed using the European, African and East Asian effect size estimates, while the latter shows the inferred ancestries of the target individuals (the PRS in PRSC.profile are obtained by weighting the ancestry-specific PRS by the inferred ancestry proportions).
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Analysis D

Step 1 uses the command

./ldak.out --giga-prs gigaD --corslist cors.txt --sumslist sumsD.txt

where the file sumsD.txt contains the following five rows:
fake.T1D.EUR.summaries F 1
fake.Glucose.EUR.summaries S 1
fake.BMI.EUR.summaries S 1
fake.T1D.AFR.summaries F 2
fake.T1D.EAS.summaries F 3

This tells LDAK to use all five sets of summary statistics, and that the first, fourth and fifth are classified as focal, while the second and third are classified as secondary. Furthermore, the file specifies that the first three sets of summary statistics are assigned to the first set of correlations (those with prefix fake.EUR), while the fourth and fifth are assigned to the second and third sets of correlations, respectively (those with prefixes fake.AFR and fake.EAS).

Step 2 uses the command

./ldak.out --calc-scores PRSD --multi-scorefile gigaD.combined.effects --bfile target

The main output of Step 1 is the file gigaD.combined.effects, which contains European, African and East Asian effect size estimates, while the main output of Step 2 is the file PRSD.profile, which contains PRS for the target individuals.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Analysis E

Step 1 uses the command

./ldak.out --giga-prs gigaE --corslist cors.txt --sumslist sumsE.txt

where the file sumsE.txt contains the following one row:
fake.T1D.MULTI.summaries M 1

This tells LDAK that there is one set of summary statistics, which has file name fake.T1D.MULTI.summaries, is classified as multi-ancestry focal and assigned to the first set of correlations (those with prefix fake.EUR).

Step 2 uses the command

./ldak.out --calc-scores PRSE --scorefile gigaE.effects --bfile target

The main output of Step 1 is the file gigaE.effects, which contains multi-ancestry effect size estimates, while the main output of Step 2 is the file PRSE.profile, which contains PRS for the target individuals.

Note that the screen output from Step 1 tells us that the inferred ancestry of the multi-ancestry summary statistics is one third European, one third African and one third East Asian (which is accurate, because the summary statistics in fake.T1D.MULTI.summaries were obtained by meta-analysing the results of the equally-sized European, African and East Asian GWAS of T1D).

For this example, we assigned the summary statistics to the first set of correlations. However, the results would be almost identical if we had instead assigned them to the second or third sets (the assignment only affects the SNP subsets, which differ only slightly across correlations).