Phenome-wide response to sex-specific selection in in D. melanogaster
  • About
  • Data collation
  • Find line means
  • Analysis
  • Source Code

Sections

  • Analysis system environment:

About

This website presents an analysis of the predicted evolutionary response to selection in a population of Drosophila melanogaster. It accompanies the manuscript “Quantifying the phenome-wide response to sex-specific selection in Drosophila melanogaster” in review at Evolution.

The data collation tab contains information on our dataset and documents how it was quality controlled. Our analysis relies on using the mean phenotypic values for near-isogenic lines of flies. Each line carries a single genotype so these phenotypic means can be used as estimates of breeding values.

The Find line means tab documents the statistical modelling we used to find line means when only raw, individual level data was provided by the original study.

The Analysis tab documents our statistical analysis. It includes the code to wrangle the data, run the models and build the figures.

We welcome any queries or comments concerning our analysis; please email tkeaney@uni-mainz.de

Analysis system environment:

Analyses were conducted using the R Statistical language (version 4.4.2; R Core
Team, 2024) on macOS Sequoia 15.2, using the packages brms (version 2.22.0;
Bürkner P, 2017), ggnewscale (version 0.5.0; Campitelli E, 2024), pander
(version 0.6.5; Daróczi G, Tsegelskyi R, 2022), Rcpp (version 1.0.13.1;
Eddelbuettel D et al., 2024), lubridate (version 1.9.3; Grolemund G, Wickham H,
2011), tidybayes (version 3.0.7; Kay M, 2024), bayestestR (version 0.15.0;
Makowski D et al., 2019), MetBrewer (version 0.2.0; Mills BR, 2022), tibble
(version 3.2.1; Müller K, Wickham H, 2023), rcartocolor (version 2.1.1; Nowosad
J, 2018), patchwork (version 1.3.0; Pedersen T, 2024), broom (version 1.0.7;
Robinson D et al., 2024), groundhog (version 3.2.1; Simonsohn U, Gruson H,
2024), ggrepel (version 0.9.6; Slowikowski K, 2024), ggplot2 (version 3.5.1;
Wickham H, 2016), forcats (version 1.0.0; Wickham H, 2023), stringr (version
1.5.1; Wickham H, 2023), tidyverse (version 2.0.0; Wickham H et al., 2019),
dplyr (version 1.1.4; Wickham H et al., 2023), purrr (version 1.0.2; Wickham H,
Henry L, 2023), readr (version 2.1.5; Wickham H et al., 2024), tidyr (version
1.3.1; Wickham H et al., 2024), ggtext (version 0.1.2; Wilke C, Wiernik B,
2022), DT (version 0.33; Xie Y et al., 2024) and kableExtra (version 1.4.0; Zhu
H, 2024).

References
----------
  - Bürkner P (2017). "brms: An R Package for Bayesian Multilevel Models Using
Stan." _Journal of Statistical Software_, *80*(1), 1-28.
doi:10.18637/jss.v080.i01 <https://doi.org/10.18637/jss.v080.i01>. Bürkner P
(2018). "Advanced Bayesian Multilevel Modeling with the R Package brms." _The R
Journal_, *10*(1), 395-411. doi:10.32614/RJ-2018-017
<https://doi.org/10.32614/RJ-2018-017>. Bürkner P (2021). "Bayesian Item
Response Modeling in R with brms and Stan." _Journal of Statistical Software_,
*100*(5), 1-54. doi:10.18637/jss.v100.i05
<https://doi.org/10.18637/jss.v100.i05>.
  - Campitelli E (2024). _ggnewscale: Multiple Fill and Colour Scales in
'ggplot2'_. R package version 0.5.0,
<https://CRAN.R-project.org/package=ggnewscale>.
  - Daróczi G, Tsegelskyi R (2022). _pander: An R 'Pandoc' Writer_. R package
version 0.6.5, <https://CRAN.R-project.org/package=pander>.
  - Eddelbuettel D, Francois R, Allaire J, Ushey K, Kou Q, Russell N, Ucar I,
Bates D, Chambers J (2024). _Rcpp: Seamless R and C++ Integration_. R package
version 1.0.13-1, <https://CRAN.R-project.org/package=Rcpp>. Eddelbuettel D,
François R (2011). "Rcpp: Seamless R and C++ Integration." _Journal of
Statistical Software_, *40*(8), 1-18. doi:10.18637/jss.v040.i08
<https://doi.org/10.18637/jss.v040.i08>. Eddelbuettel D (2013). _Seamless R and
C++ Integration with Rcpp_. Springer, New York. doi:10.1007/978-1-4614-6868-4
<https://doi.org/10.1007/978-1-4614-6868-4>, ISBN 978-1-4614-6867-7.
Eddelbuettel D, Balamuta J (2018). "Extending R with C++: A Brief Introduction
to Rcpp." _The American Statistician_, *72*(1), 28-36.
doi:10.1080/00031305.2017.1375990
<https://doi.org/10.1080/00031305.2017.1375990>.
  - Grolemund G, Wickham H (2011). "Dates and Times Made Easy with lubridate."
_Journal of Statistical Software_, *40*(3), 1-25.
<https://www.jstatsoft.org/v40/i03/>.
  - Kay M (2024). _tidybayes: Tidy Data and Geoms for Bayesian Models_.
doi:10.5281/zenodo.1308151 <https://doi.org/10.5281/zenodo.1308151>, R package
version 3.0.7, <http://mjskay.github.io/tidybayes/>.
  - Makowski D, Ben-Shachar M, Lüdecke D (2019). "bayestestR: Describing Effects
and their Uncertainty, Existence and Significance within the Bayesian
Framework." _Journal of Open Source Software_, *4*(40), 1541.
doi:10.21105/joss.01541 <https://doi.org/10.21105/joss.01541>,
<https://joss.theoj.org/papers/10.21105/joss.01541>.
  - Mills BR (2022). _MetBrewer: Color Palettes Inspired by Works at the
Metropolitan Museum of Art_. R package version 0.2.0,
<https://CRAN.R-project.org/package=MetBrewer>.
  - Müller K, Wickham H (2023). _tibble: Simple Data Frames_. R package version
3.2.1, <https://CRAN.R-project.org/package=tibble>.
  - Nowosad J (2018). _'CARTOColors' Palettes_. R package version 1.0.0,
<https://jakubnowosad.com/rcartocolor/>.
  - Pedersen T (2024). _patchwork: The Composer of Plots_. R package version
1.3.0, <https://CRAN.R-project.org/package=patchwork>.
  - R Core Team (2024). _R: A Language and Environment for Statistical
Computing_. R Foundation for Statistical Computing, Vienna, Austria.
<https://www.R-project.org/>.
  - Robinson D, Hayes A, Couch S (2024). _broom: Convert Statistical Objects into
Tidy Tibbles_. R package version 1.0.7,
<https://CRAN.R-project.org/package=broom>.
  - Simonsohn U, Gruson H (2024). _groundhog: Version-Control for CRAN, GitHub,
and GitLab Packages_. R package version 3.2.1,
<https://CRAN.R-project.org/package=groundhog>.
  - Slowikowski K (2024). _ggrepel: Automatically Position Non-Overlapping Text
Labels with 'ggplot2'_. R package version 0.9.6,
<https://CRAN.R-project.org/package=ggrepel>.
  - Wickham H (2016). _ggplot2: Elegant Graphics for Data Analysis_.
Springer-Verlag New York. ISBN 978-3-319-24277-4,
<https://ggplot2.tidyverse.org>.
  - Wickham H (2023). _forcats: Tools for Working with Categorical Variables
(Factors)_. R package version 1.0.0,
<https://CRAN.R-project.org/package=forcats>.
  - Wickham H (2023). _stringr: Simple, Consistent Wrappers for Common String
Operations_. R package version 1.5.1,
<https://CRAN.R-project.org/package=stringr>.
  - Wickham H, Averick M, Bryan J, Chang W, McGowan LD, François R, Grolemund G,
Hayes A, Henry L, Hester J, Kuhn M, Pedersen TL, Miller E, Bache SM, Müller K,
Ooms J, Robinson D, Seidel DP, Spinu V, Takahashi K, Vaughan D, Wilke C, Woo K,
Yutani H (2019). "Welcome to the tidyverse." _Journal of Open Source Software_,
*4*(43), 1686. doi:10.21105/joss.01686 <https://doi.org/10.21105/joss.01686>.
  - Wickham H, François R, Henry L, Müller K, Vaughan D (2023). _dplyr: A Grammar
of Data Manipulation_. R package version 1.1.4,
<https://CRAN.R-project.org/package=dplyr>.
  - Wickham H, Henry L (2023). _purrr: Functional Programming Tools_. R package
version 1.0.2, <https://CRAN.R-project.org/package=purrr>.
  - Wickham H, Hester J, Bryan J (2024). _readr: Read Rectangular Text Data_. R
package version 2.1.5, <https://CRAN.R-project.org/package=readr>.
  - Wickham H, Vaughan D, Girlich M (2024). _tidyr: Tidy Messy Data_. R package
version 1.3.1, <https://CRAN.R-project.org/package=tidyr>.
  - Wilke C, Wiernik B (2022). _ggtext: Improved Text Rendering Support for
'ggplot2'_. R package version 0.1.2,
<https://CRAN.R-project.org/package=ggtext>.
  - Xie Y, Cheng J, Tan X (2024). _DT: A Wrapper of the JavaScript Library
'DataTables'_. R package version 0.33, <https://CRAN.R-project.org/package=DT>.
  - Zhu H (2024). _kableExtra: Construct Complex Table with 'kable' and Pipe
Syntax_. R package version 1.4.0,
<https://CRAN.R-project.org/package=kableExtra>.
Source Code
---
title: "About"
execute:
  warning: false
  message: false
---

This website presents an analysis of the predicted evolutionary response to selection in a population of _Drosophila melanogaster_. It accompanies the manuscript "Quantifying the phenome-wide response to sex-specific selection in _Drosophila melanogaster_" in review at _Evolution_.

The [data collation](https://tomkeaney.github.io/Secondary_theorem_separate_sexes/Data_collation.html) tab contains information on our dataset and documents how it was quality controlled. Our analysis relies on using the mean phenotypic values for near-isogenic lines of flies. Each line carries a single genotype so these phenotypic means can be used as estimates of breeding values.

The [Find line means](https://tomkeaney.github.io/Secondary_theorem_separate_sexes/Get_line_means_from_raw_data.html) tab documents the statistical modelling we used to find line means when only raw, individual level data was provided by the original study.

The [Analysis](https://tomkeaney.github.io/Secondary_theorem_separate_sexes/Main_analysis.html) tab documents our statistical analysis. It includes the code to wrangle the data, run the models and build the figures. 

We welcome any queries or comments concerning our analysis; please email `tkeaney@uni-mainz.de`

### Analysis system environment:

```{r, echo=FALSE}
library(tidyverse) # for tidy coding
library(MetBrewer) # for many nice colour palettes
library(rcartocolor) # more cool colours
library(kableExtra) # for scrolling tables
library(DT) # for interactive tables
library(patchwork) # to join multiple plots nicely
library(brms) # for bayesian models
library(tidybayes) # for more bayesian things
library(bayestestR) # for the pd metric 
library(broom) # convert results of functions into tables
library(ggtext) # for markdown features in ggplot
library(ggrepel) # for plot labels in ggplot
library(ggnewscale) # to reset scales in ggplot 
library(pander) # nice tables
library(groundhog) # to load package versions identical to ours

sessionInfo() %>% report::report()
```