knitr::opts_chunk$set(echo = TRUE)
knitr::opts_chunk$set(message = FALSE)
knitr::opts_chunk$set(warning = FALSE)
pathname = getwd()
library(magrittr)
library(knitr)
library(dplyr)
library(ggplot2)
library(ggbeeswarm)
library(beeswarm)
library(ggthemes)
library(viridis)
library(lme4)
library(schoRsch)
library(DHARMa)
library(multcomp)
library(tidyr)
library(rstanarm)
library(ggrepel)
library(rstan)
library(rstanarm)
library(MASS)
devtools::install_github("mikeod38/dauergut")
library(dauergut)
library(plotly)


dauer_ANOVA <- . %>% lm(data = ., formula = pct ~ genotype)

Intestinal mTORC2 prevents dauer formation{.tabset}

1A

TOR complexes are involved in nutrient homostasis

Figure 1 The TORC2 signaling pathway in C. elegans (11, 53-55). Genes encoding conserved components of the pathway are indicated.

1B

strains<-c("N2", "rict-1(mg360)", "rict-1(ft7)", "sgk-1(ok538)", "akt-1(mg306)", "akt-2", "pkc-2")
foods <- "OP50"

TORC2<-read.csv(file.path(pathname, "extdata/1B_2D_rict-1_TORC2.csv"), header=TRUE) %>% dauergut::format_dauer(p.dauer = "non") #including partial/pd as non-dauer due to excess zeros. 

lm <- TORC2 %>% dauer_ANOVA()
#stan
stan.glmm <- TORC2 %>% dauergut::run_dauer_stan()
contrasts<-dauergut::dunnett_contrasts(lm, ref.index = 1, "genotype")
mixed<-dauergut::getStan_CIs(stan.glmm, type = "dauer")
plot.contrasts<-c("",contrasts$prange[1:6])

labels = c("WT", "rict-1(mg360)", "rict-1(ft7)", "sgk-1(ok538)", "akt-1(mg306)", "akt-2(ok393)", "pkc-2(ok328)") %>% stringr::str_wrap(width = 10)

(p<-dauergut::plot_CIs(TORC2, title='TORC2 prevents high temperature dauer formation', plot.contrasts, ypos = 1.075, type = "dauer", labels = labels))

Figure 1B

TORC2 controls high temperature-induced dauer formation. Increased dauer formation occurs in TORC2-specific rict-1 mutants, as well as in mutants of TORC2 targets sgk-1 and akt-1. Plot shows proportion of dauers formed by animals of the indicated genotypes at 27°C. Each black dot indicates the proportion of dauers formed in a single assay. Arrested L3 and/or partial/post dauers are included as non-dauers due to excess arrest in rict-1(ft7). Horizontal black bar indicates median. Light gray thin and thick vertical bars at right indicate Bayesian 95% and 75% credible intervals, respectively. Numbers in parentheses below indicate the number of independent experiments with at least 25 and 9 animals each scored for non-transgenic and transgenic animals, respectively. For transgenic rescues, data are combined from 2 independent lines, with the exception of ges-1p constructs, in which one line was analyzed. *** - P<0.001 compared to wild-type (ANOVA with Dunnett-type multivariate-t adjustment for 1B and Tukey-type multivariate-t adjustment for 1C); *** - P<0.001 compared to corresponding mutant animals. P-values of differences in means relative to wild-type and corresponding mutant animals are indicated in black and red, respectively.

library(sjPlot)
sjt.lm(lm, depvar.labels = "proportion of dauers (ANOVA)", show.se = TRUE)

r knitr::kable(contrasts, caption = "pairwise comparisons (Dunnett)") r knitr::kable(mixed[,c(6,1:5)], caption = "Bayesian credible intervals")

1C

strains<-c("N2","rict-1(mg360)",
           "rict-1(mg360); ex[ges1]",
           "rict-1(mg360); ex[gpa4]",
           "rict-1(ft7)",
           "rict-1(ft7); ex[ges1]",
           "rict-1(ft7); ex[elt2]",
           "rict-1(ft7); ex[ifb2]",
           "sgk-1(ok538)",
           "sgk-1(ok538); ex[ges1]",
           "akt-1(mg306)",
           "akt-1(mg306); ex[ges1]")
foods = "OP50"

gutresc<-read.csv(file.path(pathname, "extdata/1C_ges-1_rescue_rict_sgk.csv")) %>% dauergut::format_dauer(p.dauer = "non") %>% 
  mutate(allele = factor(allele, levels = c("WT","mg360","ft7","ok538","mg306")))

gutresc %<>% dplyr::mutate(adj.pct = case_when(.$pct == 0 ~ 0.01, .$pct == 1 ~ 0.99, TRUE ~ .$pct))

lm <- gutresc %>% dauer_ANOVA()
stan.glmm <- gutresc %>% dauergut::run_dauer_stan()
contrasts<-dauergut::tukey_contrasts(lm, "genotype") 
mixed<-stan.glmm %>% dauergut::getStan_CIs(type="dauer")
plot.contrasts<-c("",contrasts$prange[1], "", "", contrasts$prange[4], "","","", contrasts$prange[8],"",contrasts$prange[10],"")
plot.contrasts.2<-c("", "",contrasts$prange[12:13],"",contrasts$prange[39:41],"", contrasts$prange[61],"", contrasts$prange[66])

labels <- c("WT","rict-1(mg360)",
           "rict-1(mg360); +ges-1p::rict-1",
           "rict-1(mg360); +gpa-4p::rict-1",
           "rict-1(ft7)",
           "rict-1(ft7); +ges-1p::rict-1",
           "rict-1(ft7); +elt-2p::rict-1",
           "rict-1(ft7); +ifb-2p::rict-1",
           "sgk-1(ok538)",
           "sgk-1(ok538); +ges-1p::sgk-1",
           "akt-1(mg306)",
           "akt-1(mg306); +ges-1p::akt-1") %>% stringr::str_wrap(width=10)

(p<-dauergut::plot_CIs(gutresc, title="TORC2 components act in the intestine to regulate dauer formation", plot.contrasts, plot.contrasts.2=plot.contrasts.2, ypos = 1.075,type = "dauer", offset = 0, labels = labels))

Figure 1C

mTORC2 acts in the intestine to inhibit high-temperature dauer formation. Increased dauer formation of rict-1 and sgk-1 mutants is rescued by intestinal-specific expression. akt-1 mutants were not rescued using this promoter. Dauers formed by animals of the indicated genotypes at 27°C. Each black dot indicates the proportion of dauers formed in a single assay. Horizontal black bar indicates median. Light gray thin and thick vertical bars at right indicate Bayesian 95% and 75% credible intervals, respectively. Numbers in parentheses below indicate the number of independent experiments with at least 25 and 9 animals each scored for non-transgenic and transgenic animals, respectively. For transgenic rescues, data are combined from 2 independent lines, with the exception of ges-1p constructs, in which one line was analyzed. *** - P<0.001 compared to wild-type (ANOVA with Dunnett-type multivariate-t adjustment for 1B and Tukey-type multivariate-t adjustment for 1C); *** - P<0.001 compared to corresponding mutant animals. P-values of differences in means relative to wild-type and corresponding mutant animals are indicated in black and red, respectively.

library(sjPlot)
sjt.lm(lm, depvar.labels = "proportion of dauers (ANOVA)", show.se = TRUE)

r knitr::kable(contrasts, caption = "pairwise comparisons (Tukey)") r knitr::kable(mixed[,c(6,1:5)], caption = "Bayesian credible intervals")



mikeod38/dauergut documentation built on May 30, 2019, 7:16 p.m.