To conduct pathway analysis of SNP data from GWAS, we modified an existing gene set enrichment analysis (GSEA) algorithm [17]. The original GSEA algorithm ranks all genes by their significance of differential expression and then looks for groups of biologically relevant genes that are enriched at either the top or bottom of the ranked list. To apply this idea to SNP data, we take the N selected representative SNPs across all the genes to form the SNP list, and compute the P-values for comparing genotype frequencies between cases and controls. To measure their strength of association, we define ri = Φ-1(1 - pi), i = 1,..., N, where Φ-1 is the quantile function for the standard normal distribution. Let r(1) ≥ r(2) ≥ ... ≥ r(N) be the sorted values from largest to smallest. A gene set sharing the same functional pathway is converted to a pathway consisting of SNPs. For a SNP-based pathway with NH SNPs, we calculate a weighted Kolmogorov-Smirnov-like running sum [22] to measure the deviation of the pathway from a set of randomly picked SNPs in the genome: