Difference between revisions of "Minimac"
(→Questions and Comments)
|Line 29:||Line 29:|
== Questions and Comments ==
== Questions and Comments ==
Please contact Goncalo Abecasis or Christian Fuchsberger.
Please contact Goncalo Abecasisor Christian Fuchsberger.
= Getting Started =
= Getting Started =
Revision as of 04:05, 12 October 2010
These statistics refer to Intel X7460 CPU running at 2.66 GHz using 1 core and your mileage may vary; most modern CPUs should be no more than a few times faster (or slower) than that.
If you are estimating model parameters at the same time as imputing missing genotypes, you can account for the time needed for parameter estimation with the following formula:
In this updated formula, Nrounds represents the number of iterations used for parameter refinement and Nstates represents the maximum number of reference and target haplotypes considered for each update.
A full release of
minimac is expected here in October 2010. In the meantime, a binary only Linux version of minimac is available from here for those who are eager to try it out. If you use this beta version, please be sure to stop by the MaCH download page and fill out the registration form, so that we can let you know when an official release is available.
The current version of minimac comes in two flavours,
minimac-omp. The latter version uses the OpenMP protocol to support multi-threading, resulting in faster throughput.
Questions and Comments
Using minimac for genotype imputation involves two steps. First, you will have to estimate haplotypes for your entire sample -- this will be the more computationally demanding step. Once that is done, you will be ready to quickly impute missing genotypes using the reference panel of your choice.
Estimating Haplotypes for Your Sample
For the haplotyping step, we current recommend using MaCH with the --phase command line option. As input MaCH will need Merlin format pedigree and data files. All markers should be ordered according to their physical position and alleles should be labeled on the forward strand.
Preparing Your Data
We recommend that, if at all possible, you should phase your chromosomes according to NCBI build 37. Future releases of the 1000 Genomes Reference panel and other public sets of reference haplotypes are expected to use this genome build.
If figuring out position and strand for each marker seems like hard work, don't despair. For you, this should be the hardest bit of the entire process! For the computer, the fun is about to start.
A typical MaCH command line to estimate phased haplotypes might look like this:
mach1 -d sample.dat -p sample.ped --rounds 20 --states 200 --phase --interim 5 --compact
This will request that MaCH estimate haplotypes for your sample, using 20 iterations of its Markov sampler and conditioning each update on up to 200 haplotypes. A summary description of these parameters follows (but for a more complete description, you should go to the MaCH website):
||Data file in Merlin format. Markers should be listed according to their order along the chromosome.|
||Pedigree file in Merlin format. Alleles should be labeled on the forward strand.|
||Number of haplotypes to consider during each update. Increasing this value will typically lead to better haplotypes, but can dramatically increase computing time and memory use. A value of 100 - 400 is typical.|
|| Iterations of the Markov sampler to use for haplotyping. Typically, using 20 - 100 rounds should give good results. To obtain better results, it is usually better to increase the |
||Request that intermediate results should be saved to disk periodically. These will facilitate analyses in case a run doesn't complete.|
||Tell MaCH to estimate phased haplotypes for each individual.|
||Reduce memory use at the cost of approximately doubling runtime. This option is recommended for most GWAS scale datasets and computing platforms.|
Imputation into Phased Haplotypes
Imputing genotypes using minimac is an easy straightforward process: after selecting a set of reference haplotypes, plugging-in the target haplotypes from the previous step and setting the number of rounds to use for the model parameter estimation, imputation should proceed rapidly.
A typical minimac command line might look like this:
minimac --refHaps ref.hap.gz --refSnps ref.snps.gz --haps target.hap.gz --snps target.snps.gz --rounds 5 --states 200 --prefix results
A detailed description of all minimac options is available elsewhere. Here is a brief description of the above parameters:
||List of SNPs in the reference panel|
||Reference haplotypes (e.g. from MaCH download page)|
||SNPs in phased haplotypes. These should largely be a subset of the SNPs in the reference panel.|
||Phased haplotypes where missing genotypes will be imputed.|
||Rounds of optimization for model parameters, which describe population recombination rates and per SNP error rates.|
||Maximum number of reference (or target) haplotypes to examined during parameter optimization.|
||Optionally, a string that is used to help generate output file names.|