Neural and behavioral responses to reproductive signals in male chorus frogs.
4 blocks of code here have a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.
The 5 matches
- [1] § MATERIALS AND METHODS › Behavioral analysis ↔ analysis_combined copy.R, lines 337 to 383 · score 0.83 · Kenward Roger degrees, pairwise post hoc, lme4, male behavior, freedom, emmeans · block
oscr:b:JTFRDMP6ZKW5K-0· Report a mismatch - [2] § MATERIALS AND METHODS › Regional analysis ↔ analysis_combined copy.R, lines 1 to 52 · score 0.81 · pairwise comparisons, post hoc, interactive model, better fit, species recognition, neural activity · block
oscr:b:KSPYHHB43C18H-V· Report a mismatch - [3] § MATERIALS AND METHODS › Microscopy and cell counting ↔ analysis_combined copy.R, lines 153 to 200 · score 0.75 · lateral septum, medial amygdala, dorsal pallium, MeA, positive cells, Dp · block
oscr:b:EF89YNKR5RZJ0-S· Report a mismatch - [4] § MATERIALS AND METHODS › Evoked neural activity trials ↔ analysis_combined copy.R, lines 153 to 200 · score 0.68 · lateral septum, medial amygdala, dorsal pallium, MeA, Dp, S6 · block
oscr:b:EF89YNKR5RZJ0-S· Report a mismatch - [5] § MATERIALS AND METHODS › Behavioral analysis ↔ analysis_combined copy.R, lines 385 to 431 · score 0.60 · body mass, model fit, AICc, SVL, duration, behavioral · block
oscr:b:9TQ865HP9C2C2-A· Report a mismatch
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
R · 586 lines · 30 KB · CC-BY-4.0 · 5 matches
- # DATA ANALYSIS
- # EVOKED NEURAL ACTIVITY IN CHORUS FROGS REVEALS CANDIDATE MECHANISMS OF ENAHANCED SPECIES RECOGNITION
- ##### PART 1: FUNCTIONAL SPECIALIZATION OF BRAIN REGIONS
- ##### Load packages
- library(readxl)
- library(MASS)
- library(lme4)
- library(ggplot2)
- library(emmeans)
- #### Import data
- area_data <- read_excel("R_input_data.xlsx",
- sheet = "area_data", col_types = c("text",
- "text", "text", "numeric", "numeric"))
- ID_info <- read_excel("R_input_data.xlsx",
- sheet = "ID_info", col_types = c("text",
- "text", "numeric", "numeric"))
- ##### Combine data frames into complete dataset
- all_data2 <- merge(area_data, ID_info, by.x= "ID", by.y= "ID", all.x=TRUE, all.y=TRUE)
- ##### Generate region-specific datasets
- IC2 <- all_data2[all_data2$region=="IC",]
- Gc2 <- all_data2[all_data2$region=="Gc",]
- Str2 <- all_data2[all_data2$region=="Str",]
- Mp2 <- all_data2[all_data2$region=="Mp",]
- aPOA2 <- all_data2[all_data2$region=="aPOA",]
- Ls2 <- all_data2[all_data2$region=="Ls",]
- Acc2 <- all_data2[all_data2$region=="Acc",]
- Dp2 <- all_data2[all_data2$region=="Dp",]
- TP2 <- all_data2[all_data2$region=="TP",]
- VH2 <- all_data2[all_data2$region=="VH",]
- BST2 <- all_data2[all_data2$region=="BST",]
- MeA2 <- all_data2[all_data2$region=="MeA",]
- MgV2 <- all_data2[all_data2$region=="MgV",]
- ##### Inferior colliculus
- IC2_all <- glmer.nb(count~group+call_in_response+offset(log(area))+(1|ID)+(1|sac_time)+(1|sac_day), data=IC2)
- ranef(IC2_all)
- # IC model with all random effects fails to converge due to near-zero effects of sac day, sac time and individual ID. Will exclude.
- IC_m1 <- glm.nb(count~group+call_in_response+offset(log(area)), data=IC2)
- IC_m2 <- glm.nb(count~group*call_in_response+offset(log(area)), data=IC2)
- anova(IC_m1, IC_m2)
- # Interactive model is better fit than additive model (p=0.024)
- summary(IC_m2)
- # figure
- ggplot(IC2, aes(x=group, y=count, fill=group))+geom_boxplot()+scale_fill_manual(values=c("#648FFF", "#DC267F", "#FE6100", "#FFB000"))+labs(x="Stimulus", y="Number of pS6-positive cells")+theme_classic()+theme(legend.position="none")+theme(axis.title=element_text(size=15))+theme(axis.text=element_text(size=12))
- # Post hoc analysis of main effects: using additive model for pairwise comparisons since these can be affected by interaction terms
- IC_post <- emmeans(IC_m1, "group", data=IC2)
- pairs(IC_post, adjust="tukey")
- ##### Nucleus accumbens
- Acc2_all <- glmer.nb(count~group+call_in_response+(1|ID)+offset(log(area)), data=Acc2_nooutliers)
- ranef(Acc2_all)
- # Acc model with all random effects fails to converge due to near-zero effects of sac day, sac time and individual ID. Will exclude.
- Acc_m1 <- glm.nb(count~group+call_in_response+offset(log(area)), data=Acc2)
- Acc_m2 <- glm.nb(count~group*call_in_response+offset(log(area)), data=Acc2)
- anova(Acc_m1, Acc_m2)
- # Interactive model is not a better fit than additive model (p=0.977)
- summary(Acc_m1)
- # figure
- ggplot(Acc2, aes(x=group, y=count, fill=group))+geom_boxplot()+scale_fill_manual(values=c("#648FFF", "#DC267F", "#FE6100", "#FFB000"))+labs(x="Stimulus", y="Number of pS6-positive cells")+theme_classic()+theme(legend.position="none")+theme(axis.title=element_text(size=15))+theme(axis.text=element_text(size=12))
- # No significant effects of group or call in response
- ##### Griseum centrale
- Gc2_all <- glmer.nb(count~group+call_in_response+(1|ID)+(1|sac_day)+(1|sac_time)+offset(log(area)), data=Gc2)
- ranef(Gc2_all)
- # Gc model with all random effects fails to converge due to near-zero effects of sac day, sac time, and indiv ID. Will exclude.
- Gc2_m1 <- glm.nb(count~group+call_in_response+offset(log(area)), data=Gc2)
- Gc2_m2 <- glm.nb(count~ group*call_in_response+offset(log(area)), data=Gc2)
- anova(Gc2_m1, Gc2_m2)
- # Interactive model is not better fit than additive model
- summary(Gc2_m1)
- ggplot(Gc2, aes(x=group, y=count, fill=group))+geom_boxplot()+scale_fill_manual(values=c("#648FFF", "#DC267F", "#FE6100", "#FFB000"))+labs(x="Stimulus", y="Number of pS6-positive cells")+theme_classic()+theme(legend.position="none")+theme(axis.title=element_text(size=15))+theme(axis.text=element_text(size=12))
- # Post hoc analysis of main effects
- Gc_post <- emmeans(Gc2_m1, "group", data=Gc2)
- summary(Gc_post)
- pairs(Gc_post, adjust="tukey")
- Gc_post2 <- emmeans(Gc2_m1, "call_in_response",data=Gc2)
- pairs(Gc_post2)
- # figure
- ggplot(Gc2, aes(x=call_in_response, y=count, fill=call_in_response))+geom_boxplot()+scale_fill_manual(values=c("#1A85FF", "#D41159"))+labs(x="Calling in response to stimulus", y="Number of pS6-positive cells")+theme_classic()+theme(legend.position="none")+theme(axis.title=element_text(size=15))+theme(axis.text=element_text(size=12))
- ##### Striatum
- Str2_all <- glmer.nb(count~group+call_in_response+(1|ID)+(1|sac_day)+(1|sac_time)+offset(log(area)), data=Str2)
- ranef(Str2_all)
- # Str model with all random effects fails to converge due to near-zero effects of sac day, sac time, and individual ID. Will exclude.
- Str2_m1 <- glm.nb(count~group+call_in_response+offset(log(area)), data=Str2)
- Str2_m2 <- glm.nb(count~group*call_in_response+offset(log(area)), data=Str2)
- anova(Str2_m1, Str2_m2)
- # Interactive model is not better fit than the additive model (p=0.08)
- summary(Str2_m1)
- # Post hoc analysis of main effects
- Str_post <- emmeans(Str2_m1, "group", data=Str2)
- pairs(Str_post, adjust="tukey")
- Str_post2 <- emmeans(Str2_m1,"call_in_response",data=Str2)
- pairs(Str_post2, adjust="tukey")
- # figures
- ggplot(Str2, aes(x=group, y=count, fill=group))+geom_boxplot()+scale_fill_manual(values=c("#648FFF", "#DC267F", "#FE6100", "#FFB000"))+labs(x="Stimulus", y="Number of pS6-positive cells")+theme_classic()+theme(legend.position="none")+theme(axis.title=element_text(size=15))+theme(axis.text=element_text(size=12))
- ggplot(Str2, aes(x=call_in_response, y=count, fill=call_in_response))+geom_boxplot()+scale_fill_manual(values=c("#1A85FF", "#D41159"))+labs(x="Calling in response to stimulus", y="Number of pS6-positive cells")+theme_classic()+theme(legend.position="none")+theme(axis.title=element_text(size=15))+theme(axis.text=element_text(size=12))
- ##### Medial pallium
- Mp2_all <- glmer.nb(count~group+call_in_response+(1|ID)+(1|sac_time)+(1|sac_day)+offset(log(area)), data=Mp2)
- ranef(Mp2_all)
- # Mp model with all random effects fails to converge due to near-zero effect of sac day. Will exclude.
- Mp2_id_time <- glmer.nb(count~group+call_in_response+(1|ID)+(1|sac_time)+offset(log(area)), data=Mp2)
- Mp2_id <- glmer.nb(count~group+call_in_response+(1|ID)+offset(log(area)), data=Mp2)
- anova(Mp2_id_time, Mp2_id)
- # Model that includes a random effect of sac_time is not a better fit than the model with only a random effect of individual ID (p=0.30)
- Mp2_id2 <- glmer.nb(count~group*call_in_response+(1|ID)+offset(log(area)), data=Mp2)
- # Interactive model fails to converge to over parameterization
- summary(Mp2_id)
- # Post hoc analyses of main effects
- Mp_post <- emmeans(Mp2_id, "group", data=Mp2)
- pairs(Mp_post, adjust="tukey")
- # figure
- ggplot(Mp2, aes(x=group, y=count, fill=group))+geom_boxplot()+scale_fill_manual(values=c("#648FFF", "#DC267F", "#FE6100", "#FFB000"))+labs(x="Stimulus", y="Number of pS6-positive cells")+theme_classic()+theme(legend.position="none")+theme(axis.title=element_text(size=15))+theme(axis.text=element_text(size=12))
- ##### Preoptic area
- poa2_all <- glmer.nb(count~group+call_in_response+(1|ID)+(1|sac_time)+(1|sac_day)+offset(log(area)), data=aPOA2)
- ranef(poa2_all)
- # aPOA model with all random effects fails to converge due to near-zero effect of sac day, sac time, and individual ID. Will exclude.
- poa2_m1 <- glm.nb(count~group+call_in_response+offset(log(area)), data=aPOA2)
- poa2_m2 <- glm.nb(count~group*call_in_response+offset(log(area)), data=aPOA2)
- anova(poa2_m1, poa2_m2)
- # Interactive model is not a better fit than additive model
- summary(poa2_m1)
- # Post hoc analyses of main effects
- poa_post <- emmeans(poa2_m1, "group", data=aPOA2)
- pairs(poa_post, adjust="tukey")
- # figure
- ggplot(aPOA2, aes(x=group, y=count, fill=group))+geom_boxplot()+scale_fill_manual(values=c("#648FFF", "#DC267F", "#FE6100", "#FFB000"))+labs(x="Stimulus", y="Number of pS6-positive cells")+theme_classic()+theme(legend.position="none")+theme(axis.title=element_text(size=15))+theme(axis.text=element_text(size=12))
- ##### BNST
- bst2_all <- glmer.nb(count~group+call_in_response+(1|ID)+(1|sac_time)+(1|sac_day)+offset(log(area)), data=BST2)
- ranef(bst2_all)
- # BST model with all random effects fails to converge due to near-zero effect of sac day, sac time, and individual ID. Will exclude.
- bst2_m1 <- glm.nb(count~group+call_in_response+offset(log(area)), data=BST2)
- bst2_m2 <- glm.nb(count~group*call_in_response+offset(log(area)), data=BST2)
- anova(bst2_m1, bst2_m2)
- # Interactive model is not a better fit than additive model
- summary(bst2_m1)
- # Post hoc analyses of main effects
- bst_post <- emmeans(bst2_m1, "group", data=BST2)
- pairs(bst_post, adjust="tukey")
- # figure
- ggplot(BST2, aes(x=group, y=count, fill=group))+geom_boxplot()+scale_fill_manual(values=c("#648FFF", "#DC267F", "#FE6100", "#FFB000"))+labs(x="Stimulus", y="Number of pS6-positive cells")+theme_classic()+theme(legend.position="none")+theme(axis.title=element_text(size=15))+theme(axis.text=element_text(size=12))
- ##### Dorsal pallium
- dp2_all <- glmer.nb(count~group+call_in_response+(1|ID)+(1|sac_day)+(1|sac_time)+offset(log(area)), data=Dp2)
- ranef(dp2_all)
- # Dp model with all random effects fails to converge due to near-zero effect of sac time. Will exclude
- dp2_id_day <- glmer.nb(count~group+call_in_response+(1|ID)+(1|sac_day)+offset(log(area)), data=Dp2)
- dp2_id <- glmer.nb(count~group+call_in_response+(1|ID)+offset(log(area)), data=Dp2)
- anova(dp2_id, dp2_id_day)
- # Model with a random effect of sac day is not significantly better fit than model without
- dp2_m2 <- glmer.nb(count~group*call_in_response+(1|ID)+offset(log(area)), data=Dp2)
- # Interactive model fails to converge due to over parameterization
- summary(dp2_id)
- # Post hoc analyses of main effects
- dp_post <- emmeans(dp2_id, "group", data=Dp2)
- pairs(dp_post, adjust="tukey")
- # figure
- ggplot(Dp2, aes(x=group, y=count, fill=group))+geom_boxplot()+scale_fill_manual(values=c("#648FFF", "#DC267F", "#FE6100", "#FFB000"))+labs(x="Stimulus", y="Number of pS6-positive cells")+theme_classic()+theme(legend.position="none")+theme(axis.title=element_text(size=15))+theme(axis.text=element_text(size=12))
- ##### Lateral septum
- ls2_all <- glmer.nb(count~group+call_in_response+(1|ID)++(1|sac_time)+(1|sac_day)+offset(log(area)), data=Dp2)
- ranef(ls2_all)
- # Ls model with all random effects fails to converge due to near-zero effect of sac time and sac day. Will exclude
- ls2_m1 <- glmer.nb(count~group+call_in_response+(1|ID)+offset(log(area)), data=Ls2)
- ls2_m2 <- glmer.nb(count~group*call_in_response+(1|ID)+offset(log(area)), data=Ls2)
- # Interactive mdoel fails to converge due to over parameterization
- summary(ls2_m1)
- # Post hoc analyses of main effects
- ls_post <- emmeans(ls2_m1, "group", data=Ls2)
- pairs(ls_post, adjust="tukey")
- ls_post2 <- emmeans(ls2_m1, "call_in_response", data=Ls2)
- pairs(ls_post2, adjust="tukey")
- # figure
- ggplot(Ls2, aes(x=group, y=count, fill=group))+geom_boxplot()+scale_fill_manual(values=c("#648FFF", "#DC267F", "#FE6100", "#FFB000"))+labs(x="Stimulus", y="Number of pS6-positive cells")+theme_classic()+theme(legend.position="none")+theme(axis.title=element_text(size=15))+theme(axis.text=element_text(size=12))
- ##### Medial amygdala
- mea2_all <- glmer.nb(count~group+call_in_response+(1|ID)+(1|sac_time)+(1|sac_day)+offset(log(area)), data=MeA2)
- ranef(mea2_all)
- # MeA model with all random effects fails to converge due to near-zero effect of sac time, sac day, and individual ID. Will exclude
- mea2_m1 <- glm.nb(count~group+call_in_response+offset(log(area)), data=MeA2)
- mea2_m2 <- glm.nb(count~group*call_in_response+offset(log(area)), data=MeA2)
- anova(mea2_m1, mea2_m2)
- # Interactive model is not a better fit than additive model
- summary(mea2_m1)
- # Post hoc analyses of main effects
- mea_post <- emmeans(mea2_m1, "group", data=MeA2)
- pairs(mea_post, adjust="tukey")
- # figure
- ggplot(MeA2, aes(x=group, y=count, fill=group))+geom_boxplot()+scale_fill_manual(values=c("#648FFF", "#DC267F", "#FE6100", "#FFB000"))+labs(x="Stimulus", y="Number of pS6-positive cells")+theme_classic()+theme(legend.position="none")+theme(axis.title=element_text(size=15))+theme(axis.text=element_text(size=12))
- ##### Ventral magnocellular preoptic nucleus
- mgv2_all <- glmer.nb(count~group+call_in_response+(1|ID)+(1|sac_day)+(1|sac_time)+offset(log(area)), data=MgV2)
- ranef(mgv2_all)
- # MeA model with all random effects fails to converge due to near-zero effect of sac time, sac day, and individual ID. Will exclude
- mgv2_m1 <- glm.nb(count~group+call_in_response+offset(log(area)), data=MgV2)
- mgv2_m2 <- glm.nb(count~group*call_in_response+offset(log(area)), data=MgV2)
- anova(mgv2_m1, mgv2_m2)
- # Interactive model is not a better fit than additive model
- summary(mgv2_m1)
- # No main effects
- # figure
- ggplot(MgV2, aes(x=group, y=count, fill=group))+geom_boxplot()+scale_fill_manual(values=c("#648FFF", "#DC267F", "#FE6100", "#FFB000"))+labs(x="Stimulus", y="Number of pS6-positive cells")+theme_classic()+theme(legend.position="none")+theme(axis.title=element_text(size=15))+theme(axis.text=element_text(size=12))
- ##### Posterior tuberculum
- tp2_all <- glmer.nb(count~group+call_in_response+(1|ID)+(1|sac_time)+(1|sac_day)+offset(log(area)), data=TP2)
- ranef(tp2_all)
- # TP model with all random effects fails to converge due to near-zero effect of sac time, sac day, and individual ID. Will exclude
- tp2_m1 <- glm.nb(count~group+call_in_response+offset(log(area)), data=TP2)
- tp2_m2 <- glm.nb(count~group*call_in_response+offset(log(area)), data=TP2)
- anova(tp2_m1, tp2_m2)
- # Interactive model is not a better fit than additive model (p=0.08)
- summary(tp2_m1)
- # No main effects
- # figure
- ggplot(TP2, aes(x=group, y=count, fill=group))+geom_boxplot()+scale_fill_manual(values=c("#648FFF", "#DC267F", "#FE6100", "#FFB000"))+labs(x="Stimulus", y="Number of pS6-positive cells")+theme_classic()+theme(legend.position="none")+theme(axis.title=element_text(size=15))+theme(axis.text=element_text(size=12))
- ##### Ventral hypothalamus
- vh2_all <- glmer.nb(count~group+call_in_response+(1|ID)+(1|sac_time)+(1|sac_day)+offset(log(area)), data=VH2)
- ranef(vh2_all)
- # VH model with all random effects fails to converge due to near-zero effect of sac day
- vh2_id_time <- glmer.nb(count~group+call_in_response+(1|ID)+(1|sac_time)+offset(log(area)), data=VH2)
- vh2_id <- glmer.nb(count~group+call_in_response+(1|ID)+offset(log(area)), data=VH2)
- anova(vh2_id_time, vh2_id)
- vh2_m2 <- glmer.nb(count~group*call_in_response+(1|ID)+offset(log(area)), data=VH2)
- anova(vh2_id, vh2_m2)
- # Interactive model is not significantly better fit than additive model
- summary(vh2_id)
- # No main effects
- # figure
- ggplot(VH2, aes(x=group, y=count, fill=group))+geom_boxplot()+scale_fill_manual(values=c("#648FFF", "#DC267F", "#FE6100", "#FFB000"))+labs(x="Stimulus", y="Number of pS6-positive cells")+theme_classic()+theme(legend.position="none")+theme(axis.title=element_text(size=15))+theme(axis.text=element_text(size=12))
- # Figure of all regions together
- ggplot(all_data2, aes(x=group, y=count, fill=group))+ geom_boxplot()+scale_fill_manual(values=c("#648FFF", "#DC267F", "#FE6100", "#FFB000"))+labs(x="Stimulus", y="Number of pS6-positive cells")+theme_classic()+theme(legend.position="none")+theme(axis.title=element_text(size=15))+theme(axis.text=element_text(size=12))+facet_wrap(~region)
- #### PART 2: FUNCTIONAL CONNECTIVITY AMONG BRAIN REGIONS
- #### Load packages
- library(readxl)
- library(sna)
- library(writexl)
- library(corrplot)
- #### QAP tests to compare similarity among matrices of pS6+ cell counts
- # Import data
- area_data <- read_excel("R_input_data.xlsx",
- sheet = "area_data", col_types = c("text",
- "text", "text", "numeric", "numeric"))
- ID_info <- read_excel("R_input_data.xlsx",
- sheet = "ID_info", col_types = c("text",
- "text", "numeric", "numeric"))
- # Combine data frames into complete dataset and subset
- all_data2 <- merge(area_data, ID_info, by.x= "ID", by.y= "ID", all.x=TRUE, all.y=TRUE)
- subset_all_data2 <- all_data2[,c(2,3,4)]
- FL <- subset_all_data2[subset_all_data2$group=="FL",]
- AL <- subset_all_data2[subset_all_data2$group=="AL",]
- Nigrita <- subset_all_data2[subset_all_data2$group=="nigrita",]
- Control <- subset_all_data2[subset_all_data2$group=="silence",]
- # For each stim group, further refine data
- FL_sub <- FL[,c(2,3)]
- AL_sub <- AL[,c(2,3)]
- Nigrita_sub <- Nigrita[,c(2,3)]
- Control_sub <- Control[,c(2,3)]
- ## at this point, need to manually transform each subsetted data frame into wide format and reload into R under the same name
- # Convert each subsetted data frame into a matrix
- FL_matrix <- as.matrix(FL_sub)
- AL_matrix <- as.matrix(AL_sub)
- Nigrita_matrix <- as.matrix(Nigrita_sub)
- Control_matrix <- as.matrix(Control_sub)
- # cannot use Control group for further analysis due to zero-inflated data. Standard deviation in many columns approaches zero.
- # Generate correlation matrices from each matrix
- corFL_matrix <- cor(FL_matrix, method="pearson", use = "complete.obs")
- corAL_matrix <- cor(AL_matrix, method="pearson", use = "complete.obs")
- corNigrita_matrix <- cor(Nigrita_matrix, method="pearson", use="complete.obs")
- # QAP test comparing FL and AL correlation matrices
- qap_FL_AL <- qaptest(list(corFL_matrix, corAL_matrix), gcor, g1=1, g2=2, reps=5000)
- summary(qap_FL_AL)
- # really low correlation. not sig dif. therefore the matrices are different from one another
- # null hypothesis is that the correlations are related
- # QAP test comparing FL and P. nigrita correlation matrices
- qap_FL_N <- qaptest(list(corFL_matrix, corNigrita_matrix), gcor, g1=1, g2=2, reps=5000)
- summary(qap_FL_N)
- # really low correlation. not sig dif. therefore the matrices are different from one another
- # QAP test comparing AL and P. nigrita correlation matrices
- qap_AL_N <- qaptest(list(corAL_matrix, corNigrita_matrix), gcor, g1=1, g2=2, reps=5000)
- summary(qap_AL_N)
- # really low correlation. not sig dif. therefore the matrices are different from one another
- ####Correlation tests and heatmaps for pairs of regions in each stim group
- # Florida
- # remove NAs from matrix
- FL_matrix2 <- FL_matrix[!rowSums(is.na(FL_matrix)),]
- # correlation test between regions
- FL_cor <- cor.mtest(FL_matrix2)
- # generate heatmap
- corrplot(cor(FL_matrix2),method='color',diag = FALSE, type = 'upper',
- sig.level = c(0.001, 0.01, 0.05), pch.cex = 0.9, insig = 'label_sig', pch.col = 'black',
- order = 'alphabet', title = "", p.mat = FL_cor$p, tl.col="black", tl.cex=0.8,
- col=colorRampPalette(c("#785ef0","white","#dc267f"))(100))
- # Alabama
- # remove NAs from matrix
- AL_matrix2 <- AL_matrix[!rowSums(is.na(AL_matrix)),]
- # correlation test between regions
- AL_cor <- cor.mtest(AL_matrix2)
- # generate heatmap
- corrplot(cor(AL_matrix2),method='color',diag = FALSE, type = 'upper',
- sig.level = c(0.001, 0.01, 0.05), pch.cex = 0.9, insig = 'label_sig', pch.col = 'black',
- order = 'alphabet', title = "", p.mat = AL_cor$p, tl.col="black", tl.cex=0.8,
- col=colorRampPalette(c("#785ef0","white","#dc267f"))(100))
- # P. nigrita
- # remove NAs from matrix
- Nigrita_matrix2 <- Nigrita_matrix[!rowSums(is.na(Nigrita_matrix)),]
- # correlation test between regions
- Nigrita_cor <- cor.mtest(Nigrita_matrix2)
- # generate heatmap
- corrplot(cor(Nigrita_matrix2),method='color',diag = FALSE, type = 'upper',
- sig.level = c(0.001, 0.01, 0.05), pch.cex = 0.9, insig = 'label_sig', pch.col = 'black',
- order = 'alphabet', title = "", p.mat = Nigrita_cor$p, tl.col="black", tl.cex=0.8,
- col=colorRampPalette(c("#785ef0","white","#dc267f"))(100))
- #### PART 3: MALE BEHAVIOR ANALYSES
- #### Load packages
- library(readxl)
- library(lmerTest)
- library(lme4)
- library(emmeans)
- library(AICcmodavg)
- library(ggplot2)
- # Import data
- data_behavior <- read_excel("R_input_data.xlsx",
- col_types = c("text", "text", "text",
- "text", "numeric", "text", "numeric",
- "numeric", "numeric", "numeric"))
- body_cond <- read_excel("R_input_data.xlsx",
- sheet = "body_cond", col_types = c("text",
- "numeric", "numeric"))
- # Merge behavior and body condition data
- data <- merge(data_behavior, body_cond, by.x= "ID", by.y= "ID", all.x=TRUE, all.y=TRUE)
- # Replace all NAs in Duration with zeroes
- data$Duration[is.na(data$Duration)] <- 0
- # Change Behavior and Stimulus columns to factors for input to lmer
- data$Behavior <- factor (data$Behavior)
- data$Stimulus <- factor (data$Stimulus)
- # Model
- durationmod <- lmer(Duration ~ Stimulus * Behavior + (1 | frog_ID), data = data)
- summary <- summary(durationmod)
- # ANOVA with Kenward-Roger degrees of freedom for analysis of fixed effects
- anova(durationmod, ddf = "Kenward-Roger")
- # Pairwise post hoc analysis of interactive effects
- emmeans(durationmod, pairwise ~ Stimulus | Behavior)
- #### Test for an effect of body mass and SVL on the duration of behaviors
- # Model generation
- test1 <-lmer(Duration ~ Stimulus * Behavior * SVL + (1 | frog_ID), data = data, REML=FALSE)
- test2 <-lmer(Duration ~ Stimulus * Behavior * mass + (1 | frog_ID), data = data, REML=FALSE)
- test3 <- lmer(Duration ~ Stimulus * Behavior + (1 | frog_ID), data = data, REML=FALSE)
- # Compare model fits with AICc
- Cand.models<-list("SVL"=test1,"mass"=test2, "simple"=test3)
- selectionTable <- aictab(cand.set = Cand.models)
- selectionTable
- # Simple model is the best fit, there is no effect of SVL or body mass on behavior duration
- #### Descriptive statistics
- # Calling duration
- # Subset data
- calling <- data[data$Behavior== "calling",]
- # Subset by stimulus type and calculate mean and sd for each
- call_FL <- calling[calling$Stimulus=="FL", "Duration"]
- mean(call_FL$Duration)
- sd(call_FL$Duration)
- call_AL <- calling[calling$Stimulus=="AL", "Duration"]
- mean(call_AL$Duration)
- sd(call_AL$Duration)
- call_nigrita <- calling[calling$Stimulus=="nigrita", "Duration"]
- mean(call_nigrita$Duration)
- sd(call_nigrita$Duration)
- call_silence <- calling[calling$Stimulus=="silence", "Duration"]
- mean(call_silence$Duration)
- sd(call_silence$Duration)
- # Duration in tub
- # Subset data
- tub <- data[data$Behavior== "in_tub",]
- # Subset by stimulus type and calculate mean and sd for each
- tub_FL <- tub[tub$Stimulus=="FL", "Duration"]
- mean(tub_FL$Duration)
- sd(tub_FL$Duration)
- tub_AL <- tub[tub$Stimulus=="AL", "Duration"]
- mean(tub_AL$Duration)
- sd(tub_AL$Duration)
- tub_nigrita <- tub[tub$Stimulus=="nigrita", "Duration"]
- mean(tub_nigrita$Duration)
- sd(tub_nigrita$Duration)
- tub_silence <- tub[tub$Stimulus=="silence", "Duration"]
- mean(tub_silence$Duration)
- sd(tub_silence$Duration)
- # Total time in motion
- # Subset data
- move <- data[data$Behavior== "movement",]
- # Subset by stimulus type and calculate mean and sd for each
- move_FL <- move[move$Stimulus=="FL", "Duration"]
- mean(move_FL$Duration)
- sd(move_FL$Duration)
- move_AL <- move[move$Stimulus=="AL", "Duration"]
- mean(move_AL$Duration)
- sd(move_AL$Duration)
- move_nigrita <- move[move$Stimulus=="nigrita", "Duration"]
- mean(move_nigrita$Duration)
- sd(move_nigrita$Duration)
- move_silence <- move[move$Stimulus=="silence", "Duration"]
- mean(move_silence$Duration)
- sd(move_silence$Duration)
- # Calling bouts
- # Subset by stimulus type and calculate mean and sd for each
- callnum_FL <- calling[calling$Stimulus=="FL", "Occurences"]
- mean(callnum_FL$Occurences)
- sd(callnum_FL$Occurences)
- callnum_AL <- calling[calling$Stimulus=="AL", "Occurences"]
- mean(callnum_AL$Occurences)
- sd(callnum_AL$Occurences)
- callnum_nigrita <- calling[calling$Stimulus=="nigrita", "Occurences"]
- mean(callnum_nigrita$Occurences)
- sd(callnum_nigrita$Occurences)
- callnum_silence <- calling[calling$Stimulus=="silence", "Occurences"]
- mean(callnum_silence$Occurences)
- sd(callnum_silence$Occurences)
- # Total time on side of the arena with stimulus speaker
- # Subset data
- stimside <- data[data$Behavior== "stim_side_total",]
- # Subset by stimulus type and calculate mean and sd for each
- stim_FL <- stimside[stimside$Stimulus=="FL", "Duration"]
- mean(stim_FL$Duration)
- sd(stim_FL$Duration)
- stim_AL <- stimside[stimside$Stimulus=="AL", "Duration"]
- mean(stim_AL$Duration)
- sd(stim_AL$Duration)
- stim_nigrita <- stimside[stimside$Stimulus=="nigrita", "Duration"]
- mean(stim_nigrita$Duration)
- sd(stim_nigrita$Duration)
- # Total time in pool with stimulus speaker
- # Subset data
- stimpool <- data[data$Behavior== "stim_pool",]
- # Subset by stimulus type and calculate mean and sd for each
- stimpool_FL <- stimpool[stimpool$Stimulus=="FL", "Duration"]
- mean(stimpool_FL$Duration)
- sd(stimpool_FL$Duration)
- stimpool_AL <- stimpool[stimpool$Stimulus=="AL", "Duration"]
- mean(stimpool_AL$Duration)
- sd(stimpool_AL$Duration)
- stimpool_nigrita <- stimpool[stimpool$Stimulus=="nigrita", "Duration"]
- mean(stimpool_nigrita$Duration)
- sd(stimpool_nigrita$Duration)
- # Total time on tub edge facing stimulus speaker
- # Subset data
- stimedge <- data[data$Behavior== "stim_edge",]
- # Subset by stimulus type and calculate mean and sd for each
- stimedge_FL <- stimedge[stimedge$Stimulus=="FL", "Duration"]
- mean(stimedge_FL$Duration)
- sd(stimedge_FL$Duration)
- stimedge_AL <- stimedge[stimedge$Stimulus=="AL", "Duration"]
- mean(stimedge_AL$Duration)
- sd(stimedge_AL$Duration)
- stimedge_nigrita <- stimedge[stimedge$Stimulus=="nigrita", "Duration"]
- mean(stimedge_nigrita$Duration)
- sd(stimedge_nigrita$Duration)
- # Total time on side of the arena opposite stimulus speaker
- # Subset data
- opposide <- data[data$Behavior== "oppo_side_total",]
- # Subset by stimulus type and calculate mean and sd for each
- oppo_FL <- opposide[opposide$Stimulus=="FL", "Duration"]
- mean(oppo_FL$Duration)
- sd(oppo_FL$Duration)
- oppo_AL <- opposide[opposide$Stimulus=="AL", "Duration"]
- mean(oppo_AL$Duration)
- sd(oppo_AL$Duration)
- oppo_nigrita <- opposide[opposide$Stimulus=="nigrita", "Duration"]
- mean(oppo_nigrita$Duration)
- sd(oppo_nigrita$Duration)
- # Total time in pool opposite stimulus speaker
- # Subset data
- oppopool <- data[data$Behavior== "oppo_pool",]
- # Subset by stimulus type and calculate mean and sd for each
- oppopool_FL <- oppopool[oppopool$Stimulus=="FL", "Duration"]
- mean(oppopool_FL$Duration)
- sd(oppopool_FL$Duration)
- oppopool_AL <- oppopool[oppopool$Stimulus=="AL", "Duration"]
- mean(oppopool_AL$Duration)
- sd(oppopool_AL$Duration)
- oppopool_nigrita <- oppopool[oppopool$Stimulus=="nigrita", "Duration"]
- mean(oppopool_nigrita$Duration)
- sd(oppopool_nigrita$Duration)
- # Total time on edge of tub opposite stimulus speaker
- # Subset data
- oppoedge <- data[data$Behavior== "oppo_edge",]
- # Subset by stimulus type and calculate mean and sd for each
- oppoedge_FL <- oppoedge[oppoedge$Stimulus=="FL", "Duration"]
- mean(oppoedge_FL$Duration)
- sd(oppoedge_FL$Duration)
- oppoedge_AL <- oppoedge[oppoedge$Stimulus=="AL", "Duration"]
- mean(oppoedge_AL$Duration)
- sd(oppoedge_AL$Duration)
- oppoedge_nigrita <- oppoedge[oppoedge$Stimulus=="nigrita", "Duration"]
- mean(oppoedge_nigrita$Duration)
- sd(oppoedge_FL$Duration)
- #### Figure generation
- # import wide data set
- wide_data <- read_excel("R_input_data.xlsx",
- + sheet = "data_wide", col_types = c("numeric",
- "text", "text", "text", "text", "numeric",
- "numeric", "numeric", "numeric",
- "numeric", "numeric", "numeric",
- "numeric", "numeric", "numeric",
- "numeric", "numeric", "numeric",
- "numeric", "numeric", "numeric",
- "numeric", "numeric", "numeric",
- "numeric", "numeric", "numeric",
- "numeric", "numeric", "numeric",
- "numeric", "numeric", "numeric",
- "numeric", "numeric", "numeric",
- "numeric"))
- # Create dataset without Silence stimulus group for some graphs
- data_nosilence <- wide_data[!(wide_data$Stimulus %in% "silence"),]
- # calling duration
- ggplot(wide_data, aes(x=Stimulus, y=calling_duration, fill=Stimulus))+geom_boxplot()+scale_fill_manual(values=c("#648FFF", "#DC267F", "#FE6100", "#FFB000"))+labs(x="Stimulus", y="Calling duration (s)")+theme_classic()+theme(legend.position="none")+theme(axis.title=element_text(size=15))+theme(axis.text=element_text(size=12))
- # movement duration
- ggplot(wide_data, aes(x=Stimulus, y=movement_duration, fill=Stimulus))+geom_boxplot()+scale_fill_manual(values=c("#648FFF", "#DC267F", "#FE6100", "#FFB000"))+labs(x="Stimulus", y="Movement duration (s)")+theme_classic()+theme(legend.position="none")+theme(axis.title=element_text(size=15))+theme(axis.text=element_text(size=12))
- # in tub duration
- ggplot(wide_data, aes(x=Stimulus, y=in_tub_duration, fill=Stimulus))+geom_boxplot()+scale_fill_manual(values=c("#648FFF", "#DC267F", "#FE6100", "#FFB000"))+labs(x="Stimulus", y="Duration in central tub (s)")+theme_classic()+theme(legend.position="none")+theme(axis.title=element_text(size=15))+theme(axis.text=element_text(size=12))
- # stimulus side duration
- ggplot(data_nosilence, aes(x=Stimulus, y=stim_side_total_duration, fill=Stimulus))+geom_boxplot()+scale_fill_manual(values=c("#648FFF", "#DC267F", "#FE6100", "#FFB000"))+labs(x="Stimulus", y="Time on stimulus side of arena (s)")+theme_classic()+theme(legend.position="none")+theme(axis.title=element_text(size=15))+theme(axis.text=element_text(size=12))
- # opposite side duration
- ggplot(data_nosilence, aes(x=Stimulus, y=oppo_side_total_duration, fill=Stimulus))+geom_boxplot()+scale_fill_manual(values=c("#648FFF", "#DC267F", "#FE6100", "#FFB000"))+labs(x="Stimulus", y="Time on side of arena opposite the stimulus (s)")+theme_classic()+theme(legend.position="none")+theme(axis.title=element_text(size=15))+theme(axis.text=element_text(size=12))
analysis_combined copy.R, under CC-BY-4.0 · at the source
Overview
- Department of Biological Science, Florida State University, 319 Stadium Drive, Tallahassee, FL 32306, USA
- Program in Neuroscience, Florida State University, Tallahassee, FL 32306, USA
- Institute of Molecular Biophysics, Florida State University, Tallahassee, FL 32306, USA
Abstract
Species recognition and courtship behaviors are powerful drivers of speciation. Here, we investigated the neural and behavioral signatures of species recognition in Upland chorus frogs (Pseudacris feriarum). Populations of this species that are sympatric with congeners (e.g. Pseudacris nigrita) have evolved divergent male mating calls and enhanced acoustic discrimination by females owing to costly interspecific hybridization. Herein, we examined evoked neural activity and behaviors in male P. feriarum in response to sympatric, allopatric or heterospecific calls, or silence, via phospho-S6 ribosomal protein immunofluorescence. The sympatric call evoked activity in several brain regions that regulate spatial navigation and social decision making, indicating that this call type may be an important trigger for navigating to and within a complex chorus environment. Moreover, each stimulus resulted in a unique pattern of coactivation among brain regions. Despite these neural changes, there were no differences in behavioral response to each stimulus. Our results suggest that signal input and behavioral output are coded independently in the brains of male chorus frogs. Together, these findings represent a first step towards understanding the neural basis of conspecific recognition in a system in which this trait contributes to ongoing diversification.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above, with 5 matches between paragraphs and lines of code.
figshare 31904626
Availability: 1 check, the latest on 29 September 2026: the link answers (HTTP 200)
- 29 September 2026: the link answers (HTTP 200)
1 file
- analysis_combined copy.R, R, 586 lines, 5 matches
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:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 1 script, each with its path and the digest of its content;
- 5 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.
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, 29 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 4 authors, 5 keywords, 7 MeSH terms, 3 funders, 68 references.
Cite
This paper
Ochoa, C. B., Loeven, A. M., Fadool, D. A., & Lemmon, E. M. (2026). Neural and behavioral responses to reproductive signals in male chorus frogs. The Journal of experimental biology, 229(8), jeb251686. https://
BibTeX
@article{ochoa2026neural
author = {Ochoa, Carlie B. and Loeven, Ashley M. and Fadool, Debra Ann and Lemmon, Emily Moriarty},
title = {{Neural and behavioral responses to reproductive signals in male chorus frogs}},
journal = {The Journal of experimental biology},
year = {2026},
month = apr,
volume = {229},
number = {8},
pages = {jeb251686},
publisher = {Company of Biologists},
issn = {0022-0949},
doi = {10.1242/
url = {https://
pmid = {41837375},
pmcid = {PMC13143210}
}
RIS
TY - JOUR
AU - Ochoa, Carlie B.
AU - Loeven, Ashley M.
AU - Fadool, Debra Ann
AU - Lemmon, Emily Moriarty
TI - Neural and behavioral responses to reproductive signals in male chorus frogs
T2 - The Journal of experimental biology
J2 - J Exp Biol
PY - 2026
DA - 2026/
VL - 229
IS - 8
SP - jeb251686
SN - 0022-0949
PB - Company of Biologists
DO - 10.1242/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1242/
"type": "article-journal",
"title": "Neural and behavioral responses to reproductive signals in male chorus frogs",
"container-title": "The Journal of experimental biology",
"author": [
{
"family": "Ochoa",
"given": "Carlie B."
},
{
"family": "Loeven",
"given": "Ashley M."
},
{
"family": "Fadool",
"given": "Debra Ann"
},
{
"family": "Lemmon",
"given": "Emily Moriarty"
}
],
"container-title-short":
"volume": "229",
"issue": "8",
"page": "jeb251686",
"DOI": "10.1242/
"PMID": "41837375",
"PMCID": "PMC13143210",
"ISSN": "0022-0949",
"publisher": "Company of Biologists",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
20
]
]
}
}
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.1186/s12864-021-07995-3 [code]
- Neurogenomic divergence during speciation by reinforcement of mating behaviors in chorus frogs (Pseudacris).Journal: BMC genomicsIn common: ggplot2, other, 5 references, author Emily Moriarty Lemmon
- [2] doi:10.1371/journal.pone.0268383
- Tuned in to communication sounds: Neuronal sensitivity in the túngara frog midbrain to frequency modulated signals.Journal: PloS oneIn common: other, 8 references
- [3] doi:10.1111/gbb.12907 [code]
- Divergent neural nodes are species- and hormone-dependent in the brood parasitic brain.Journal: Genes, brain, and behaviorIn common: emmeans, lmerTest, lme4, 1 other tool, other, 2 references
- [4] doi:10.1038/s41467-023-40331-9 [code]
- Cellular profiling of a recently-evolved social behavior in cichlid fishes.Journal: Nature communicationsIn common: lmerTest, lme4, ggplot2, other, 3 references
- [5] doi:10.1242/jcs.264088
- The superficial tufted and mitral cell output neurons of the mouse olfactory bulb have dual roles in insulin sensing.Journal: Journal of cell scienceIn common: 1 reference, author Debra Ann Fadool
- [6] doi:10.1038/s42003-024-07013-8 [code]
- Auditory pallial regulation of the social behavior network.Journal: Communications biologyIn common: other, cognitive, 3 references
- [7] doi:10.1111/gbb.70035 [code]
- Spatiotemporal Patterns of Gene Expression Associated With Mating Stimuli in the Brain of Female Guppies.Journal: Genes, brain, and behaviorIn common: 4 references
- [8] doi:10.1073/pnas.2418431122
- Cryptic genetic variation in brain gene expression precedes the evolution of cannibalism in spadefoot toad tadpoles.Journal: Proceedings of the National Academy of Sciences of the United States of AmericaIn common: other, 3 references
- [9] doi:10.1111/mec.70614 [code]
- Brain Transcriptomic Changes Associated With the Socially Regulated Behavioural Specialisation of Ant Queens.Journal: Molecular ecologyIn common: emmeans, lme4, ggplot2, other, 1 reference
- [10] doi:10.1038/s42003-022-03361-5 [code]
- Sense of self impacts spatial navigation and hexadirectional coding in human entorhinal cortex.Journal: Communications biologyIn common: lmerTest, lme4, ggplot2, cognitive, 1 reference
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.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 1 script, and 5 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:1d097f8c802da408…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.1242/jeb.251686)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1242/jeb.251686.svg
:target: https://openscicode.org/badge/doi/10.1242/jeb.251686
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1242/jeb.251686"><img src="https://openscicode.org/badge/doi/10.1242/jeb.251686.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge 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: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
