## loading example discovery sample gwaa.data in GenABEL
data(ge03d2)
## running multivariate GWAS for 3 traits: height, weight, bmi
res <- Multivariate(gwaa.data = ge03d2, trait.cols = c(5, 6, 8),
covariate.cols = c(2, 3))
## extracting 5 significant variants
(top <- res[order(res[,'P.F']),][2:6,])
snps <- rownames(top)
training.geno <- as.double(gtdata(ge03d2)[,snps])
## loading example test sample gwaa.data in GenABEL
data(ge03d2c)
## extracting genotypes of the 5 variants
test.geno <- as.double(gtdata(ge03d2c)[,snps])
## try replication
rep <- MultiRep(training.pheno = phdata(ge03d2), test.pheno = phdata(ge03d2c),
pheno.names = c('height', 'weight', 'bmi'),
training.geno = training.geno, test.geno = test.geno)
Run the code above in your browser using DataLab