# A sib-pair pedigree
x = nuclearPed(children = c("bro1", "bro2"))
# Two SNP markers; first brother homozygous for the `1` allele
SNP1 = SNP2 = marker(x, bro1 = "1/1", afreq = c("1" = 0.5, "2" = 0.5))
plot(x, marker = list(SNP1, SNP2))
# Genotype distribution for the brother depends on linkage
twoMarkerDistribution(x, id = "bro2", SNP1, SNP2, rho = 0)
twoMarkerDistribution(x, id = "bro2", SNP1, SNP2, rho = 0.5)
# X-linked
chrom(SNP1) = chrom(SNP2) = "X"
plot(x, marker = list(SNP1, SNP2))
twoMarkerDistribution(x, id = "bro2", SNP1, SNP2, rho = 0)
twoMarkerDistribution(x, id = "bro2", SNP1, SNP2, rho = 0.5)
Run the code above in your browser using DataLab