Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Combined Shannon and Observed ASV. An additional plot combing both Shannon’s index and Observed ASV indices has been included, to compare similarities and differences between these results. As each index uses different units, results for both have been normalised between 0 and 1.

  2. Kruskal-Wallis rank sum test is a rank-based nonparametric test that can be used to determine if there are statistically significant differences between two or more groups. This statistical analysis is provided for each plot, to estimate if there is a significant difference (q.value < 0.05) between all groups.

  3. Pairwise Wilcoxon rank sum test (AKA: Mann-Whitney test is the same as the Kruskal-Wallis test, but applied pairwise to each group (technically, The Kruskal-Wallis test is the generalization of the Wilcoxon rank sum test).

...

4a. Preparing your data

Import the samples table

When you ran your sequences through the ampliseq pipeline, you submitted the samples with a metadata file. This file contains information on your samples and variables. We need to import this metadata file to run our analysis on selected variables.

...

Code Block
ampvisdata <- amp_load(otutable = asv_table,
              metadata = samples_table)

...

4b. Choosing a categorical variable to analyse

In your metadata you'll usually have multiple variables. These need to be analysed individually, by selecting the variable in this section, then running the remaining analysis sections on this chosen variable. You can then re-run the analysis on another variable by returning to this section, changing the variable name, then running again the remaining analysis sections.

...

Code Block
ampvisdata$metadata[[group]] <- factor(ampvisdata$metadata[[group]], levels = lev)

...

4c. Rarefaction curve

This section is for plotting rarefaction curves for your samples, coloured by your chosen variable (if you want to change variables, go back and re-run section 4, choosing a different variable).

...

You can now find these files in your working directory (which you originally defined in the 'Setting up your analysis environment' section).

...

4d. Diversity index plots and statistics - single categorical variable

The overview section outlined (with links and references) the alpha diversity indices that can be examined in this Notebook.

...

Code Block
pdf_exp <- paste0("alpha_div_Shannon_obsASV_box_plot_", group, "_", subgroup "_samples.pdf")
ggsave(file = pdf_exp, device = "pdf", plot = p, width = 20, height = 20, units = "cm")

...

4e. Diversity index plots and statistics - multiple categorical variables

In the previous section you examined a single variable.

...

Code Block
colnames(samples_table)

...

4f. Diversity index plots and statistics - continuous variable Generalised linear model t value =

[ ]:

Code Block
round(glm_sum$coefficients[2,3], 4)

...