This command reads outputs from hap session that uses multiple imputations, i.e. -mi\# option. To simplify matters it assumes -ss option is specified together with -mi option there.
This is a very naive version of MIANALYZE, but can produce results for PROC MIANALYZE of SAS
mia(hapfile,assfile,miafile,so,ns,mi,allsnps,sas)
hap haplotype output file name
hap assignment output file name
mia output file name
to generate results according to subject order
do not sort in subject order
number of multiple imputations used in hap
all loci are SNPs
produce SAS data step program
The returned value is a list containing:
It simply extracts outputs from hap
Zhao JH and W Qian (2003) Association analysis of unrelated individuals using polymorphic genetic markers. RSS 2003, Hassalt, Belgium
Clayton DG (2001) SNPHAP. http://www-gene.cimr.cam.ac.uk/clayton/software.
# NOT RUN {
# 4 SNP example, to generate hap.out and assign.out alone
data(fsnps)
hap(id=fsnps[,1],data=fsnps[,3:10],nloci=4)
# to generate results of imputations
control <- hap.control(ss=1,mi=5)
hap(id=fsnps[,1],data=fsnps[,3:10],nloci=4,control=control)
# to extract information from the second run above
mia(so=1,ns=1,mi=5)
file.show("mia.out")
## commands to check out where the output files are as follows:
## Windows
# system("command.com")
## Unix
# system("csh")
# }
Run the code above in your browser using DataLab