data(toyped)
x = linkdat(toyped, model=1)
genoDistr(x, id = 1)
m1 = rbind(c(1,1),c(1,0),c(0,0),c(0,0))
genoDistr(x, id = 3, partialmarker = m1)
m2 = rbind(c(0,0),c(0,0),c("A","B"),c("A","B"))
genoDistr(x, id = 1, partialmarker = m2)
# gives Mendelian error (correctly):
m3 = rbind(c(1,1),c(1,1),c(2,2),c(0,0))
genoDistr(x, id = 4, partialmarker = m3)
# X-linked example
data(Xped)
y = linkdat(Xped, model=4) #X-linked recessive model
# create empty marker, and then give individuals 5 and 15 genotype AA:
y = setMarkers(y, matrix(0, ncol=2, nrow=15))
y = modifyMarker(y, id=c(5, 15), alleles=c('A', 'A'))
genoDistr(y, id=13, partialmarker=1) #results: A - 0.8; B - 0.2
genoDistr(y, id=13, partialmarker=1, t=0) #results: A - 0.667; B - 0.333
Run the code above in your browser using DataLab