Example command: Imputation with two phased reference panels

Home
Example command
How to use example commands


Example command

IMPUTATION WITH TWO PHASED REFERENCE PANELS

It is sometimes helpful to use multiple reference panels to impute genotypes in a single study. For example, we previously recommended combining reference haplotypes from the 1,000 Genomes Pilot Project and HapMap 3: the first set provided extensive coverage of polymorphisms in the genome, while the second set provided greater sample size at a subset of SNPs. We no longer recommend that you use this hybrid reference panel because the 1,000 Genomes Project has generated even richer reference sets (which you can download here), but some investigators may have additional reference data that could be used in this way.

The following command shows how to run this kind of analysis with IMPUTE2, using the example data that come with the program download:

./impute2 \
 -m ./Example/example.chr22.map \
 -h ./Example/example.chr22.1kG.haps \
    ./Example/example.chr22.hm3.haps \
 -l ./Example/example.chr22.1kG.legend \
    ./Example/example.chr22.hm3.legend \
 -g ./Example/example.chr22.study.gens \
 -strand_g ./Example/example.chr22.study.strand \
 -int 20.4e6 20.5e6 \
 -Ne 20000 \
 -o ./Example/example.chr22.two.phased.impute2

Comments

  • This is a somewhat complicated scenario, and some restrictions are necessary to make sure the statistical machinery will produce good results. Ideally, one reference panel should contain a subset of the SNPs typed in the other reference panel, and the study dataset should contain a subset of the SNPs typed in both reference panels. If your dataset deviates substantially from these conditions, you may obtain sub-optimal imputation accuracy. Please feel free to contact us if you want advice on whether this scheme will work with your dataset.

  • Assuming the conditions described above are nearly satisfied, the reference panel with a larger number of SNPs should always come first on the command line. In this example, there are more SNPs in the 1,000 Genomes ("1kG") panel than in the HapMap 3 ("hm3") panel, so the 1,000 Genomes files are listed first after the -h and -l arguments.

  • Here we have used the -strand_g option to provide a strand file to the program. This file tells IMPUTE2 how to align the allele coding between the study genotypes (-g file) and the reference haplotypes (-h and -l files; assumed to be aligned to the '+' strand of the human genome reference sequence). You must always align the allele codings across your input datasets, either before running IMPUTE2 or during a run with the options described here.

  • This example tells the program to produce results for a 100 kb region (positions 20,400,000-20,500,000) on a single chromosome (IMPUTE2 assumes there is only one chromosome per input file, and that all input files in a single run come from the same chromosome). Applying the program to a much larger region—say, a whole chromosome or the whole genome—requires running many such jobs with different values of the -int parameter, usually in parallel on a computing cluster. For more details about how to do this, see here.


How to use example commands

All of the data files in the example command above are included in the Example/ directory that comes with the IMPUTE2 software download. You should run the command from the main download directory, which is the one that contains the impute2 executable. For example, if you just downloaded a software package named impute_v2.X.Y_i386.tgz and unpacked it according to the directions here, you can reach the appropriate directory by typing "cd impute_v2.X.Y_i386/" on the command line.

Once you have found the right directory, you should be able to run the example command by entering it into a Unix-style terminal window. Depending on the settings of your computer, this may be as simple as highlighting the command text in your web browser, using the browser's Copy command, and then using the Paste command in your terminal window. (You may then need to hit 'enter' to start the run.)

Note that most lines in the example command end with the '\' character. This is not actually part of the command; it is just a shorthand notation that means "keep reading the next line as part of a single command." We use this notation to split the command over multiple lines so it is easier to read. This is a valid way to enter commands in a Unix-style terminal window, but it would be equivalent to put all of the arguments on a single line, separated by spaces.

You do not have to run IMPUTE2 exactly as in the example. Some of the arguments shown here are optional, and there are many other options that could be added to modify the behavior of the program. For a full list of available options, see here.