data(fake.f2)
fake.f2 <- subset(fake.f2, chr=c(1, 13, "X"))
# impute gneotype data
fake.f2.impute <- sim.geno(fake.f2, step=5, n.draws=64)fake.f2.impute <- sim.geno(fake.f2, step=5, n.draws=8)
########################################
# one marker plots
########################################
### plot of genotype-specific phenotype means for 1 marker
mname <- find.marker(fake.f2, 1, 37) # marker D1M437
effectplot(fake.f2, pheno.col=1, mname1=mname)
### plot a pseudomarker
effectplot(fake.f2.impute, pheno.col=1, mname1=mname)
### plot a phenotype
# Plot of sex-specific phenotype means,
# note that "sex" must be a phenotype name here
effectplot(fake.f2, mname1="sex", geno1=c("F","M"))
# alternatively I can do it this way
sex <- fake.f2$pheno[,2]
effectplot(fake.f2, mname1="Sex", mark1=sex, geno1=c("F","M"))
########################################
# two markers plots
########################################
### plot two markers
# plot of genotype-specific phenotype means for 2 markers
mname1 <- find.marker(fake.f2, 1, 37) # marker D1M437
mname2 <- find.marker(fake.f2, 13, 24) # marker D13M254
effectplot(fake.f2, mname1=mname1, mname2=mname2)
### plot two pseudomarkers
pmname1 <- "c1.loc35"
pmname2 <- "c13.loc25"
effectplot(fake.f2.impute, mname1=pmname1, mname2=pmname2)
### plot one marker and one imputed pseudomarker
mark1 <- fake.f2.impute$geno[[1]]$draws[,11,]
effectplot(fake.f2, mname1="D1M437", mark1=mark1, mname2="D13M254")
### Plot of sex- and genotype-specific phenotype means
mname <- find.marker(fake.f2, 13, 24) # marker D13M254
# sex and a marker
effectplot(fake.f2, mname1=mname, mname2="Sex",
mark2=fake.f2$pheno$sex, geno2=c("F","M"))
# sex and a pseudomarker
effectplot(fake.f2.impute, mname1=mname, mname2="Sex",
mark2=fake.f2$pheno$sex, geno2=c("F","M"))
# Same as above, switch role of sex and the marker
# sex and marker
effectplot(fake.f2, mname1="Sex", mark1=fake.f2$pheno$sex,
geno1=c("F","M"), mname2=mname)
# sex and pseudomarker
effectplot(fake.f2.impute, mname1="Sex", mark1=fake.f2$pheno$sex,
geno1=c("F","M"), mname2=mname)
# X chromosome marker
mname <- find.marker(fake.f2, "X", 14) # marker DXM66
effectplot(fake.f2, mname1=mname)
# Two markers, including one on the X
mname1 <- find.marker(fake.f2, 13, 24) # marker D13M254
mname2 <- find.marker(fake.f2, "X", 14) # marker DXM66
effectplot(fake.f2, mname1=mname1, mname2=mname2)
Run the code above in your browser using DataLab