Putting it all together

This section is put at the beginning to both provide a quick reference to remind the user of the commands to type and to provide an introduction to what will come in later sections. Unless you are already familiar QMS2 this section will probably not be enough to get the data analysis started.

Example 2-1. What to type

$ gunzip -c qms2-0.07.tar.gz | tar -xvf - (1)
qms2/qms2.sas
qms2/ghimport.sas
qms2/pre-sas.sh
$ cd qms2
$ mv dump.ibd dump.ibd.old (2)
$ gh2 < my_genehunter.in
analyzing pedigree 649... (3)
using non-originals:  3 4 5 6

analyzing pedigree 650...
using non-originals:  3 4 5 6

npl:6> file to store IBD distribution [ibd_dist.out]: 
npl:7> 
        ...goodbye...
$ pre-sas.sh dump.ibd
Converting "dump.ibd" to "dump-sas.ibd"...done.
$ sas myanalyzer.sas
$ less myanalyzer.log (4) (5)
$ less myanalyzer.lst (6)
$ gv DF_Augmented.eps & (7)
$ gv DeFries-Fulker.eps &
$ gv Haseman-Elston.eps &
$ gv New-HE.eps &
	
(1)
In this example the shell prompt is represented by "$", so any lines where the user types are preceded by a $.
(2)
When redirecting commands into Genehunter 2 (as is done on the next line), Genehunter 2 will not overwrite an existing output file, so any existing file needs to be moved out of the way.
(3)
Genehunter 2 will produce many more lines of output, but only the last few lines are shown here.
(4)
less is a pager (a program which displays a text file on the screen). There is no particular reason to use less, other than that it is a very good pager, more, a favorite editor, or any other program that allows you to view text could be substituted here.
(5)
The log should be checked to make sure that the SAS Software ran correctly. Searching the log for the string error will show any problems which prevented SAS Software from completing the script.
(6)
The output from the SAS Software will be saved into a lst file. Viewing the file will show the results of the analyses for each model.
(7)
gv will display the PostScript plots on the screen. gv is a front end to Ghostscript, a PostScript interpreter. The "&" causes the program to be run in the background, returning a prompt immediately.

Example 2-2. my_genehunter.in

	  disp score off
	  load mark linkage.dat
	  increment distance 2
	  scan ped genehunter.ped
	  dump ibd
	  dump.ibd
	  quit
	

Example 2-3. myanalyzer.sas

	  /* Tell SAS to look in the current directory for any macros */
	  options mautosource sasautos=('.');

	  /* read in data files */
	  %ghimport(ibdfile=dump-sas.ibd,
	            phenfile=genehunter.ped,
	            markers=10,
	            missing=-99);

	  /* analyze the imported data and produce plots */
	  %qms2(infce=1,
	        plot=1);

	  /* print out the results of the analysis */
	  proc print data=stats;

	  /* print out the influence statistics */
	  proc print data=infce