library(GWASdata)
data(illuminaScanADF)
scanAnnot <- illuminaScanADF
# generate trio list
men.list <- mendelList(scanAnnot$family, scanAnnot$subjectID,
scanAnnot$father, scanAnnot$mother, scanAnnot$sex,
scanAnnot$scanID)
# create genoData object
gdsfile <- system.file("extdata", "illumina_geno.gds", package="GWASdata")
gds <- GdsGenotypeReader(gdsfile)
genoData <- GenotypeData(gds, scanAnnot=scanAnnot)
# Run!
R <- mendelErr(genoData, men.list, error.by.snp.trio = TRUE)
names(R)
# [1] "trios" "all.trios" "snp"
names(R$trios)
# [1] "fam.id" "child.id" "Men.err.cnt" "Men.cnt" "mtDNA.err"
# [6] "mtDNA.cnt" "chr1" "chr2" "chr3" "chr4"
# [11] "chr5" "chr6" "chr7" "chr8" "chr9"
# [16] "chr10" "chr11" "chr12" "chr13" "chr14"
# [21] "chr15" "chr16" "chr17" "chr18" "chr19"
# [26] "chr20" "chr21" "chr22" "chrX" "chrXY"
# [31] "chrY"
# Mendelian error rate = Men.err.cnt / Men.cnt
data.frame(fam.id = R$trios$fam.id, child.id = R$trios$child.id,
Mendel.err.rate = R$trios$Men.err.cnt / R$trios$Men.cnt)
names(R$snp)
summary(R$snp$check.cnt)
# summary Mendelian error for first family
summary(R$snp[[1]])
close(genoData)
Run the code above in your browser using DataLab