IMPUTATION WITH ONE PHASED REFERENCE PANEL (CHROMOSOME X)
This example provides a twist on the common scenario of imputing untyped SNPs in a study dataset from a panel of reference haplotypes. Here, we want to perform the analysis on chromosome X, which requires special treatment due to the hemizygosity of males. (This example and the files in our download packages focus on the non-pseudoautosomal part of chromosome X.)
The following command shows how to run this kind of analysis with IMPUTE2, using the example data that come with the program download:
-m ./Example/chrX/example.chrX.map \
-h ./Example/chrX/example.chrX.reference.hap \
-l ./Example/chrX/example.chrX.reference.legend \
-g ./Example/chrX/example.chrX.study.gen \
-sample_g ./Example/chrX/example.chrX.study.sample \
-int 10.3e6 10.7e6 \
-Ne 20000 \
The -chrX flag is essential because it tells IMPUTE2 to expect the special file formatting conventions used for chromosome X data.
Whenever you analyze data on chromosome X, you must also provide a -sample_g file so that the program knows which individuals are males and which are females. You can learn about the specific requirements of this file here.
There is no need to use a different -Ne value on chromosome X than you would on the autosomes; the -chrX flag tells IMPUTE2 to automatically reduce the value by 25%, which changes the parameters of the haplotype copying model.
Like the input files, the IMPUTE2 output files from chromosome X analyses should be interpreted according to these conventions.
This example tells the program to produce results for a 400 kb region (positions 10,300,000-10,700,000) on chromosome X. Applying the program to the entire chromosome requires running several 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.
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.
How to use example commands
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.