# Using a data set of the Aphanomyces eutieches root rot pathogen.
data(Aeut)
adist <- diss.dist(Aeut, percent = TRUE)
amsn <- poppr.msn(Aeut, adist, showplot = FALSE)
# Default
library("igraph") # To get all the layouts.
set.seed(500)
plot_poppr_msn(Aeut, amsn, gadj = 15, beforecut = TRUE)
# Removing link between populations (cutoff = 0.2) and labelling no individuals
set.seed(500)
plot_poppr_msn(Aeut, amsn, inds = "none", gadj = 15, beforecut = TRUE, cutoff = 0.2)
# Labelling individual #57 because it is an MLG that crosses populations
# Showing clusters of MLGS with at most 5% variation
# Notice that the Mt. Vernon population appears to be more clonal
set.seed(50)
plot_poppr_msn(Aeut, amsn, gadj = 15, cutoff = 0.05, inds = "57")
data(partial_clone)
pcmsn <- bruvo.msn(partial_clone, replen = rep(1, 10))
# Labelling the samples contained in multilocus genotype 9
plot_poppr_msn(partial_clone, pcmsn, palette = rainbow, inds = 9)
# Doing the same thing, but using one of the sample names as input.
plot_poppr_msn(partial_clone, pcmsn, palette = rainbow, inds = "sim 20")
# Note that this is case sensitive. Nothing is labeled.
plot_poppr_msn(partial_clone, pcmsn, palette = rainbow, inds = "Sim 20")
# Something pretty
data(microbov)
mdist <- diss.dist(microbov, percent = TRUE)
micmsn <- poppr.msn(microbov, mdist, showplot = FALSE)
plot_poppr_msn(microbov, micmsn, palette = "terrain.colors", inds = "n",
quantiles = FALSE)
plot_poppr_msn(microbov, micmsn, palette = "terrain.colors", inds = "n",
cutoff = 0.3, quantiles = FALSE)
### Utilizing vectors for palettes
data(Pram)
Pram_sub <- popsub(Pram, blacklist = c("Nursery_CA", "Nursery_OR"))
# Creating the network for the forest
min_span_net_sub <- bruvo.msn(Pram_sub, replen = other(Pram)$REPLEN,
add = TRUE, loss = TRUE, showplot = FALSE,
include.ties = TRUE)
# Creating the network with nurseries
min_span_net <- bruvo.msn(Pram, replen = other(Pram)$REPLEN,
add = TRUE, loss = TRUE, showplot = FALSE,
include.ties = TRUE)
# Only forest genotypes
set.seed(70)
plot_poppr_msn(Pram,
min_span_net_sub,
inds = "ALL",
mlg = TRUE,
gadj = 9,
nodebase = 1.75,
palette = other(Pram)$comparePal,
cutoff = NULL,
quantiles = FALSE,
beforecut = TRUE)
# With Nurseries
set.seed(70)
plot_poppr_msn(Pram,
min_span_net,
inds = "ALL",
mlg = TRUE,
gadj = 9,
nodebase = 1.75,
palette = other(Pram)$comparePal,
cutoff = NULL,
quantiles = FALSE,
beforecut = TRUE)
Run the code above in your browser using DataLab