-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d135c6d
commit 51c94f7
Showing
1 changed file
with
40 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
--- | ||
title: "Line P Pigments" | ||
title: "Line P Pigment Data Analysis" | ||
author: "Colleen Kellogg, Hakai Institute" | ||
output: html_document | ||
output: | ||
rmarkdown::html_document: | ||
theme: lumen | ||
toc: true | ||
toc_float: true | ||
--- | ||
|
||
```{r setup, include=FALSE} | ||
|
@@ -20,23 +24,10 @@ library(ggfortify) | |
``` | ||
|
||
### Questions we are asking of the dataset: | ||
|
||
#### There are three oceanic states we are considering in this analysis. | ||
1. Non-marine heatwave [before 2015, 2016-May 2018] | ||
2. MHW1 (high particles). 2015 | ||
3. MHW2 (high particles). March-August 2019 (with moderate heatwaves beginning in June 2018 but most severe was in July-Sept 2019) | ||
|
||
#### Particle dynamics differences: | ||
1. first MHW, high export belonged to particles exported during Spring, then export pulses along the year until early fall [2015] | ||
2. second MHW, export was shorter and more intense (observe the z-axis from the plot above and below), with most of export happening during spring to early summer. [2019] | ||
|
||
#### We are using 2 types of biological data: HPLC pigments and metabarcoding (16S rRNA gene and 18S rRNA gene amplicon sequencing) data. | ||
|
||
This file was used for the analysis of the HPLC pigment data | ||
|
||
### Pigment Data | ||
This data is derived from HPLC pigment data generated by Angelica Peña ([email protected]) at Fisheries and Oceans Canada. Pigment concentrations were passed through CHEMTAX, a program used to predict phytoplankton functional groups present based on ratios of pigments present in a water sample. | ||
#### Pigment Data | ||
This data analyzed here is derived from HPLC pigment data generated by Angelica Peña ([email protected]) at Fisheries and Oceans Canada. Pigment concentrations were passed through CHEMTAX, a program used to predict phytoplankton functional groups present based on ratios of pigments present in a water sample. | ||
|
||
```{R load hplc data, warning = FALSE} | ||
linep20_hplc0 <-tibble(read.csv("LineP-HPLC-data_wP20.csv", header = TRUE)) | ||
|
@@ -71,7 +62,29 @@ tchla_ave_no2019<-linep20_hplc_long %>% | |
filter(Year != "2019") %>% | ||
group_by(Phytoplankton_Group, Month) %>% | ||
summarise(mean = mean(Concentration, na.rm=TRUE)) | ||
``` | ||
|
||
### PERMANOVA to examine dataset for station and month differences | ||
|
||
```{R permanovas, warning = FALSE} | ||
#PERMANOVA to see if there a significant differences in pigment among stations | ||
linep20_hplc_nm<-na.omit(linep20_hplc) %>% mutate(SampleID = paste(Station, Year, Month, sep = '_')) | ||
adonis2(linep20_hplc_nm[7:13] ~ Station, data = linep20_hplc_nm) #R2 = 0.01082, p = 0.99 | ||
adonis2(linep20_hplc_nm[7:13] ~ Month, data = linep20_hplc_nm) #R2 = 0.13017, p = 0.001 | ||
adonis2(linep20_hplc_nm[7:13] ~ Month*Station, data = linep20_hplc_nm) #R2 = 0.17468, p = 0.001 | ||
#significant differences by month (and month*station), but not by station alone | ||
``` | ||
|
||
|
||
### Calculate phytoplankton group averages and plot | ||
We are averaging the phytoplankton groups across the P20-P26 transect since (1) there is no significant difference by station and (2) the argo floats were moving throughout this whole region, generating a regional dataset (akin to a pigment dataset average) | ||
|
||
```{R group averages, warning = FALSE} | ||
#### phyto group averages for plotting #### | ||
hplc_ave<-linep20_hplc_long %>% | ||
|
@@ -131,6 +144,8 @@ hplcp20_rel + annotate("rect", xmin = 12.5, xmax = 15.5, ymin =0, ymax = 1.15, a | |
``` | ||
|
||
### Ordination of pigment data | ||
|
||
```{R HPLC ordinations and multi-panel figure, warning = FALSE} | ||
#ordination | ||
|
@@ -180,10 +195,18 @@ hplc_pca_legend<-as_ggplot(hplc_pca_leg) | |
mhw_hplc_pca_nolgnd<-autoplot(res.pca, data = na.omit(linep20_hplc), colour = 'Year', shape = "Season", loadings = TRUE, loadings.label = TRUE, loadings.color = "black", loadings.label.color = "black", size = 3,loadings.label.repel = TRUE) + theme_bw() + scale_color_manual(values = MHWcols_full_BGCmatch_pigs) + theme(axis.text.x = element_text(size = 8),axis.text.y = element_text(size = 8), axis.title.x = element_text(size = 10), axis.title.y = element_text(size = 10), legend.position = "NULL") | ||
mhw_hplc_pca_nolgnd | ||
ord_side <- plot_grid(mhw_hplc_pca_nolgnd, NULL, hplc_pca_legend, nrow = 3, rel_heights = c(1,0.05,0.2), labels=c("C",""), label_size = 10, align = "v") | ||
ord_side | ||
``` | ||
|
||
### Create bar graphs + ordination figure panel for manuscript | ||
|
||
```{R figure panel for manuscript, warning = FALSE} | ||
#now attach ordination and transect lines with the HPLC bar plots - rectangles | ||
hplc_avebars_ord<-plot_grid(hplc_bars_both, NULL, ord_side, ncol=3, rel_widths = c(1.5,0.05,1), align = "v") | ||
|
@@ -205,16 +228,4 @@ hplc_avebars_ord_line | |
``` | ||
|
||
```{R permanovas, warning = FALSE} | ||
|
||
#PERMANOVA to see if there a significant differences in pigment among stations | ||
linep20_hplc_nm<-na.omit(linep20_hplc) %>% mutate(SampleID = paste(Station, Year, Month, sep = '_')) | ||
adonis2(linep20_hplc_nm[7:13] ~ Station, data = linep20_hplc_nm) #R2 = 0.01082, p = 0.99 | ||
adonis2(linep20_hplc_nm[7:13] ~ Month, data = linep20_hplc_nm) #R2 = 0.13017, p = 0.001 | ||
adonis2(linep20_hplc_nm[7:13] ~ Month*Station, data = linep20_hplc_nm) #R2 = 0.17468, p = 0.001 | ||
#significant differences by month (and month*station), but not by station alone | ||
``` |