data(Pinf)
iPinf <- recode_polyploids(Pinf)
# Obtaining basic summaries. Note the heterozygosity measures.
summary(Pinf)
summary(iPinf)
library("ape")
# Removing missing data.
Pinf <- missingno(Pinf, "geno", cutoff = 0)
iPinf <- recode_polyploids(Pinf)
# Calculating Rogers' distance.
rog <- rogers.dist(Pinf)
irog <- rogers.dist(iPinf)
# We will now plot neighbor joining trees. Note the decreased distance in the
# original data.
plot(nj(rog), type = "unrooted", show.tip.label = FALSE)
add.scale.bar(lcol = "red")
plot(nj(irog), type = "unrooted", show.tip.label = FALSE)
add.scale.bar(lcol = "red")
Run the code above in your browser using DataLab