#
# bi-allelic autosomal
#
x1 <- c(AA=298,AB=489,BB=213)
if (FALSE) {
out <- HWPerm.mult(x1)
}
#
# bi-allelic X-chromosomal
#
x2.m <- c(A=39, B=21)
x2.f <- toTriangular(c(AA=28, AB=30, BB=8))
if (FALSE) {
out <- HWPerm.mult(x2.m,x2.f)
}
#
# autosomal k alleles not accounting for gender
#
x3 <- c(AA=12,AB=19,AC=13,BB=7,BC=5,CC=0)
x3 <- toTriangular(x3)
if (FALSE) {
out <- HWPerm.mult(x3)
}
#
# X-chromosomal k alleles
#
x4.m <- c(A=15,B=17,C=24)
x4.f <- toTriangular(c(AA=4,AB=2,AC=13,BB=6,BC=19,CC=4))
if (FALSE) {
out <- HWPerm.mult(x4.m,x4.f)
}
#
# Autosomal k alleles accounting for gender
#
x5.m <- toTriangular(c(AA=12,AB=19,AC=13,BB=7,BC=5,CC=0))
x5.f <- toTriangular(c(AA=8,AB=12,AC=13,BB=8,BC=7,CC=0))
if (FALSE) {
out <- HWPerm.mult(x5.m,x5.f)
}
#
# Autosomal STR with multipe alleles
#
data(NistSTRs)
A1 <- NistSTRs[,1]
A2 <- NistSTRs[,2]
GenotypeCounts <- AllelesToTriangular(A1,A2)
print(GenotypeCounts)
if (FALSE) {
out <- HWPerm.mult(GenotypeCounts)
}
Run the code above in your browser using DataLab