7/8/2023 0 Comments 16s rrna sequence analysis![]() Kable(df, caption="number of genes differentially expressed at p < 0.05") number of genes differentially expressed at p < 0.05 Number.DEĬol.annotation <- ame(condition=metadata$condition) # Subset for genes that are differentially regulated The number of significantly differentially abundant ASVs at an adjusted p-value < 0.05 are provided in the table at the top of this section. We plot a heatmap of differentially abundant ASVs in order to ge a feel for the conditions where differences are observed. This takes all four levels in the factor condition and looks for differentially abundant features across all groups simultaneously. Significantly differentially abundant ASVs have been called using the likelihood ratio test (LRT) implementeed in DESeq2. There is a significant effect of DSS treatment as suspected and a non-sigificant effect of genotype on microbial composition. Perm1 <- adonis(t(asv.relab) ~ Phenotype + Genotype, method="bray", data=metadata, permutations=1000) Below is a table of the results using adonis with 1000 permutations. We can formally test this using a PERMANOVA test that is implemented using the adonis function in the R package vegan. There is a clear change in microbial composition according to DSS treatment and no visual evidence for an association with genotype. P9 <- p8 + ggtitle("Bray-curtis ordination plot") P8 <- p7 + scale_colour_manual(values=lours) P6 <- plot_ordination(dat.relab, dat.mds, color="condition") # Get dissimilarity - Bray-Curtis in this caseĭat.dissimilarity <- phyloseq::distance(dat.relab, method="bray")ĭat.mds <- ordinate(dat.relab, "MDS", distance=dat.dissimilarity) # Remake phyloseq object with relative abundancesĭat.relab <- otu_table(asv.relab, taxa_are_rows=TRUE)ĭat.relab <- merge_phyloseq(dat.relab, sample.data) The ASV counts are converted to relative abundances and bray-curtis dissimilarity is calculated using the phyloseq package. It is clear that DSS induces a reduction in Shannon diversity regardless of genotype. The analyses above indicate that there is a significant difference in Shannon diversity between the groups. To.test <- ame(alpha.diversity=metadata$shannon, # Create data frame that can be used as input to the kruskall wallis test P5 <- p4 + scale_colour_manual(values=lours) P1 <- ggplot(metadata, aes(x=condition, y=shannon, group=condition, colour=condition)) Metadata$condition <- factor(metadata$condition, levels=c("WT:water", "WT:DSS", "MMP-9KO:water", "MMP-9KO:DSS")) # Make sure the plot orders the way that we want # Add Shannon diversity to metadata as is easier to plot this way Richness <- estimate_richness(dat, measures=c("Shannon")) # Here we use phyloseq.ĭat <- otu_table(asvs, taxa_are_rows=TRUE) ![]() ![]() The Kruskal-Wallis test is used to determine statistical significance of any difference. Here we asses whether there are any differences between the experimental groups in terms of alpha diversity (within-sample diversity) using the Shannon diversity index. In this dataset it is already fairly clear that there are differences in DSS treated mice in both the mmp-9 KO and WT mice. Grid.arrange(distribution, relab.bar, layout_matrix=hlay)Īs expected there are many ASVs at low abundance and few that make up the majority of the community. Relab.bar <- plotBar(toplot) + scale_fill_manual(values=bar.colors) Toplot <- toplotīar.colors <- brewer.pal(nrow(toplot), "Set3") # Add the condition for visualisation purposesĬolnames(toplot) <- paste0(metadata$condition, "_", colnames(toplot)) ![]() All of the rest of the ASVs are lumped into the “other” category. For the purposes of the second plot we are plotting the ASVs that are present at an abundance pf > 5% in at least 5 samples. We look at the average (across samples) relative abundance distribution of ASVs and the ASV/taxonomic distribution across individual samples. First we assess the relative abundance of the ASVs along with their taxonomic assignments.
0 Comments
Leave a Reply. |