HAPlotype-based Regional Association Program (V1.5)

HAPlotype Regional Association Program (HAPRAP) is a fine mapping method which uses GWAS summary statistics and haplotypes from an individual-level reference panel.

Download

The current version of HAPRAP (V1.5) can be download here, which uses haplotypes phased by SHAPEIT as input. Click example to download the example input files

Then unarchive the file to your target directory, for example:

tar -xzf HAPRAP_v1.5.tar.gz

Important:

  1. HAPRAP is a program working in UNIX/Linux enviroment.
  2. Please put all four files together in one folder.
  3. The HAPRAP program is only working in python 2.7 or above
  4. Python modules, such as scipy, are needed. Please install them if you find the following error message: "NO module found". For example, install anaconda in your local machine (or server) will install python and python modules for you automaticsally

Input files

--hap haplotype_file.haps

The phased haplotype in SHAPEIT format (no header). For example:

Chr MarkerID POS A1 A2 haplotype 1 haplotype 2 etc
19 SNP1 100 A G 1 0 ...
19 SNP2 200 T G 0 0 ...
19 SNP3 300 C A 0 1 ...

Important:

A1 and A2 in the haplotype file should correspond to A1 and A2 in the meta-analysis summary statistics file (shown below)


--summary input_file.ma

Input the summary statistics file. The summary results can be from either a single GWAS or a meta-anlaysis of muliple GWASs. Example of input_file.ma :

SNP A1 A2 MAF beta SE pval N
SNP1 A G 0.1493 0.0024 0.0051 0.6653 12000
SNP2 T G 0.4238 0.0035 0.0055 0.0004 12000
SNP3 C A 0.2063 0.0054 0.0057 1.23E-15 11980

Columns are: SNP, minor allele of the reference panel, major allele, frequency of the minor allele, beta, standard error, p-value and sample size.

Important:

Correct signage of beta is key to HAPRAP. Please change the sign of beta if:

  1. The risk allele reported in meta-analysis is not the minor allele.
  2. The minor allele is different between the meta-analysis and reference panel.

Parameters

--pvalue 5e-8

Threshold p-value to declare a genome-wide significant hit.

NOTE: if analysis is running slowly, raising the significance level will reduce computational time.

--traits binary or --traits quantitative

Select whether the trait is binary (disease) or quantitative.

--cases 1000 or --sd 0.5

For disease outcomes, pick --case option followed by the number of cases in the meta-analysis. For quantitative traits, use --SD option followed by standard deviation of the phenotype. The numbers (1000 and 0.5) are examples here

--N 10000

The approximate number of participants within the meta-analysis. The number 10000 is an example.

--out

Name of output, for example: NOS1AP or Chr1.154417829


Example

Please click here to download the example files. Then run the HAPRAP program using one of the following commands (order of parameters does not need to be the same):

For joint SNP effect analysis
python HAPRAP.py --hap haplotype_file.haps --summary summary_results.ma --out output_file
For conditional analysis of quantitative traits
python con_HAPRAP.py --hap haplotype_file.haps --summary summary_results.ma --pvalue 5E-8 --traits quantitative --sd 25.23 --N 1896 --out output_file
For conditional analysis of disease outcomes
python con_HAPRAP.py --hap haplotype_file.haps --summary summary_results.ma --pvalue 5E-8 --traits binary --case 100 --N 1896 --out output_file

Output

The format of the result table is as follows:

SNP obs_BETA obs_SE obs_pval N HAPRAP_BETA simHR_SE simHR_pval
SNP1 0.5431 0.0691 4.09e-15 99025.0 0.5604 0.0372 3.6593e-20
SNP2 0.2352 0.0141 1.02e-7 91234.0 0.2104 0.0272 2.3456e-10
SNP3 0.2438 0.0271 3.08e-9 98746.0 0.3002 0.0289 1.2567e-5