*Non parametric multivariate statistical test. Use to compare*
*groups... test the H0 hypothesis that the groups have similar centroid and/or dispersion.*
*The similarity is based on a chosen distance measure!!PERMANOVA tests whether distance differ between groups. For your information: ANOSIM tests whether distances between groups are greater than within groups. Regarding MANOVA, its correct application needs normal and homocedastic data, number of variables be much smaller than the number of individuals/sites, rarely the case for ecological data. To extend the application to this data PERMANOVA was developped, is insensitive to many zero, you need balanced groups*. *Other good test : Mantel test.*
- #### **Show coefficients for the top taxa separating the two groups**
```{r}
coef <- coefficients(permanova)["Treatment1",]
top.coef <- coef[rev(order(abs(coef)))[1:20]]
par(mar = c(3, 14, 2, 1))
barplot(sort(top.coef), horiz = T, las = 1, main = "Top taxa")
```
- ### **<span style="color: steelblue;">B- Differential Abundance with Deseq2</span>**
- #### **Transformation into deseq object**
*Transformation from phyloseq to deseq object with the column to compare: here, column "Treatment" has two values North and South: you compare South and North groups for ASV abundance*
*Keep in mind that you give non normalized data, as deseq2 has it own normalization process!!!*
```{r}
#Do it using genus abundance to compare to PERMANOVA results
G1=aggregate_taxa(Final1,'Genus')
```
```{r}
#Tranformation in DeseqDataSet
dds = phyloseq_to_deseq2(G1, ~Treatment)
```
```{r}
#Data transformation, correction of library size (size factor)
dsf = DESeq(dds, fitType="local")
```
```{r}
#Result
res <- results(dsf)
res
```
- #### **Order by p-values adjusted (Benjamini-hochberg)**