Recently Liess & Beketov, (2011) proposed a new method to analyze mesocosm data: SPEARmesocosm.
They classified species into ‘SPEciesAtRisk’ and ‘SPEcies not At Risk’ based on three biological traits:
- toxicological sensitivity to organic toxicants
- generation time
- the presence of aquatic stages during contamination
With this classification a SPEAR-value for each sample can be calculated as the relative abundance of sensitive species. Their tool to calculate SPEAR is freely available as web-application at http://www.systemecology.eu/SPEAR.
Here I will show how we can use this tool to analyze a mesocosm experiment:
As in the last post we first load the data and packages:
The SPEAR-calculator accepts only data in the long format, we can use melt() from the reshape 2 package to bring data from the wide into the long format:
SPEARmesocosm classifies species based on biological traits. Therefore we need complete taxa names. For ordinations like PRC it doesn´t matter how we name our species, but here the SPEAR algorithm matches the species names with a database.
Unfortunately the data available in vegan contains only abbreviated taxa names. I tried to recover the names from the abbreviations, but was not successful for all of the species. I made up a table (see my github repository for this blog) to replace the abbreviations with real taxa names:
Now the data is ready and we have to export it as Excel-file to use it with the SPEAR calculator.
We start the SPEAR-calculator, start a ‘new Mesocosm Study’ and import our data which is in stored spear_in.xlsx.
Then we must select the columns coding taxa, abundance, treatment, timing and replicates:
And that´s it: You can browse through the results in the calculator, but also export them to a excel-sheet. Since we want to make some nice plots (and perhaps some statistical tests) we export the results to our working directory and name the file ‘spear_out.xls’.
Having the data in R we can make some plots with ggplot2:
- SPEAR against time for all replicates:
- Hmm, so many lines… We can plot also only the mean Spear values per treatment and time
- Or, to get a plot similar to the Principle Response Curves: Plot the difference of treatments to the control
We see, that the graphs from SPEARmesocosm and Principle Response Curves look similar, although it must be noted that here I used only a subset of species (because i could not recover all species names).
The SPEARmesocosm-values could be further analysed with univariate methods, but I’ll skip that for now.
Next time I’ll analyze the same dataset using the mvabund-package.
Liess M and Beketov M (2011). “Traits And Stress: Keys to Identify Community Effects of Low Levels of Toxicants in Test Systems.” Ecotoxicology, 20. ISSN 0963-9292, http://dx.doi.org/10.1007/s10646-011-0689-y.