Example command: Imputation with one unphased reference panel

Home
Example command
How to use example commands


Example command

IMPUTATION WITH ONE UNPHASED REFERENCE PANEL

It is not necessary for the reference panel to be phased: IMPUTE2 can do the phasing internally while accounting for the phase uncertainty. To use an unphased reference panel, simply replace the -h and -l files with a -g_ref file.

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 \
 -g_ref ./Example/example.chr22.reference.gens \
 -strand_g_ref ./Example/example.chr22.reference.strand \
 -g ./Example/example.chr22.study.gens \
 -strand_g ./Example/example.chr22.study.strand \
 -int 20.4e6 20.5e6 \
 -Ne 20000 \
 -o ./Example/example.chr22.one.unphased.impute2

Comments

  • As with any imputation analysis, it is important that all of your input files be aligned to the same allele coding at shared SNPs. In this example, we assume that both the -g_ref and -g files include SNPs that are not aligned to the '+' strand of the human genome reference sequence, so we use the -strand_g_ref and -strand_g options to bring them into alignment.

  • This procedure is not recommended for unphased reference panels that have high SNP density, such as those that result from resequencing studies of population samples. In that situation, there may be statistical convergence issues that could decrease the imputation quality. If you need advice on how to use that kind of reference dataset, please contact us.

  • 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.