The folder contains the essential code of the data analysis associated with the Suzuki, T.A. et al, "Selection and transmission of the gut microbiome alone can shift mammalian behavior", 2025 manuscript.
-
code/
: R Jupyter notebooks:- Suzuki_Fig.1-2_Fig.S1-S3.ipynb - Experiment 1.
- 06_Exp_2.ipynb - Experiment 2.
- 07_publ_figures_tables.ipynb - Additional figures.
-
data/
: Input data for the notebooks. -
out/
: Additional input data for the notebooks, and the location for auxilliary output generated by the notebooks. -
r_helper_lib/
: R scripts with the function definitions. -
r_433_nb.yaml
: Definition of the Conda environment to run the notebooks in.
The R notebooks (.ipynb files) are provided as prerendered versions (viewable via a Web-browser at Github) - a part of the visualizations and other results presented in the manuscript. The other essential results can be generated by modifying the workflow control switches (variables) in the first cells of the .ipynb notebooks and running them.
To set up the environment for running the notebooks, you will need:
- Conda (https://docs.conda.io/en/latest/)
- Visual Studio Code (or an alternative integrated development enviroment supporting running R notebooks via a defined Conda environment)
Create the Conda environment using the .yaml file that contains the required packages with their versions:
conda env create -f r_433_nb.yaml
conda activate r_433_nb
Then install the following non-Conda -based packages into it:
R
devtools::install_github("tpq/balance")
devtools::install_github("malucalle/selbal")
devtools::install_bitbucket("knomics/nearestbalance")
devtools::install_github("leylabmpi/LeyLabRMisc")
The installation is expected to be complete in a few minutes. Open a notebook in VS Code, select the R Jupyter kernel of the installed environment and run the notebook.