BACKGROUND
permutation testing is often described as the gold-standard for determining statistical significance when performing multiple correlated tests for genetic association.
permutation testing can be applied to both case-control studies and trio studies .
in permutation testing, the case/control status of the individuals  or the transmitted/untransmitted status of the parental chromosomes  are randomly permuted.
the maximum test statistic, maximized over all tests for all markers, is calculated for the original affection/transmission status and for each permuted affection/transmission status.
if k out of p permutations have a maximum test statistic greater than the maximum test statistic for the original data, the multiple-testing adjusted p-value for the experiment is /  <cit> .
permutation testing is computationally demanding for large-scale genetic association studies and requires an optimized software implementation.
the presto software package provides fast permutation testing for genome-wide association studies with thousands or millions of markers genotyped on thousands of samples.
in addition to using permutation of the trait status to determine statistical significance of user-specified allelic and genotypic tests, presto has three additional useful features: it can compute empirical distributions of order statistics so that the significance of sophisticated multi-marker statistics such as truncated products can be determined  <cit> , it can perform stratified tests when sampled individuals are from multiple populations and each individual's population of origin is specified, and it can compute significance levels for two-stage genotyping designs using only first-stage genotyping data  <cit> .
implementation
features
presto is designed to be flexible and user-friendly.
input files have a simple format with rows corresponding to markers and columns corresponding to individuals .
this format is well-suited to large-scale genetic studies where there are typically many more markers  than individuals .
genetic marker data can be split up over multiple input files .
there are no restrictions on how alleles or missing data are coded, and any sequence of non-white space characters can be used.
multi-allelic markers are permitted and are analyzed by creating a diallelic marker for each allele  and testing each diallelic marker for association with the trait status.
if the cases and controls are sampled from a stratified population and the strata are specified, presto will automatically perform stratified allelic and genotypic tests  <cit>  and will permute the trait status within each population stratum.
presto can also compute significance levels of combined single locus and multi-locus analysis by representing clusters of haplotypes as diallelic markers as described in browning and browning  <cit> .
by default, presto permutes case-control status for individuals; however, it can also permute case-control status for chromosomes, so that transmitted/untransmitted data from trio studies  can be analyzed.
presto performs a cochran-mantel-haenszel  test with continuity correction and a mantel trend test  <cit> .
the cmh test is a generalization to stratified data of the standard chi-square test of independence, and the mantel trend test is a generalization to stratified data of the allelic trend test.
when there is only one population stratum, these test statistics are equal to the standard test statistics after multiplying by n/ where n is the sample size.
the cmh test is used to test for recessive, dominant, or overdominant effects.
although the cmh test can be used to test for allelic effects, the mantel trend test is the preferred allelic test since it is robust to departure from hardy-weinberg equilibrium.
for each permutation of the trait status, presto can store and report the top-ranked order statistics.
the j-th order statistic is the j-th largest test statistic.
for each marker, the test statistic is the largest allelic or genotypic test statistic for that marker.
the empirical distributions of the top-ranked order statistics enable one to calculate an empirical p-value for any order statistic or any function of order statistics.
an example of a function of order statistics is the j-th rank truncated product statistic, which is defined as the product of the nominal p-values of the j largest test statistics  <cit> .
rank truncated product statistics are useful for detecting association of multiple top-ranked markers with a trait, even when no individual marker has a significant multiple-testing adjusted p-value.
presto can also calculate significance levels for two-stage genotyping designs from the first-stage genotype data using the technique described by dudbridge  <cit> .
in a two-stage genotype design, the sample is divided into two stages, a set of markers is genotyped in the first stage sample, and only the subset of first-stage markers with test statistics greater than a specified threshold are genotyped in the second stage sample.
presto samples the null distribution of the top-ranked order statistics for a two-stage genotyping design by using a subset of the first stage sample as a simulated first stage sample and the remainder of the first stage sample as a simulated second stage sample  <cit> .
optimization techniques
presto employs several techniques to optimize permutation testing on large-scale data sets.
the permutations of the trait status are computed once and are stored.
each permutation of the trait status is represented as an array of boolean  variables in which the k-th binary indicator gives the affection status of the k-th chromosome in the input file.
each genetic marker is read once and is tested against all stored permutations of the trait status, so that only one marker is stored in memory at a time.
for each permutation of the trait status and each diallelic marker, a  <dig> ×  <dig> contingency table is created where the rows are the cases and controls and the columns are the three possible genotypes.
presto obtains the  <dig> ×  <dig> contingency table counts without having to check the permuted trait status and genotype for all individuals.
instead, presto stores the indices of individuals with missing genotypes, heterozygote genotypes, and minor  allele homozygote genotypes.
the indices of individuals with major allele homozygote genotypes do not need to be stored because the case and control major allele homozygote genotype counts can be calculated from the case and control sample sizes, the case and control missing genotype counts, and the case and control heterozygote and minor allele homozygote genotype counts.
for example, if there are n genotypes, and 90% of these are major allele homozygotes, then contingency tables for each permutation of the trait status are constructed by examining the permuted trait status of n/ <dig> individuals instead of n individuals.
this optimization is expected to be increasingly effective as denser marker sets are developed since markers with low minor allele frequency are much more numerous than markers with high minor allele frequency.
an analogous optimization is used to obtain allele contingency table counts.
output files
presto produces three output files: a log file, a p-value file, and a null distribution file.
the log file summarizes the analysis and reports the command line parameters, the running time, and a list of all markers with a multiple-testing adjusted p-value less than  <dig> .
the p-value file gives the chi-square test statistics for each allelic and genotypic test performed for each marker, and the permutation p-value for the maximum test statistic for each marker .
if a marker has a maximum test statistic t <dig> when tested for association with the unpermuted trait status, and if for k out of p permutations of the trait status there exists at least one marker with a maximum test statistic ≥ t <dig>  then the multiple-testing adjusted p-value for the marker is /  <cit> .
the p-value file has a simple format and can be read into standard statistical software packages, such as r  <cit>  for filtering and sorting.
an r script for displaying qq-plots of p-value distributions is available from the presto web site.
the null distribution file gives the largest test statistics for each permutation of the trait status.
if there are p permutations and the k largest test statistics are saved, then the null p-value file is a p × k white-space delimited matrix whose rows correspond to permutations and whose columns are the empirical distributions of the top-ranked order statistics.
the entry in row i and column j is the j-th largest test statistic for the i-th permutation.
thus the j-th column gives the empirical distribution of the j-th largest test statistic.
RESULTS
computational time
presto computational times for  <dig>  autosomal markers genotyped in  <dig> cases and  <dig> controls.
allelic trend test and dominant/recessive genotypic tests were performed using  <dig> permutations of the trait status for  <dig> scenarios defined by the number of genotyping stages , the number of order statistic distributions calculated , and the number of population strata .
running times were measured on an intel core  <dig> duo processor e <dig>   <dig>  ghz processor with  <dig> gb of memory running linux.
running times for presto  <dig> .
<dig> and plink  <dig>   <cit>  were compared for this same data set on the same computer using a chi-square allelic test,  <dig> permutations of the trait status, and a single population stratum.
presto was approximately  <dig> times faster than plink .
presto's running time is linear in the number of samples, linear in the number of markers and linear in the number of permutations.
generally,  <dig> permutations are sufficient to determine experiment-wide significance.
presto can also be run in parallel as described in the documentation.
memory requirements
since only one marker is stored in memory at a time and since the trait status for each individual is stored using  <dig> bits, presto's memory requirements are modest.
if there are p permutations, n individuals, and the distributions of the top k order statistics are reported, then 2np/ <dig> bytes are allocated to store the permutations of the trait status and 8kp bytes are allocated to store the top-ranked order statistics .
in practice,  <dig> mb of memory should suffice for values of p ≤  <dig> , k ≤  <dig>  and n ≤  <dig> .
discussion
permutation testing with  <dig> permutations of a large case-control genome-wide association study with  <dig> individuals genotyped for  <dig>  markers can be performed using presto in approximately one hour of computing time .
with presto, the costs of permutation testing  are extremely low for many common study designs, and these costs compare very favourably to the costs associated with data generation .
there has been some debate regarding the number of permutations required.
when performing n permutations, the smallest multiple-testing adjusted p-value one can observe is 1/  <cit> .
thus,  <dig> permutations can provide multiple-testing adjusted p-values as low as  <dig> , which provide strong evidence of association.
in the analysis of wellcome trust case control consortium data described in table  <dig>  multiple-testing adjusted p-values of  <dig> ,  <dig> , and  <dig>  correspond to nominal p-values of  <dig>  × 10- <dig>   <dig>  × 10- <dig>  and  <dig>  × 10- <dig> respectively.
if additional permutations are desired,  <dig> or  <dig> permutations are easily performed on a large genome-wide data set like the wtccc data set in table  <dig>  and even larger numbers of permutations can be easily performed for smaller studies .
permutation testing is particularly appealing because of its simplicity.
recently, several more complex alternatives to permutation testing have been proposed  <cit> .
these methods can be useful, more computationally efficient alternatives to permutation testing in some situations.
some methods for computing adjusted p-values exploit the fact that for many common statistical tests, the correlated tests have an asymptotic multivariate normal distribution under the null hypothesis of no trait-marker correlation.
seaman and müller-myhsok have proposed estimating the asymptotic distribution and sampling directly from it  <cit> , and conneely and boehnke have proposed estimating the asymptotic distribution and calculating probabilities under this distribution using numerical integration  <cit> .
either approach can be used to estimate the probability of observing a minimum p-value smaller than the observed minimum p-value.
both approaches are particularly well-suited to situations where covariate data are available or multiple quantitative phenotypes are tested.
when the asymptotic distribution is accurately estimated, these methods are shown to give accurate results  for candidate gene studies.
there are some limitations with these approaches that estimate the asymptotic multivariate normal distribution of the test statistics.
these methods do not estimate significance levels for two-stage genotyping designs.
a more severe restriction is that these methods are typically limited to several hundred correlated tests.
seaman and müller-myhsok and conneely and boehnke suggest that the number of samples should be at least  <dig> times the number of tests performed in order to accurately estimate the asymptotic multivariate normal distribution  <cit> .
so these methods cannot be directly applied to hundreds of thousands of single marker tests in a genome-wide association study.
other alternatives to permutation testing are based on importance sampling.
kimmel and shamir  <cit>  have proposed a method that uses importance sampling to accurately estimate extremely small multiple-testing adjusted p-values, and kimmel and colleagues  <cit>  have modified this method to work with data from a stratified population.
decay of linkage disequilibrium with increasing genomic distance is exploited to further improve the computational efficiency of these methods.
these importance sampling methods lack some of the features that are found in presto.
the methods do not calculate significance for two-stage genotyping designs, and they do not calculate adjusted p-values for general order statistics.
in the extension to stratified data, the association test statistic used in kimmel et al  <cit>  will have suboptimal power because it ignores the population structure of the data .
the method of kimmel and colleagues  <cit>  can be modified to use a test statistic for stratified data , but this would dramatically increase the computation time because their method loops through all possible contingency tables for each sampled permutation, and the number of contingency tables consistent with a permutation increases exponentially with the number of population strata.
methods for computing multiple-testing adjusted p-values that are based on asymptotic multivariate normal distributions or importance sampling, are more complex than permutation testing, and require the asymptotic approximations to be accurate.
in addition, when testing a single binary trait, these alternative methods provide little or no decrease in computational time relative to permutation testing with presto, unless one is performing more than  <dig> permutations.
CONCLUSIONS
presto is a flexible, platform-independent software package that determines multiple-testing adjusted statistical significance for large-scale genetic association studies by using permutation of the trait status.
presto is faster than existing permutation testing software and can analyze a large genome-wide association study  in approximately one hour of computing time.
presto can be used with stratified data from multiple populations and with two-stage genotyping designs.
presto can also report empirical null distributions for the top-ranked statistics  so that statistical significance can be determined for any test statistic calculated in terms of order statistics.
availability and requirements
• project name: presto
• project home page:
• operating system: platform independent
• programming language: java
• other requirements: standard edition  java runtime environment   <dig>
• license: freely available for academic and commercial use.

 permutation testing is often described as the gold-standard for determining statistical significance when performing multiple correlated tests for genetic association. permutation testing can be applied to both case-control studies and trio studies. in permutation testing, the case/control status of the individuals or the transmitted/untransmitted status of the parental chromosomes are randomly permuted. the maximum test statistic, maximized over all tests for all markers, is calculated for the original affection/transmission status and for each permuted affection/transmission status. if k out of p permutations have a maximum test statistic greater than the maximum test statistic for the original data, the multiple-testing adjusted p-value for the experiment is /. permutation testing is computationally demanding for large-scale genetic association studies and requires an optimized software implementation. the presto software package provides fast permutation testing for genome-wide association studies with thousands or millions of markers genotyped on thousands of samples. in addition to using permutation of the trait status to determine statistical significance of user-specified allelic and genotypic tests, presto has three additional useful features: it can compute empirical distributions of order statistics so that the significance of sophisticated multi-marker statistics such as truncated products can be determined, it can perform stratified tests when sampled individuals are from multiple populations and each individual's population of origin is specified, and it can compute significance levels for two-stage genotyping designs using only first-stage genotyping data. implementation features presto is designed to be flexible and user-friendly. input files have a simple format with rows corresponding to markers and columns corresponding to individuals. this format is well-suited to large-scale genetic studies where there are typically many more markers than individuals. genetic marker data can be split up over multiple input files. there are no restrictions on how alleles or missing data are coded, and any sequence of non-white space characters can be used. multi-allelic markers are permitted and are analyzed by creating a diallelic marker for each allele and testing each diallelic marker for association with the trait status. if the cases and controls are sampled from a stratified population and the strata are specified, presto will automatically perform stratified allelic and genotypic tests and will permute the trait status within each population stratum. presto can also compute significance levels of combined single locus and multi-locus analysis by representing clusters of haplotypes as diallelic markers as described in browning and browning. by default, presto permutes case-control status for individuals; however, it can also permute case-control status for chromosomes, so that transmitted/untransmitted data from trio studies can be analyzed. presto performs a cochran-mantel-haenszel test with continuity correction and a mantel trend test. the cmh test is a generalization to stratified data of the standard chi-square test of independence, and the mantel trend test is a generalization to stratified data of the allelic trend test. when there is only one population stratum, these test statistics are equal to the standard test statistics after multiplying by n/ where n is the sample size. the cmh test is used to test for recessive, dominant, or overdominant effects. although the cmh test can be used to test for allelic effects, the mantel trend test is the preferred allelic test since it is robust to departure from hardy-weinberg equilibrium. for each permutation of the trait status, presto can store and report the top-ranked order statistics. the j-th order statistic is the j-th largest test statistic. for each marker, the test statistic is the largest allelic or genotypic test statistic for that marker. the empirical distributions of the top-ranked order statistics enable one to calculate an empirical p-value for any order statistic or any function of order statistics. an example of a function of order statistics is the j-th rank truncated product statistic, which is defined as the product of the nominal p-values of the j largest test statistics. rank truncated product statistics are useful for detecting association of multiple top-ranked markers with a trait, even when no individual marker has a significant multiple-testing adjusted p-value. presto can also calculate significance levels for two-stage genotyping designs from the first-stage genotype data using the technique described by dudbridge. in a two-stage genotype design, the sample is divided into two stages, a set of markers is genotyped in the first stage sample, and only the subset of first-stage markers with test statistics greater than a specified threshold are genotyped in the second stage sample. presto samples the null distribution of the top-ranked order statistics for a two-stage genotyping design by using a subset of the first stage sample as a simulated first stage sample and the remainder of the first stage sample as a simulated second stage sample. optimization techniques presto employs several techniques to optimize permutation testing on large-scale data sets. the permutations of the trait status are computed once and are stored. each permutation of the trait status is represented as an array of boolean variables in which the k-th binary indicator gives the affection status of the k-th chromosome in the input file. each genetic marker is read once and is tested against all stored permutations of the trait status, so that only one marker is stored in memory at a time. for each permutation of the trait status and each diallelic marker, a × contingency table is created where the rows are the cases and controls and the columns are the three possible genotypes. presto obtains the × contingency table counts without having to check the permuted trait status and genotype for all individuals. instead, presto stores the indices of individuals with missing genotypes, heterozygote genotypes, and minor allele homozygote genotypes. the indices of individuals with major allele homozygote genotypes do not need to be stored because the case and control major allele homozygote genotype counts can be calculated from the case and control sample sizes, the case and control missing genotype counts, and the case and control heterozygote and minor allele homozygote genotype counts. for example, if there are n genotypes, and 90% of these are major allele homozygotes, then contingency tables for each permutation of the trait status are constructed by examining the permuted trait status of n/ individuals instead of n individuals. this optimization is expected to be increasingly effective as denser marker sets are developed since markers with low minor allele frequency are much more numerous than markers with high minor allele frequency. an analogous optimization is used to obtain allele contingency table counts. output files presto produces three output files: a log file, a p-value file, and a null distribution file. the log file summarizes the analysis and reports the command line parameters, the running time, and a list of all markers with a multiple-testing adjusted p-value less than. the p-value file gives the chi-square test statistics for each allelic and genotypic test performed for each marker, and the permutation p-value for the maximum test statistic for each marker. if a marker has a maximum test statistic t when tested for association with the unpermuted trait status, and if for k out of p permutations of the trait status there exists at least one marker with a maximum test statistic ≥ t then the multiple-testing adjusted p-value for the marker is /. the p-value file has a simple format and can be read into standard statistical software packages, such as r for filtering and sorting. an r script for displaying qq-plots of p-value distributions is available from the presto web site. the null distribution file gives the largest test statistics for each permutation of the trait status. if there are p permutations and the k largest test statistics are saved, then the null p-value file is a p × k white-space delimited matrix whose rows correspond to permutations and whose columns are the empirical distributions of the top-ranked order statistics. the entry in row i and column j is the j-th largest test statistic for the i-th permutation. thus the j-th column gives the empirical distribution of the j-th largest test statistic.  computational time presto computational times for autosomal markers genotyped in cases and controls. allelic trend test and dominant/recessive genotypic tests were performed using permutations of the trait status for scenarios defined by the number of genotyping stages, the number of order statistic distributions calculated, and the number of population strata. running times were measured on an intel core duo processor e ghz processor with gb of memory running linux. running times for presto. and plink were compared for this same data set on the same computer using a chi-square allelic test, permutations of the trait status, and a single population stratum. presto was approximately times faster than plink. presto's running time is linear in the number of samples, linear in the number of markers and linear in the number of permutations. generally, permutations are sufficient to determine experiment-wide significance. presto can also be run in parallel as described in the documentation. memory requirements since only one marker is stored in memory at a time and since the trait status for each individual is stored using bits, presto's memory requirements are modest. if there are p permutations, n individuals, and the distributions of the top k order statistics are reported, then 2np/ bytes are allocated to store the permutations of the trait status and 8kp bytes are allocated to store the top-ranked order statistics. in practice, mb of memory should suffice for values of p ≤, k ≤ and n ≤. discussion permutation testing with permutations of a large case-control genome-wide association study with individuals genotyped for markers can be performed using presto in approximately one hour of computing time. with presto, the costs of permutation testing are extremely low for many common study designs, and these costs compare very favourably to the costs associated with data generation. there has been some debate regarding the number of permutations required. when performing n permutations, the smallest multiple-testing adjusted p-value one can observe is 1/. thus, permutations can provide multiple-testing adjusted p-values as low as, which provide strong evidence of association. in the analysis of wellcome trust case control consortium data described in table multiple-testing adjusted p-values of,, and correspond to nominal p-values of × 10- × 10- and × 10- respectively. if additional permutations are desired, or permutations are easily performed on a large genome-wide data set like the wtccc data set in table and even larger numbers of permutations can be easily performed for smaller studies. permutation testing is particularly appealing because of its simplicity. recently, several more complex alternatives to permutation testing have been proposed. these methods can be useful, more computationally efficient alternatives to permutation testing in some situations. some methods for computing adjusted p-values exploit the fact that for many common statistical tests, the correlated tests have an asymptotic multivariate normal distribution under the null hypothesis of no trait-marker correlation. seaman and müller-myhsok have proposed estimating the asymptotic distribution and sampling directly from it, and conneely and boehnke have proposed estimating the asymptotic distribution and calculating probabilities under this distribution using numerical integration. either approach can be used to estimate the probability of observing a minimum p-value smaller than the observed minimum p-value. both approaches are particularly well-suited to situations where covariate data are available or multiple quantitative phenotypes are tested. when the asymptotic distribution is accurately estimated, these methods are shown to give accurate results for candidate gene studies. there are some limitations with these approaches that estimate the asymptotic multivariate normal distribution of the test statistics. these methods do not estimate significance levels for two-stage genotyping designs. a more severe restriction is that these methods are typically limited to several hundred correlated tests. seaman and müller-myhsok and conneely and boehnke suggest that the number of samples should be at least times the number of tests performed in order to accurately estimate the asymptotic multivariate normal distribution. so these methods cannot be directly applied to hundreds of thousands of single marker tests in a genome-wide association study. other alternatives to permutation testing are based on importance sampling. kimmel and shamir have proposed a method that uses importance sampling to accurately estimate extremely small multiple-testing adjusted p-values, and kimmel and colleagues have modified this method to work with data from a stratified population. decay of linkage disequilibrium with increasing genomic distance is exploited to further improve the computational efficiency of these methods. these importance sampling methods lack some of the features that are found in presto. the methods do not calculate significance for two-stage genotyping designs, and they do not calculate adjusted p-values for general order statistics. in the extension to stratified data, the association test statistic used in kimmel et al will have suboptimal power because it ignores the population structure of the data. the method of kimmel and colleagues can be modified to use a test statistic for stratified data, but this would dramatically increase the computation time because their method loops through all possible contingency tables for each sampled permutation, and the number of contingency tables consistent with a permutation increases exponentially with the number of population strata. methods for computing multiple-testing adjusted p-values that are based on asymptotic multivariate normal distributions or importance sampling, are more complex than permutation testing, and require the asymptotic approximations to be accurate. in addition, when testing a single binary trait, these alternative methods provide little or no decrease in computational time relative to permutation testing with presto, unless one is performing more than permutations.  presto is a flexible, platform-independent software package that determines multiple-testing adjusted statistical significance for large-scale genetic association studies by using permutation of the trait status. presto is faster than existing permutation testing software and can analyze a large genome-wide association study in approximately one hour of computing time. presto can be used with stratified data from multiple populations and with two-stage genotyping designs. presto can also report empirical null distributions for the top-ranked statistics so that statistical significance can be determined for any test statistic calculated in terms of order statistics. availability and requirements • project name: presto • project home page: • operating system: platform independent • programming language: java • other requirements: standard edition java runtime environment • license: freely available for academic and commercial use. 
presto is designed for case-control studies, but can also be applied to trio data if transmitted parental alleles are coded as case alleles and untransmitted parental alleles are coded as control alleles. presto has several unique features that are useful in a wide range of studies: it reports empirical null distributions for the top-ranked statistics, it performs user-specified combinations of allelic and genotypic tests, it performs stratified analysis when sampled individuals are from multiple populations and each individual's population of origin is specified, and it determines significance levels for one and two-stage genotyping designs. presto is a platform-independent software package that performs fast and flexible permutation testing for genetic association studies. large-scale genetic association studies can test hundreds of thousands of genetic markers for association with a trait. however, permutation testing for large-scale genetic association studies is computationally demanding and calls for optimized algorithms and software. presto is an order of magnitude faster than other existing permutation testing software, and can analyze a large genome-wide association study in approximately one hour of computing time. permutation testing is a standard statistical technique for determining statistical significance when performing multiple correlated tests for genetic association. presto is a new software package for genetic association studies that performs fast computation of multiple-testing adjusted p-values via permutation of the trait.
 large-scale genetic association studies can test hundreds of thousands of genetic markers for association with a trait. since the genetic markers may be correlated, a bonferroni correction is typically too stringent a correction for multiple testing. permutation testing is a standard statistical technique for determining statistical significance when performing multiple correlated tests for genetic association. however, permutation testing for large-scale genetic association studies is computationally demanding and calls for optimized algorithms and software. presto is a new software package for genetic association studies that performs fast computation of multiple-testing adjusted p-values via permutation of the trait.  presto is an order of magnitude faster than other existing permutation testing software, and can analyze a large genome-wide association study in approximately one hour of computing time. presto has several unique features that are useful in a wide range of studies: it reports empirical null distributions for the top-ranked statistics, it performs user-specified combinations of allelic and genotypic tests, it performs stratified analysis when sampled individuals are from multiple populations and each individual's population of origin is specified, and it determines significance levels for one and two-stage genotyping designs. presto is designed for case-control studies, but can also be applied to trio data if transmitted parental alleles are coded as case alleles and untransmitted parental alleles are coded as control alleles.  presto is a platform-independent software package that performs fast and flexible permutation testing for genetic association studies. the presto executable file, java source code, example data, and documentation are freely available at. 