This repository contains the R scripts used for data analysis and figure generation in the manuscript.
The analyses are organised into three main project folders according to the corresponding figures:
- 01_BNI_approaches_and_plant_traits contains the analyses and plotting scripts for Figures 1 and 2.
- 02_root_exudate_metabolomics contains the analyses and plotting scripts for Figure 3.
- 03_sequencing_analysis contains the analyses and plotting scripts for Figure 4.
Each project follows a consistent directory structure:
00_input/
01_rmd/
02_docs/
03_analysis/
R/
.here
*.Rproj
Contains the input data required for the analyses, including processed experimental data, metadata, and other analysis-ready datasets.
Contains the main R Markdown (.Rmd) files used to run the analyses, together with the corresponding rendered HTML files for convenient viewing of the analysis workflow and outputs.
Contains supporting documents where necessary.
Contains intermediate and final outputs generated by the workflows in 01_rmd, including processed datasets, statistical results, tables, and figures.
Contains project-level R scripts used to support the analysis workflow, including configuration, project initialisation, and reusable helper functions.
config.Rdefines project-wide settings, parameters, and other configuration options used across analyses.init_project.Rinitialises the analysis environment and loads the required project settings and supporting scripts.utils.Rcontains reusable utility functions shared across multiple R Markdown files.
Separating these supporting scripts from the main analysis files helps maintain a consistent and reproducible workflow across analyses.
The .here file defines the project root for the here R package. This allows file paths to be specified relative to the project root rather than using machine-specific absolute paths, improving portability and reproducibility.
The .Rproj file defines the corresponding RStudio project. Opening this file provides a consistent project environment and ensures that the analyses are run from the appropriate project directory.
The numbering and order of tables generated within the analysis scripts do not necessarily correspond to those of the supplementary tables submitted with the manuscript.
In the code repository, tables are organised according to the analytical workflow and their direct relationship to individual analyses. In the submitted Supplementary Information, tables are renumbered and ordered according to their sequence in the manuscript.