library(GWASdata)
file <- system.file("extdata", "illumina_geno.gds", package="GWASdata")
gds <- GdsGenotypeReader(file)
data(illuminaScanADF)
genoData <- GenotypeData(gds, scanAnnot=illuminaScanADF)
# autosomes only, sexes combined (default)
res.chisq <- batchChisqTest(genoData, batchVar="plate")
res.chisq$mean.chisq
res.chisq$lambda
# X chromosome for females
res.chisq <- batchChisqTest(genoData, batchVar="status",
chrom.include=23, sex.include="F", return.by.snp=TRUE)
head(res.chisq$chisq)
# Fisher exact test of "status" on X chromosome for females
res.fisher <- batchFisherTest(genoData, batchVar="status",
chrom.include=23, sex.include="F", return.by.snp=TRUE)
qqPlot(res.fisher$pval)
close(genoData)
Run the code above in your browser using DataLab