# NOT RUN {
A case where only male subjects can receive alleles
# }
# NOT RUN {
data(geneaJi)
genJi<-gen.genealogy(geneaJi)
onlyThroughMale<-matrix(c(c(1,0.5,0,0.5,0.25,0,0,0,0,1,1,1,1,0.75,0.5,1,0.5,0), rep(1,18)),
nrow=3, ncol=12)
gen.graph(genJi, indVarAffected=c(28,27,25,17,12,8,4,1), varAffected=c(28,27,25,17,12,8,4,1))
simu_1000a<-gen.simuSet(genJi, pro=c(1,28), ancestors=c(17,25), stateAncestors=c(1,1),
simulNo = 1000,probMatrix=onlyThroughMale)
# }
# NOT RUN {
Number of alleles received by probants
# }
# NOT RUN {
table(simu_1000a)
# }
# NOT RUN {
Number of alleles received by all probants at each simulation
# }
# NOT RUN {
table(colSums(simu_1000a))
# }
# NOT RUN {
Number of alleles received by each probant
# }
# NOT RUN {
table(simu_1000a[1,],simu_1000a[2,])
# }
# NOT RUN {
A case where subjects are limited to one copy compared to what is normally expected
# }
# NOT RUN {
max1Allreceived<-matrix(rep(c(1,0.5,0,0.5,0.25,0,0,0,0,1,1,1,1,1,1,1,1,1), 2) , nrow=3, ncol=12)
gen.graph(genJi)
simu_1000b<-gen.simuSet(genJi, pro=c(1,29), ancestors=25, stateAncestors=1, simulNo=10000,
probMatrix=max1Allreceived)
# }
# NOT RUN {
Normal case matrix not changed
# }
# NOT RUN {
simu_1000original<-gen.simuSet(genJi, pro=c(1,29), ancestors=25, stateAncestors=1, simulNo=10000)
# }
# NOT RUN {
Number of alleles received by each probant
# }
# NOT RUN {
table(simu_1000b)
table(simu_1000original)
# }
# NOT RUN {
Number of alleles received by all probants at each simulation
# }
# NOT RUN {
table(colSums(simu_1000b))
table(colSums(simu_1000original))
# }
# NOT RUN {
Number of alleles received by each probant
# }
# NOT RUN {
table(simu_1000b[1,],simu_1000b[2,])
table(simu_1000original[1,],simu_1000original[2,])
# }
Run the code above in your browser using DataLab