Our framework, R Implementation of a Transgenerational Hologenomic Model-based Simulator (RITHMS) is an open-source package, builds upon the MoBPS package and incorporates the distinctive architecture of the microbiota, notably vertical and horizontal transfer as well as modulation due to the environment and host genetics. In addition, RITHMS can account for a variety of selection strategies, is adaptable to different genetic architectures.
Full documentation website on: https://SolenePety.github.io/RITHMS
Last code version on: https://github.com/SolenePety/RITHMS
Here is a little summary of how RITHMS work, but you can read the preprint for more details.
Installation
You can install the development version of RITHMS from GitHub using remotes
as shown below.
# install.packages("remotes")
remotes::install_github("SolenePety/RITHMS")
Toy dataset
You already have a toy dataset, a subset from Déru et al. 2020, there are 1845 species and 780 individuals, that show you the expected structure of input data :
To import your own dataset, you can refer to the following vignette.
Quick Start from the toy dataset
taxa_assign_g <- assign_taxa(ToyData)
generations_simu <- holo_simu(h2 = 0.25,
b2 = 0.25,
founder_object = ToyData,
n_clust = taxa_assign_g,
n_ind = 500)
Quick Start from your own dataset
If you’re using your own dataset instead of the toy dataset, make sure to calibrate the simulation parameters accordingly. In particular, the n_ind
(number of individuals in each generation), the genetic effect size effect.size
and the multinomial sampling size parameter size_rmultinom
used in holo_simu() should be consistent with the characteristics of your dataset.
To help you with this, please refer to the dedicated vignette.
# from VCf format
founder_object <- read_input_data(path_to_microbiome = "/path/to/microbiome.txt",
path_to_pedmap = "/path/to/vcf/'prefix'",
biome_id_column = "ind_id")
# from Ped/Map format
founder_object <- read_input_data(path_to_microbiome = "/path/to/microbiome.txt",
path_to_pedmap = "/path/to/pedmap/'prefix'",
biome_id_column = "ind_id")
taxa_assign_g <- assign_taxa(founder_object)
generations_simu <- holo_simu(h2 = 0.25,
b2 = 0.25,
founder_object = founder_object,
n_clust = taxa_assign_g,
n_ind = 500,
effect.size = 0.3,
size_rmultinom = 10000)
# Choose n_ind, effect.size and size_rmultinom such that it is consistent with the initial dimensions of your data set
To go further
If you’re interested into reproducing the figures of the article you can take a look at this vignette to generate the figures coming from the article