data(miscEx)
if (FALSE) {
# impute missing genotypes
pheno<- pdatF8[!is.na(pdatF8$bwt) & !is.na(pdatF8$sex),]
ii<- match(rownames(pheno), rownames(gdatF8))
geno<- gdatF8[ii,]
ii<- match(rownames(pheno), rownames(gmF8$AA))
v<- list(A=gmF8$AA[ii,ii], D=gmF8$DD[ii,ii])
gdat.imp<- genoImpute(geno, gmap=gmapF8, step=Inf,
gr=8, na.str=NA)
# estimate variance components
o<- estVC(y=pheno$bwt, x=pheno$sex, v=v)
# genome scan
llk<- scanOne(y=pheno$bwt, x=pheno$sex, vc=o, gdat=gdat.imp)
# plotting
plot(llk, gmap=gmapF8) # gmap is needed
# plotting in another way
idx<- match(colnames(gdat.imp), gmapF8$snp)
tmp<- data.frame(chr=gmapF8$chr[idx],dist=gmapF8$dist[idx],y=llk$LRT)
plotit(tmp, main="Mapping Plot", xlab="Chromosome", ylab="LRT",
col=as.integer(tmp$ch)%%2+2,type="p")
}
Run the code above in your browser using DataLab