Reanalysis of the genome formula data with PERMANOVA. The script follows the method as presented in Boezen et al. 2023, as deposited in Zenodo.
Load the experimental data from Sicard et al. 2013 on FBNSV in different leaf levels in V. faba, as presented in Figure 3a.
# Load libraries
library(magrittr)
library(utils)
library(plyr)
library(dplyr)
library(vegan)
# Load data
setwd("C:/R_Data")
c.data <- read.csv("Dataset_3_FBNSV_Sicard_Fig_3A.csv") %>%
as.data.frame()
head(c.data, 20)
We analyze the data, chcecking for an effect of leaf level on the genome formula distance.
# No filtering of the data needed for this example, unless you want to perform
# pairwise comparisons.
c.data.f <- c.data
# c.data.f <- c.data %>%
# filter(Uni_Num %in% c(1, 4))
# Generate distances matrix and run PERMANOVA
set.seed(42)
dist.f <- vegdist(c.data.f[,3:10], method = "euclidean")
per.gf <- adonis2(formula = dist.f ~ Leaf, data = c.data.f, permutations = 10^4)
print(per.gf)
## Permutation test for adonis under reduced model
## Terms added sequentially (first to last)
## Permutation: free
## Number of permutations: 10000
##
## adonis2(formula = dist.f ~ Leaf, data = c.data.f, permutations = 10^4)
## Df SumOfSqs R2 F Pr(>F)
## Leaf 1 0.1352 0.05627 4.4715 0.0022 **
## Residual 75 2.2676 0.94373
## Total 76 2.4028 1.00000
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# Check for significant differences in spread between the groups, using a PERMDISP2 procedure
pd.gf <- betadisper(d = dist.f, group = c.data.f$Leaf, type = "median", bias.adjust = TRUE,
sqrt.dist = FALSE, add = FALSE)
print(pd.gf)
##
## Homogeneity of multivariate dispersions
##
## Call: betadisper(d = dist.f, group = c.data.f$Leaf, type = "median",
## bias.adjust = TRUE, sqrt.dist = FALSE, add = FALSE)
##
## No. of Positive Eigenvalues: 7
## No. of Negative Eigenvalues: 0
##
## Average distance to median:
## 1 2 3 4 5 6
## 0.2372 0.1918 0.1357 0.1206 0.1337 0.1269
##
## Eigenvalues for PCoA axes:
## PCoA1 PCoA2 PCoA3 PCoA4 PCoA5 PCoA6 PCoA7
## 1.108058 0.523281 0.407669 0.196424 0.145978 0.015884 0.005547
ph.pd.gf <- permutest(pd.gf, pairwise = TRUE, permutations = 10^4)
print(ph.pd.gf)
##
## Permutation test for homogeneity of multivariate dispersions
## Permutation: free
## Number of permutations: 10000
##
## Response: Distances
## Df Sum Sq Mean Sq F N.Perm Pr(>F)
## Groups 5 0.11066 0.0221318 3.2408 10000 0.009799 **
## Residuals 71 0.48487 0.0068291
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Pairwise comparisons:
## (Observed p-value below diagonal, permuted p-value above diagonal)
## 1 2 3 4 5 6
## 1 0.4669533 0.0307969 0.0073993 0.0288971 0.0063
## 2 0.4539824 0.1203880 0.0388961 0.1362864 0.0224
## 3 0.0367579 0.1246631 0.5677432 0.9474053 0.6887
## 4 0.0123825 0.0453685 0.5615553 0.6494351 0.7653
## 5 0.0335211 0.1450911 0.9468569 0.6448247 0.7904
## 6 0.0079656 0.0261693 0.6743487 0.7593113 0.7804101
p.adjust(ph.pd.gf$pairwise$permuted, method = "holm")
## 1-2 1-3 1-4 1-5 1-6 2-3 2-4
## 1.00000000 0.34676532 0.10358964 0.34676532 0.09449055 1.00000000 0.38896110
## 2-5 2-6 3-4 3-5 3-6 4-5 4-6
## 1.00000000 0.29117088 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000
## 5-6
## 1.00000000