A reference panel is required when analysing summary statistics. It is used to estimate the correlations between nearby predictors (the linkage disequilibrium). In most cases, the summary statistics will correspond to SNPs (i.e., contain the results from an association study that regressed the phenotype on each SNP individually). In this case, the reference panel should also contain SNP data, from samples ancestrally similar to those used in the association study from which the summary statistics come. For example, when analysing results from a European association study, we often use genotypes for 10,000 samples from the UK Biobank.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
If your aim is to perform heritability analysis (i.e., to use SumHer to estimate SNP heritability, heritability enrichments, genetic correlations or the selection-related parameter alpha), then we recommend you use an extensive reference panel. We suggest using an imputed or sequenced dataset (ideally with at least 2000 samples), excluding SNPs with MAF below 0.005 or information score below 0.8. Based on these guidelines, the panel will typically have 8-10M SNPs. Note that, previously, we recommended that the reference panel contained only very high-quality common SNPs for which there were summary statistics. However, in our paper Evaluating and improving heritability models using summary statistics (Nature Genetics, 2020), we showed that it is better to instead use a more extensive panel.
If instead your aim is to construct a prediction model (i.e., to use MegaPRS), then the reference panel needs only contain predictors for which you have summary statistics. As above, we suggest using an imputed or sequenced dataset (ideally with at least 2000 samples), but as well as excluding SNPs with MAF below 0.005 or information score below 0.8, you can exclude those missing summary statistics (and likely also those with ambiguous alleles). Of course, if you plan to analyse summary statistics from multiple association studies, each of which used different SNPs, then it is probably easier to create one extensive reference panel, rather than multiple reduced panels.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
If you do not already have a suitable reference panel, you can use genotype data from The 1000 Genomes Project, which contains samples of European, Asian and African ancestry. Here are scripts for downloading and extracting genotype data for the 404 non-Finnish Europeans; to run them you will need to install both PLINK1.9 and PLINK2. Note that we are unable to filter based on information scores (because these are not available), and because the sample size is relatively small, we increase the MAF threshold (from 0.005 to 0.01).
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Download raw files
wget https://www.dropbox.com/s/y6ytfoybz48dc0u/all_phase3.pgen.zst
wget https://www.dropbox.com/s/odlexvo8fummcvt/all_phase3.pvar.zst
wget https://www.dropbox.com/s/6ppo144ikdzery5/phase3_corrected.psam
Use PLINK2 to decompress the pgen and pvar files
/home/doug/plink2 --zst-decompress all_phase3_ns.pgen.zst > all_phase3_ns.pgen
/home/doug/plink2 --zst-decompress all_phase3_ns.pvar.zst > all_phase3_ns.pvar
Identify non-Finnish Europeans
awk < phase3_corrected.psam '($5=="EUR" && $6!="FIN"){print 0, $1}' > eur.keep
Use PLINK2 to convert to binary PLINK format for non-Finnish Europeans, restricting to autsomal SNPs with MAF>0.01 (and excluding duplicates and SNPs with name ".")
echo "." > exclude.snps
./plink2 --make-bed --out raw --pgen all_phase3_ns.pgen --pvar all_phase3_ns.pvar --psam phase3_corrected.psam --maf 0.01 --autosome --snps-only just-acgt --max-alleles 2 --rm-dup exclude-all --exclude exclude.snps --keep eur.keep
The genotype data will now be stored in binary PLINK format in the files raw.bed, raw.bim and raw.fam. The following command inserts population information and sex into the fam file.
awk '(NR==FNR){arr[$1]=$5"_"$6;ars[$1]=$4;next}{$1=$2;$2=arr[$1];$5=ars[$1];print $0}' phase3_corrected.psam raw.fam > new.fam
Download genetic distances (also available in Resources), then insert these using PLINK1.9
wget https://genetics.ghpc.au.dk/doug/genetic_map_b37.zip
unzip genetic_map_b37.zip
./plink1.9 --make-bed --out ref --bfile raw --fam new.fam --cm-map genetic_map_b37/genetic_map_chr@_combined_b37.txt
If these scripts have run successfully, then your European reference panel is saved in Binary PLINK format in the files ref.bed, ref.bim and ref.fam, (you can delete the files with prefix raw or new).
