SSupdate - Update the the sum and sum of squares for the bootstrap
SSupdate [ -l lrcol ] [ -a additive ] [ -d dominance ] [ -I hypothesis ] [ -f SSfile ] [ -h ] [ -c ] < input > output
SSupdate reads from the standard input and writes to the standard output. It can do one of two things. The first is to initialize a file of sums and sums of squares in the Ziboot.out format from a Zmapqtl.out file. The second is to read the results of a run of Zmapqtl and the current Ziboot.out file and update the results. It is a Perl script meant to be run in a loop with Prune and Zmapqtl.
This Perl program was meant to be run in a shell script. Here is an example of a c shell program that allows calculate the sum and sum of squares for the likelihood ratio and additive effect in a bootstrap experiment.
#!/bin/csh
# Bootstrap
# Copyright (C) 2000 Christopher J. Basten
# Usage governed by the terms of the
# GNU General Public License, version 2 or higher
# See the file COPYING in this directory
#
# This file was meant as an example. You will need to edit it
# to work on your particular system with your data files.
#
# Start by setting the variables needed.
#
set stem=corn # filename stem
set hypo=1 # hypothesis for SSupdate
set model=3 # analysis model
set reps=1000 # number of bootstraps
set email=basten\@statgen.ncsu.edu # email address for notice
set templog=temp.log # temporary log file
set qbin=/usr/local/bin # where are the QTL Cart binaries
set bin=/usr/bin # where are the system programs
#
$bin/rm -f $templog
echo "Bootstrap experiment started " > $templog
$bin/date >> $templog
$bin/echo "Stem: " $stem >> $templog
$bin/echo "Model: " $model >> $templog
$bin/echo "Reps: " $reps >> $templog
$bin/echo "Email: " $email >> $templog
$bin/mv $stem.log $stem.logsave
$bin/rm -f $stem.z${model}a
$qbin/SSupdate -I $hypo < $stem.z > $stem.z$model.boot
$bin/mv $stem.z $stem.zsave
set i=1
while ( $i <= $reps )
$qbin/Prune -A -V -i $stem.cro -b 1 >>& $templog
$bin/nice $qbin/Zmapqtl -A -V -M $model -i $stem.crb >>& $templog
$qbin/SSupdate -I $hypo -f $stem.z$model.boot < $stem.z > $stem.z$model.new
$bin/mv $stem.z$model.new $stem.z$model.boot
$bin/rm $stem.z
@ i++
end
$qbin/SSupdate -I $hypo -c -f $stem.z$model.boot > $stem.z$model.booted
$bin/mv $stem.logsave $stem.log
$bin/mv $stem.zsave $stem.z
$bin/echo "Bootstrap experiment ended " >> $templog
$bin/date >> $templog
/usr/ucb/mail $email < $templog
Suppose you had a data set corn.cro and a map file corn.map. To use the above shell script, create a directory called cornboot and copy the two files into it. Run Qstats on the files to initialize the qtlcart.rc file, and SRmapqtl to rank a set of markers for use with composite interval mapping. Make sure that the QTL Cartographer programs are installed in the /usr/local/bin subdirectory (or change the qbin line above). Run the bootstrap with the following command:
% Bootstrap &
The script will email you a message when it is complete. The example above uses interval mapping and does 1,000 bootstraps.
Note that the above example uses -I 1 for the SSupdate line in the loop (this is set with the set hypo=1 line in the script). This indicates that the dataset are the result of a backcross or recombinant inbred line. If you want to use a different column of likelihood ratios, you can change that option. You could create multiple files of the format Ziboot.out and collect the appropriate sums and sums of squares from different hypothesis tests by having multiple instances of SSupdate in the loop.
Using the -I option is an easier way to set the columns from the Zmapqtl.out file that you want to process. The following values are valid:
Recall that when you have two marker classes, there are two hypotheses:
In contrast, when you have three marker classes, then you have four hypotheses:
Zmapqtl(1), Prune(1), Qstats(1), SRmapqtl(1)
In general, it is best to contact us via email (basten@statgen.ncsu.edu)
Christopher J. Basten, B. S. Weir and Z.-B. Zeng
Department of Statistics, North Carolina State University
Raleigh, NC 27695-8203, USA
Phone: (919)515-1934