OSCR

Persistent Legacy Effects of Marine Heatwaves on Coral Symbioses.

Code ↔ Paper

9 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 9 matches
  1. [1] § Materials and Methods › Study Site ↔ Scripts/01_Extracting_site_environmental_data_Fig1.R, lines 266–349 · score 0.72 · degree heating weeks, bleaching alert, SST, DHW, temperature, vertical
  2. [2] § Materials and Methods › Statistical Analyses ↔ Scripts/03_Classifying_symbionts_from_sequence_data_Fig3_FigS3.R, lines 543–595 · score 0.68 · Unifrac dissimilarities, sequence variants, coral colonies, subset, S3, date
  3. [3] § Materials and Methods › Statistical Analyses ↔ Scripts/02_Genus_level_analyses_Fig2_Fig4_FigS4.R, lines 290–350 · score 0.67 · glmmTMB, fit, Beta, leeward, windward, models
  4. [4] § Materials and Methods › Quantifying Acute and Chronic Disturbance Exposure ↔ Scripts/01_Extracting_site_environmental_data_Fig1.R, lines 266–349 · score 0.63 · Degree Heating Week, minimal, SST, daily, DHW, temperature
  5. [5] § Materials and Methods › Statistical Analyses ↔ Scripts/02_Genus_level_analyses_Fig2_Fig4_FigS4.R, lines 188–228 · score 0.60 · collection date, tracked colonies, logistic, regressions, symbiotic, ASV
  6. [6] § Materials and Methods › Clustering and Classifying Symbiodiniaceae Sequence Data ↔ Scripts/03_Classifying_symbionts_from_sequence_data_Fig3_FigS3.R, lines 543–595 · score 0.57 · amplicon sequence variants, classify, unifrac, distances, ASVs, taxa
  7. [7] § Materials and Methods › Study Site ↔ Scripts/02_Genus_level_analyses_Fig2_Fig4_FigS4.R, lines 290–350 · score 0.57 · environmental metrics, island, nitrate, nitrite, leeward, windward
  8. [8] § Results › No Recovery of Pre‐Heatwave Cladocopium Taxa ↔ Scripts/03_Classifying_symbionts_from_sequence_data_Fig3_FigS3.R, lines 684–722 · score 0.57 · C50a, C15h, C116, profiles, ASVs, sequence
  9. [9] § Materials and Methods › Clustering and Classifying Symbiodiniaceae Sequence Data ↔ Scripts/02_Genus_level_analyses_Fig2_Fig4_FigS4.R, lines 1–47 · score 0.54 · symbiont genera, S4, symbiont genus, RRA, background, 90 %

Paper

Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

R · 384 lines · 21 KB · no license · 4 matches

  1. library(ggplot2)
  2. library(tibble)
  3. library(tidyr)
  4. library(tidyverse)
  5. library(plyr)
  6. library(dplyr)
  7. library(vegan)
  8. library(glmmTMB)
  9. library(arm)
  10. library(nnet)
  11. library(gamlss)
  12. ######################################################
  13. #Summarising assemblages to symbiont genera, Figure S4
  14. ######################################################
  15. asv_genus_props <- read.csv('Data/Symbiont_ASV_genus_proportions.csv')
  16. #Symbiont genus proportion histogram for Fig S3
  17. asv_genus_props_long<-asv_genus_props %>%
  18. pivot_longer(c(C_prop, D_prop, A_prop),names_to = 'genus', values_to = 'proportion')
  19. asv_genus_props_long$genus<-revalue(asv_genus_props_long$genus, c("C_prop"='Cladocopium',"D_prop"='Durusdinium',"A_prop"='Symbiodinium'))
  20. ggplot(filter(asv_genus_props_long,asv_genus_props_long$proportion>0))+
  21. geom_histogram(position='stack', aes(x=proportion, fill=genus), bins = 50)+
  22. theme_classic(base_size = 13)+
  23. scale_fill_manual(values=c('#6D9B8F','#C1260E','#FFD700'),name='')+
  24. labs(x='Genus proportions >1%',y='n(samples)')+
  25. theme(legend.position = 'inside', legend.position.inside = c(0.5,0.4))+
  26. scale_x_continuous(expand=c(0.01,0.01), n.breaks = 10)+
  27. scale_y_continuous(expand=c(0.01,0.01))+
  28. geom_vline(xintercept = 0.1,linetype='dashed')+
  29. geom_vline(xintercept = 0.9,linetype='dashed')+
  30. annotate("text", x = 0.05, y = 280, label = "Background", size = 3.5,alpha=0.8, angle=90)+
  31. annotate("text", x = 0.51, y = 280, label = "Co-dominant", size = 3.5,alpha=0.8, angle=90)+
  32. annotate("text", x = 0.95, y = 280, label = "Dominant", size = 3.5,alpha=0.8, angle=90)
  33. ggsave('Figures/FigS4_genus_rra.pdf')
  34. ######################################################
  35. #Fig.2: Dominant genera and persistence of Durusdinium
  36. ######################################################
  37. asv_genus_props$map_site_name<-factor(asv_genus_props$map_site_name, levels=c('VL1', 'VL3', 'VL4','L1','M1','M2','M3','M5','H1','VH1','VH2','VH3'))
  38. asv_genus_props$disturbance_cat<-factor(asv_genus_props$disturbance_cat,levels=c('Very Low','Low','Medium','High', 'Very High'))
  39. asv_genus_props$dom_genus<-factor(asv_genus_props$dom_genus, levels=c('C', 'D', 'CD','AD'))
  40. asv_genus_props$exped_class<-paste(asv_genus_props$expedition)
  41. asv_genus_props$exped_class<-revalue(asv_genus_props$exped_class, c('2014'='2014-2015 (i-iv)','2015a'='2014-2015 (i-iv)','2015b'='2014-2015 (i-iv)','2015c'='2014-2015 (i-iv)', '2016a'='2016-2017 (v-vii)', '2016b'='2016-2017 (v-vii)','2017'='2016-2017 (v-vii)', '2018'='2018-2019 (viii-ix)','2019'='2018-2019 (viii-ix)','2023b'='2023 (x)'))
  42. asv_genus_props$exped_class<-factor(asv_genus_props$exped_class, levels=c('2014-2015 (i-iv)', '2016-2017 (v-vii)', '2018-2019 (viii-ix)','2023 (x)'))
  43. # UpSet plot of symbionts hosted by platygyra by expedition
  44. # Sum the frequency of genera present by disturbance and expedition grouping
  45. genus_exp_disturb_df <- asv_genus_props %>%
  46. group_by(exped_class, disturbance_cat, dom_genus) %>%
  47. reframe(n_obs = n())
  48. # Sum samples collected in each expedition grouping
  49. n_samples_by_group <- genus_exp_disturb_df %>%
  50. group_by(exped_class) %>%
  51. dplyr::summarize(sum_n_obs = sum(n_obs))
  52. # Convert sums to percentage of samples in expedition grouping
  53. genus_exp_disturb_df <- genus_exp_disturb_df %>%
  54. left_join(n_samples_by_group) %>%
  55. mutate(prop_n_obs = (n_obs / sum_n_obs) * 100)
  56. # construct dots of the upset plot
  57. domgenus_dot_df <- data.frame(genera_present = c('C', 'D', 'CD', 'AD')) %>%
  58. mutate(genera_present = factor(genera_present, levels = rev(c('C', 'D', 'CD', 'AD')))) %>%
  59. mutate(`25` = ifelse(grepl('C',genera_present), 'Y', '-'),
  60. `50` = ifelse(grepl('D',genera_present), 'Y', '-'),
  61. `75` = ifelse(grepl('A',genera_present), 'Y', '-')) %>%
  62. pivot_longer(-genera_present, values_to = 'Present', names_to = 'Genus') %>%
  63. filter(Present == 'Y') %>%
  64. mutate(expedition_class = '0_a_UpSet') %>%
  65. mutate(Genus = as.numeric(Genus))
  66. # plots groupings
  67. ggplot() +
  68. geom_line(data = domgenus_dot_df,
  69. aes(x = Genus, y = genera_present, group = genera_present),
  70. size = 3, colour = 'grey40') +
  71. geom_point(data = domgenus_dot_df,
  72. aes(x = Genus, y = genera_present),
  73. shape = 21, size = 5, colour = 'white', fill = 'black')+
  74. xlab('')+ylab('')+
  75. theme_void()+
  76. theme(axis.text.x = element_blank(),axis.text.y=element_blank(), axis.ticks.y = element_blank(),axis.ticks.x = element_blank())
  77. ggsave('Figures/Fig2_clade_groups.pdf', width = 50, height = 50, units = 'mm')
  78. genus_exp_disturb_df$dom_genus<-factor(genus_exp_disturb_df$dom_genus, levels=c('AD','CD','D','C'))
  79. ggplot()+
  80. geom_col(data = genus_exp_disturb_df,
  81. aes(x = prop_n_obs, y = dom_genus, fill = disturbance_cat)) +
  82. facet_grid(. ~ exped_class) +
  83. geom_hline(yintercept = c(0.5,1.5,2.5,3.5,4.5,5.5,6.5),
  84. colour = 'grey78') +
  85. theme_classic(base_size = 13)+
  86. scale_fill_manual(values = c('#01655f','#5db2ab','#c4e9e2','#d7b364','#8e520a'), name='Human disturbance') +
  87. ylab('') +
  88. xlab('Samples (%)') +
  89. theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1),axis.text.y=element_blank(), axis.ticks.y = element_blank())+
  90. scale_x_continuous(expand=c(0.03,0),limits=c(0,100))+
  91. scale_y_discrete(expand=c(0,0))
  92. ggsave('Figures/Fig2_clade_barplots.pdf', width = 180, height = 80, units = 'mm')
  93. #test the effects of date (2014 to 2023, rescaled) and continuous disturbance (rescaled) on binary dominance of D 10%.
  94. asv_genus_props$collection_date<-as.Date(as.character(asv_genus_props$collection_date),format='%Y%m%d')
  95. asv_genus_props$disturbance_rescaled<-scale(asv_genus_props$cont_disturbance, center = TRUE, scale = TRUE)
  96. asv_genus_props$collection_date_rescaled<-scale(as.numeric(asv_genus_props$collection_date),center=T, scale=T)
  97. asv_genus_props_after<-filter(asv_genus_props, asv_genus_props$before_after=='After')
  98. start_date <- as.Date("2014-08-01")
  99. end_date <- as.Date("2023-09-01")
  100. # Generate the sequence of dates with 1-month intervals using lubridate
  101. date_sequence <- seq.Date(from = start_date, to = end_date, by = "month")
  102. new_data <- expand.grid(
  103. cont_disturbance = seq(from=0, to=7500, by=400),
  104. exped_class = levels(asv_genus_props$exped_class))
  105. logistic_Ddom <- glm(binary_Ddom ~ cont_disturbance * exped_class,
  106. data = asv_genus_props,
  107. family = binomial,
  108. na.action = na.omit)
  109. predictions <- predict(logistic_Ddom, newdata = new_data, type = "response", se.fit = TRUE)
  110. new_data$predicted_Ddom<-predictions$fit
  111. new_data$se<-predictions$se.fit
  112. new_data$upperci <- new_data$predicted_Ddom + 1.96*(new_data$se)
  113. new_data$lowerci <- new_data$predicted_Ddom - 1.96*(new_data$se)
  114. new_data$upperci[new_data$upperci>1]<-1
  115. new_data$lowerci[new_data$lowerci<0]<-0
  116. ggplot() +
  117. theme_classic(base_size = 13)+
  118. geom_ribbon(data=new_data, aes(ymin=lowerci, ymax=upperci,x=cont_disturbance),alpha=0.2) +
  119. geom_line(data=new_data,aes(y=predicted_Ddom, x=cont_disturbance))+
  120. geom_jitter(data=asv_genus_props, aes(y=binary_Ddom, x=cont_disturbance), colour='darkgrey',width = 300, height =0, alpha=0.5, shape=1)+
  121. ylab("Durusdinium over 10%")+
  122. xlab("Local Disturbance")+
  123. facet_grid(. ~ exped_class) +
  124. theme(axis.text.x = element_text(angle=90), strip.text = element_blank())+
  125. scale_y_continuous(breaks = c(0.00, 0.5, 1.00), expand = c(0.02,0.06))
  126. ggsave('Figures/Fig2_clade_logres.pdf', width = 150, height = 80, units = 'mm')
  127. #effect of continuous disturbance on binary Ddom
  128. logistic_Ddom201415 <- glm(binary_Ddom ~ disturbance_rescaled,
  129. data = filter(asv_genus_props, asv_genus_props$exped_class=='2014-2015 (i-iv)'),
  130. family = binomial,
  131. na.action = na.omit)
  132. summary(logistic_Ddom201415) # z=5.946, p=2.74e-09 ***
  133. logistic_Ddom201617 <- glm(binary_Ddom ~ disturbance_rescaled,
  134. data = filter(asv_genus_props, asv_genus_props$exped_class=='2016-2017 (v-vii)'),
  135. family = binomial,
  136. na.action = na.omit)
  137. summary(logistic_Ddom201617) # z=0.005, p=0.996
  138. logistic_Ddom201819 <- glm(binary_Ddom ~ disturbance_rescaled,
  139. data = filter(asv_genus_props, asv_genus_props$exped_class=='2018-2019 (viii-ix)'),
  140. family = binomial,
  141. na.action = na.omit)
  142. summary(logistic_Ddom201819) # z=0.005, p=0.996
  143. logistic_Ddom2023 <- glm(binary_Ddom ~ disturbance_rescaled,
  144. data = filter(asv_genus_props, asv_genus_props$exped_class=='2023 (x)'),
  145. family = binomial,
  146. na.action = na.omit)
  147. summary(logistic_Ddom2023) # z=0.42, p=0.675
  148. logistic_Ddomafterexpeds <- glm(binary_Ddom ~ rescale(collection_date),
  149. data = filter(asv_genus_props, asv_genus_props$exped_class!='2014-2015 (i-iv)'),
  150. family = binomial,
  151. na.action = na.omit)
  152. summary(logistic_Ddomafterexpeds) # z=1.251, p=0.211
  153. nobeforelowdist<-filter(asv_genus_props, asv_genus_props$exped_class!='2014-2015 (i-iv)'|asv_genus_props$cont_disturbance>2000)
  154. logistic_Ddombefhighafterexpeds <- glm(binary_Ddom ~ rescale(collection_date) + rescale(cont_disturbance),
  155. data = nobeforelowdist,
  156. family = binomial,
  157. na.action = na.omit)
  158. summary(logistic_Ddombefhighafterexpeds) # collection date: z=1.702, p=0.0888, disturbance: z=-0.189, p=0.8501
  159. sample_size_tab<-asv_genus_props %>%
  160. group_by(exped_class)%>%
  161. dplyr::summarise(ncols=length(unique(coral_tag)),nsamps=length(unique(sample_name)))
  162. sample_size_tab
  163. #Tracked colonies D persistence
  164. ad_tracked<-read.csv('Data/AD_tracked_colony_transitions.csv')
  165. ad_tracked$aft.collection_date<-as.Date(as.character(ad_tracked$aft.collection_date),format='%Y%m%d')
  166. logistic_Ddom_tracked<- glm(retained_ddom_binary ~ rescale(aft.collection_date) + rescale(cont_disturbance),
  167. data=ad_tracked,
  168. family=binomial,
  169. na.action=na.omit)
  170. logistic_Ddom_tracked
  171. #model will not converge because all colonies retained their Durusdinium (variance =0).
  172. ##############################################
  173. #Fig.4a, Fig.4b: Flux between symbiotic states
  174. ##############################################
  175. ad_tracked$strict_timespan<-as.factor(ad_tracked$strict_timespan)
  176. start_date <- as.Date("2016-11-01")
  177. end_date <- as.Date("2023-09-01")
  178. # Generate the sequence of dates with 1-month intervals using lubridate
  179. date_sequence <- seq.Date(from = start_date, to = end_date, by = "month")
  180. ad_tracked$disturbance_cat<-factor(ad_tracked$disturbance_cat, levels=c('Very Low','Low','Medium','High','Very High'))
  181. ad_tracked$X2_timespans<-as.factor(ad_tracked$X2_timespans)
  182. ad_tracked$timespan<-as.factor(ad_tracked$timespan)
  183. ad_tracked$transition_AD<-factor(ad_tracked$transition_AD, levels=c('D_D','AD_AD','AD_D','D_AD'))
  184. ad_tracked$rescaled_A_change_asv <- (ad_tracked$A_change_asv + 1) / 2 #rescale between 0 and 1 for binomial & beta regressions
  185. #effect of continuous disturbance
  186. library(betareg)
  187. AD1619<-filter(ad_tracked, ad_tracked$X2_timespans!='2019-23')
  188. beta_change1619 <- betareg(rescaled_A_change_asv ~ rescale(cont_disturbance),
  189. data =AD1619)
  190. summary(beta_change1619)
  191. AD1923<-filter(ad_tracked, ad_tracked$timespan=='Jul19-Sep23')
  192. beta_change1923 <- betareg(rescaled_A_change_asv ~ rescale(cont_disturbance),
  193. data = AD1923)
  194. summary(beta_change1923)
  195. p_values_1619 <- summary(beta_change1619)$coefficients$mean[, "Pr(>|z|)"]
  196. p_values_1923 <- summary(beta_change1923)$coefficients$mean[, "Pr(>|z|)"]
  197. p_values_combined <- c(p_values_1619, p_values_1923)
  198. p.adjust(p_values_combined, method = "bonferroni") #1619: z=−2.636,p Bonferroni= 0.0336, 1923: z=2.70, p Bonferroni=0.0276
  199. #predict models for plotting
  200. new_AD1619 <- data.frame(cont_disturbance = seq(min(AD1619$cont_disturbance),
  201. max(AD1619$cont_disturbance), length.out = 184))
  202. # Compute model matrix (auto-applies rescale)
  203. new_AD1619$model_matrix <- model.matrix(~ rescale(cont_disturbance), data = new_AD1619)
  204. # Extract coefficients and variance-covariance matrix
  205. coefs_1619 <- coef(beta_change1619)[1:2]
  206. vcov_1619 <- vcov(beta_change1619)[1:2, 1:2]
  207. # Compute predicted values
  208. new_AD1619$predicted <- plogis(new_AD1619$model_matrix %*% coefs_1619) # Logit transformation
  209. # Compute standard errors
  210. se_AD1619 <- sqrt(diag(new_AD1619$model_matrix %*% vcov_1619 %*% t(new_AD1619$model_matrix)))
  211. # Compute shading range (mean ± 1 SE)
  212. new_AD1619$lower <- plogis(new_AD1619$model_matrix %*% coefs_1619 - se_AD1619)
  213. new_AD1619$upper <- plogis(new_AD1619$model_matrix %*% coefs_1619 + se_AD1619)
  214. # Ensure shading stays in (0,1) range of beta regression
  215. new_AD1619$lower <- pmax(0, new_AD1619$lower)
  216. new_AD1619$upper <- pmin(1, new_AD1619$upper)
  217. new_AD1619$X2_timespans<-c('2016-17, 2017-18 or 2018-19')
  218. new_AD1923 <- data.frame(cont_disturbance = seq(min(AD1923$cont_disturbance),
  219. max(AD1923$cont_disturbance), length.out = 59))
  220. # Compute model matrix (auto-applies rescale)
  221. new_AD1923$model_matrix <- model.matrix(~ rescale(cont_disturbance), data = new_AD1923)
  222. # Extract coefficients and variance-covariance matrix
  223. coefs_1923 <- coef(beta_change1923)[1:2]
  224. vcov_1923 <- vcov(beta_change1923)[1:2, 1:2]
  225. # Compute predicted values
  226. new_AD1923$predicted <- plogis(new_AD1923$model_matrix %*% coefs_1923) # Logit transformation
  227. # Compute standard errors
  228. se_AD1923 <- sqrt(diag(new_AD1923$model_matrix %*% vcov_1923 %*% t(new_AD1923$model_matrix)))
  229. # Compute shading range (mean ± 1 SE)
  230. new_AD1923$lower <- plogis(new_AD1923$model_matrix %*% coefs_1923 - se_AD1923)
  231. new_AD1923$upper <- plogis(new_AD1923$model_matrix %*% coefs_1923 + se_AD1923)
  232. # Ensure shading stays in (0,1) range of beta regression
  233. new_AD1923$lower <- pmax(0, new_AD1923$lower)
  234. new_AD1923$upper <- pmin(1, new_AD1923$upper)
  235. new_AD1923$X2_timespans<-c('2019-23')
  236. AD_betareg<-rbind(new_AD1619,new_AD1923)
  237. ggplot() +
  238. theme_test(base_size = 13)+
  239. geom_line(data=AD_betareg, aes(y=predicted, x=cont_disturbance),colour='black', size=0.3)+
  240. geom_ribbon(data=AD_betareg, aes(ymax=upper, ymin=lower, x=cont_disturbance),
  241. fill='grey',alpha=0.4)+
  242. geom_jitter(data=ad_tracked, aes(y=rescaled_A_change_asv, x=cont_disturbance),
  243. colour='grey60', width = 300, height =0, size=2)+
  244. ylab("Change in Symbiodinium")+
  245. xlab("Human Disturbance")+
  246. facet_grid(. ~ X2_timespans) +
  247. theme(axis.text.x = element_text(angle=90), legend.position = 'none')+
  248. scale_y_continuous(breaks=c(0.25,0.5,0.75), labels=c('-0.5','0.0','+0.5'))
  249. ggsave('Figures/A_by_disturbance.pdf', units = 'mm', width=105, height=90)
  250. ad_tracked$coral_order<-as.factor(ad_tracked$coral_order)
  251. ad_tracked$coral_order<-factor(ad_tracked$coral_order, levels=rev(levels(ad_tracked$coral_order)))
  252. ad_tracked$timespan<-factor(ad_tracked$timespan, levels=c('Mar16-Nov16','Nov16-Jul17','Jul17-Jul18','Jul18-Jul19','Jul19-Sep23'))
  253. ######################################################
  254. #Fig.4c: Environmental metric effects on Symbiodinium
  255. ######################################################
  256. site_metadata<-read.csv('Data/Platygyra_site_metadata.csv')
  257. ad_tracked<-dplyr::left_join(ad_tracked,site_metadata,by='map_site_name', relationship = 'many-to-one')
  258. ad_tracked$coral_tag<-as.factor(ad_tracked$coral_tag)
  259. ad_tracked$map_site_name<-as.factor(ad_tracked$map_site_name)
  260. ad_tracked$cont_disturbance_rescaled<-rescale(ad_tracked$cont_disturbance)
  261. ad_tracked$site_meanafter_nitratenitrite_rescaled<-rescale(ad_tracked$site_meanafter_nitratenitrite)
  262. ad_tracked$site_meanafter_vis_rescaled<-rescale(ad_tracked$site_meanafter_vis)
  263. ad_tracked$meanafter_chla_rescaled<-rescale(ad_tracked$meanafter_chla)
  264. ad_tracked$disturbance_cat<-factor(ad_tracked$disturbance_cat, levels=c('Very Low','Low','Medium','High','Very High'))
  265. ad_tracked$island_side<-factor(ad_tracked$island_side, levels=c('leeward', 'windward'))
  266. ad_trackedmod1<-gamlss(A_change_asv~ X2_timespans *site_meanafter_nitratenitrite_rescaled+ X2_timespans*site_meanafter_vis_rescaled+ X2_timespans*meanafter_chla_rescaled +random(coral_tag)+ random(map_site_name)+random(disturbance_cat), control = gamlss.control(trace = TRUE, lambda = "auto"), data= ad_tracked)
  267. summary(ad_trackedmod1)
  268. ad_trackedmod2<-glmmTMB(A_change_asv~ X2_timespans*site_meanafter_nitratenitrite_rescaled*island_side+ X2_timespans*site_meanafter_vis_rescaled*island_side+ X2_timespans*meanafter_chla_rescaled*island_side +(1|disturbance_cat)+(1|coral_tag)+(1|map_site_name), data= ad_tracked)
  269. summary(ad_trackedmod2)
  270. ad_trackedmod3<-glmmTMB(A_change_asv~ X2_timespans*site_meanafter_nitratenitrite_rescaled+ X2_timespans*site_meanafter_vis_rescaled+ X2_timespans*meanafter_chla_rescaled+ X2_timespans*island_side +(1|disturbance_cat), data= ad_tracked)
  271. summary(ad_trackedmod3)
  272. ad_trackedmod4<-glmmTMB(A_change_asv~ X2_timespans*site_meanafter_nitratenitrite_rescaled+ X2_timespans*site_meanafter_vis_rescaled+ X2_timespans*meanafter_chla_rescaled + (1|island_side)+(1|disturbance_cat), data= ad_tracked)
  273. summary(ad_trackedmod4)
  274. #ad_trackedmod2 is superior to other models in terms of AIC and variance explained
  275. #building on this, using a beta distribution improves model fit compared to a gausssina distribution
  276. ad_betareg<-glmmTMB(rescaled_A_change_asv~ X2_timespans*site_meanafter_nitratenitrite_rescaled*island_side+ X2_timespans*site_meanafter_vis_rescaled*island_side+ X2_timespans*meanafter_chla_rescaled*island_side +(1|disturbance_cat)+(1|coral_tag)+(1|map_site_name),family = beta_family(), data= ad_tracked)
  277. summary(ad_betareg)
  278. #random effects explain very little variance
  279. # Output model coefficients
  280. ad_betareg.coef <- data.frame(confint(ad_betareg, full = TRUE))
  281. names(ad_betareg.coef)[names(ad_betareg.coef) == "X2.5.."] <- "LowerCI"
  282. names(ad_betareg.coef)[names(ad_betareg.coef) == "X97.5.."] <- "UpperCI"
  283. ad_betareg.coef <- ad_betareg.coef[c(3:8,10,12), ]
  284. rownames(ad_betareg.coef)[1] <- "1619_nitratenitrite"
  285. rownames(ad_betareg.coef)[2] <- "1619_exposure"
  286. rownames(ad_betareg.coef)[3] <- "1619_vis"
  287. rownames(ad_betareg.coef)[4] <- "1619_chla"
  288. rownames(ad_betareg.coef)[5] <- "1923_nitratenitrite"
  289. rownames(ad_betareg.coef)[6] <- "1923_exposure"
  290. rownames(ad_betareg.coef)[7] <- "1923_vis"
  291. rownames(ad_betareg.coef)[8] <- "1923_chla"
  292. ad_betareg.coef$variable <- c('nitratenitrite','exposure','vis','chla','nitratenitrite','exposure','vis','chla')
  293. ad_betareg.coef$variable <- factor(ad_betareg.coef$variable, levels=c('vis','nitratenitrite','chla','exposure'))
  294. ad_betareg.coef$Time<-c('2016-17, 2017-18 or 2018-19','2016-17, 2017-18 or 2018-19','2016-17, 2017-18 or 2018-19','2016-17, 2017-18 or 2018-19','2019-23','2019-23','2019-23','2019-23')
  295. ggplot(ad_betareg.coef, aes(x = variable, y = Estimate)) +
  296. geom_hline(yintercept = 0, color = gray(1/2), lty = 2)+
  297. geom_pointrange(aes(x = variable, y = Estimate, ymin = LowerCI, ymax = UpperCI, color=variable,fill=variable),position = position_dodge(width = 1/2), shape = 21, fatten = 2, size = 1)+
  298. facet_wrap(~Time)+ scale_color_manual(values=c('black','grey50','grey50','grey50'))+scale_fill_manual(values=c('black','grey50','grey50','grey50'))+theme_classic()+
  299. theme(panel.grid.major.y = element_line(),axis.text.x = element_text(angle=45,hjust = 1), strip.background = element_rect(fill='grey85',linewidth = 0.5),panel.border=element_rect(fill=NA,colour='black'),
  300. axis.line = element_line(linewidth = 0.2) ,legend.position = 'none')+labs(x='',y='Change in proportion A in re-samples')+
  301. scale_x_discrete(labels=c('Visibility','Nitrate & nitrite','Chlorophyll-a','Exposure'))
  302. #####################################################################
  303. # Plots RRA Symbiodinium by expedition for tracked colonies
  304. #####################################################################
  305. # Lists tracked colonies
  306. ad_tracked<-read.csv('Data/AD_tracked_colony_transitions.csv')
  307. length(unique(ad_tracked$coral_tag))
  308. library(tidyverse)
  309. # organizes tracked colonies for plotting as a heatmap by colony and expedition
  310. repeat_samples <- asv_genus_props %>%
  311. filter(coral_tag %in% ad_tracked$coral_tag) %>%
  312. mutate(disturbance_cat = factor(disturbance_cat, levels = c("Very High", "High", "Medium", "Low", "Very Low"))) %>%
  313. arrange(disturbance_cat) %>%
  314. mutate(plot_code = paste(disturbance_cat, coral_tag)) %>%
  315. mutate(plot_code = factor(plot_code, levels = unique(plot_code)))
  316. # Plots heatmap
  317. ggplot() +
  318. geom_tile(data = repeat_samples,
  319. aes(expedition, plot_code, fill = A_prop)) +
  320. theme_test(base_size = 8) +
  321. scale_fill_gradientn(colours = c("#C1260E", "#FFD700"), limits = c(0.01, max(repeat_samples$A_prop)), na.value = "grey90") +
  322. geom_vline(xintercept = 4.5) +
  323. theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))
  324. ggsave('Figures/A_dynamism.pdf', units = 'in', width=3, height=7)
  325. #####################################################################

02_Genus_level_analyses_Fig2_Fig4_FigS4.R at commit e9232cb, no license · at the source

Overview

Authors: D Buzzoni1, A Van Nynatten1, R Cunning2, J K Baum1
  1. Department of Biology, University of Victoria, Victoria, British Columbia, Canada
  2. Conservation Research Department, John G. Shedd Aquarium, Chicago, Illinois, USA
Institutions: University of Victoria (Canada); Shedd Aquarium (United States)
Journal: Global change biology, volume 32, issue 3, article e70818
Dates: received 8 August 2025; accepted 20 February 2026; published online 24 March 2026; in print March 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1111/gcb.70818 · PMID 41877353 · PMCID PMC13013739 · OpenAlex W7140181797
Open access: hybrid, a free copy (OpenAlex)
Status: code verified
Categories: human (organism)
Methods: Connectivity, Statistics, Machine learning
Keywords: climate change, coral bleaching, human disturbance, multiple stressors, recovery trajectory, secondary succession, Symbiodiniaceae, symbiont shuffling
MeSH: Anthozoa*, Climate Change*, Dinoflagellida*, Hot Temperature*, Symbiosis*, Animals, Coral Reefs (* major topic)
Topic: Coral and Marine Ecosystems Studies (Ecology, Environmental Science), according to OpenAlex
Funding: Pew Charitable Trusts; Rufford Foundation; The Pew Charitable Trusts, Pew Fellowship in Marine Conservation; Government of Canada's New Frontiers in Research Fund (NFRF), BIOSCAN (NFRFT-2020-00073); Natural Sciences and Engineering Research Council of Canada; Rufford Maurice Laing Foundation; National Geographic Society (NGS‐146R‐18, NGS‐63112R‐19); The Leverhulme Trust, Study Abroad Studentship (SAS-2021-047); Canada Foundation for Innovation (CFI) Leaders Opportunity Fund; David and Lucile Packard Foundation; British Columbia Knowledge Development Fund; National Geographic Society, Committee for Research and Exploration (NGS-146R-18, NGS-63112R-19); National Science Foundation (NSF) RAPID (OCE-1446402); Leverhulme Trust (SAS‐2021‐047); University of Victoria
Citations: cited by 1 paper (Europe PMC); 104 references in the paper

Abstract

The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.

Repositories

Its files are read in the Code ↔ Paper reader above, with 9 matches between paragraphs and lines of code.

baumlab/Buzzoni_et_al_2026_Platygyra

License: none: the authors keep all their rights
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Commit: e9232cb13fbd79e61b6cee6fbdae3aa0fd7b6330, 26 February 2026
Languages: R (4)
Size: 46 files, 4 scripts
Software Heritage: not archived
Found in: “Data Availability Statement”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: tidyverse (4 files), ggplot2 (3 files), patchwork (2 files), glmmTMB (1 file)
Availability: 1 check, the latest on 30 September 2026: the link answers
  • 30 September 2026: the link answers
5 files

Zenodo 18792037

License: CC-BY-4.0
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Size: 1 file
Software Heritage: not checked
Found in: “Data Availability Statement”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: tidyverse (4 files), ggplot2 (3 files), patchwork (2 files), glmmTMB (1 file)
Availability: 1 check, the latest on 30 September 2026: the link answers (HTTP 200)
  • 30 September 2026: the link answers (HTTP 200)
5 files

nitschkematthew/Symbiodatabaceae

License: none: the authors keep all their rights
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Commit: 2320cbdda104c451f837ab62869941574c2d2071, 13 July 2020
Languages: R (5)
Size: 20 files, 5 scripts
Software Heritage: not archived
Found in: the references
Holds: README, 4 notebooks
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: tidyverse (4 files), reshape2 (1 file)
Availability: 1 check, the latest on 30 September 2026: the link answers
  • 30 September 2026: the link answers
6 files

The paper's code and data availability statement is in the Data section.

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 3 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 13 scripts, each with its path and the digest of its content;
  • 9 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

No dataset and no data link were found in the paper.

Code and data availability statement

The paper has a code and data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:

Read it in the paper: doi.org/10.1111/gcb.70818.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 30 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 4 authors, 8 keywords, 7 MeSH terms, 15 funders, 93 references.

Cite

This paper

Buzzoni, D., Van Nynatten, A., Cunning, R., & Baum, J. K. (2026). Persistent Legacy Effects of Marine Heatwaves on Coral Symbioses. Global change biology, 32(3), e70818. https://doi.org/10.1111/gcb.70818

BibTeX

@article{buzzoni2026persistent,
author = {Buzzoni, D and Van Nynatten, A and Cunning, R and Baum, J K},
title = {{Persistent Legacy Effects of Marine Heatwaves on Coral Symbioses}},
journal = {Global change biology},
year = {2026},
month = mar,
volume = {32},
number = {3},
pages = {e70818},
publisher = {Wiley},
issn = {1354-1013},
doi = {10.1111/gcb.70818},
url = {https://doi.org/10.1111/gcb.70818},
pmid = {41877353},
pmcid = {PMC13013739}
}

RIS

TY - JOUR
AU - Buzzoni, D
AU - Van Nynatten, A
AU - Cunning, R
AU - Baum, J K
TI - Persistent Legacy Effects of Marine Heatwaves on Coral Symbioses
T2 - Global change biology
J2 - Glob Chang Biol
PY - 2026
DA - 2026/03/01
VL - 32
IS - 3
SP - e70818
SN - 1354-1013
PB - Wiley
DO - 10.1111/gcb.70818
UR - https://doi.org/10.1111/gcb.70818
LA - en
ER -

CSL-JSON

{
"id": "10.1111/gcb.70818",
"type": "article-journal",
"title": "Persistent Legacy Effects of Marine Heatwaves on Coral Symbioses",
"container-title": "Global change biology",
"author": [
{
"family": "Buzzoni",
"given": "D"
},
{
"family": "Van Nynatten",
"given": "A"
},
{
"family": "Cunning",
"given": "R"
},
{
"family": "Baum",
"given": "J K"
}
],
"container-title-short": "Glob Chang Biol",
"volume": "32",
"issue": "3",
"page": "e70818",
"DOI": "10.1111/gcb.70818",
"PMID": "41877353",
"PMCID": "PMC13013739",
"ISSN": "1354-1013",
"publisher": "Wiley",
"URL": "https://doi.org/10.1111/gcb.70818",
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
1
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.1038/s41467-026-76675-1 [code]
Long-read proteogenomic atlas of human neuronal differentiation reveals isoform diversity informing neurodevelopmental risk mechanisms.
Journal: Nature communications
In common: glmmTMB, reshape2, patchwork, 2 other tools
[2] doi:10.1093/braincomms/fcag217 [code]
Investigation of stress hormones across multiday seizure cycles.
Journal: Brain communications
In common: glmmTMB, reshape2, patchwork, 2 other tools
[3] doi:10.1016/j.celrep.2026.117505 [code]
Impaired spatial coding and neuronal hyperactivity in the medial entorhinal cortex of aged APP knock-in mice.
Journal: Cell reports
In common: glmmTMB, reshape2, patchwork, 2 other tools
[4] doi:10.1038/s41514-026-00391-9 [code]
Region-specific transcriptional signatures of brain aging in the absence of neuropathology at the single-cell level.
Journal: npj aging
In common: glmmTMB, reshape2, patchwork, 2 other tools
[5] doi:10.7554/elife.107088 [code]
Development of auditory and spontaneous movement responses to music over the first postnatal year.
Journal: eLife
In common: glmmTMB, reshape2, ggplot2, 1 other tool
[6] doi:10.1371/journal.pmed.1005182 [code]
Frequency and prognostic outcomes of emergency diagnosis in 13 non-neoplastic conditions in England: A population-based cohort study using linked electronic health records of 1.7 million patients.
Journal: PLoS medicine
In common: glmmTMB, patchwork, ggplot2, 1 other tool
[7] doi:10.1038/s41586-026-10444-4 [code]
A brain reward circuit inhibited by next-generation weight-loss drugs in mice.
Journal: Nature
In common: glmmTMB, patchwork, ggplot2, 1 other tool
[8] doi:10.1007/s12311-026-02006-1 [code]
Innovative 3D-Image Analysis of Cerebellar Vascularization Highlights Angiogenic Gene Dysregulations in a Murine Model of Apnea of Prematurity.
Journal: Cerebellum (London, England)
In common: glmmTMB, patchwork, ggplot2, 1 other tool
[9] doi:10.1038/s44400-026-00074-y [code]
Methylomic signatures of tau and amyloid-beta in transgenic mouse models of Alzheimer's disease neuropathology.
Journal: NPJ dementia
In common: glmmTMB, reshape2, ggplot2, 1 other tool
[10] doi:10.1242/jeb.252086 [code]
Transcriptional predictors of rescue behaviour in ants.
Journal: The Journal of experimental biology
In common: glmmTMB, patchwork, ggplot2, 1 other tool

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.