## loading example gwaa.data in GenABEL
require(GenABEL)
data(ge03d2ex.clean)
## running multivariate GWAS for 3 traits: height, weight, bmi
loaded <- MultiLoad(gwaa.data = ge03d2ex.clean, trait.cols = c(5, 6, 8),
covariate.cols = c(2, 3))
## converting the same dataset into DatABEL format files
require(DatABEL)
write.table(phdata(ge03d2ex.clean), 'pheno.txt', col.names = TRUE, row.names = TRUE,
quote = FALSE, sep = '\t')
geno <- as.double(ge03d2ex.clean)
matrix2databel(geno, 'geno')
## running the multivariate GWAS again
loaded <- MultiLoad(phenofile = 'pheno.txt', genofile = 'geno', trait.cols = c(5, 6, 8),
covariate.cols = c(2, 3))
Run the code above in your browser using DataLab