Skip to content

This repository contains the code and data needed to replicate the analysis carried out in the manuscript of Pettersen J et al. 2021

License

Notifications You must be signed in to change notification settings

yaccos/Microbial-co-occurence

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to the computations for the article "Robust bacterial co-occurence community structures are independent of $r$- and $K$-selection history"

This repository assumes you have R version 4.1.1 running, although somewhat older versions should also work. Running these scripts requires quite some packages, the most important of which is micInt which is available on GitHub (https://github.com/AlmaasLab/micInt). The other packages required are either on CRAN or Bioconductor. A complete pipeline can be found in master_script.R. The top of this script also includes the procedure to restore the required packages to their proper versions using renv. To install these packages, uncomment the three first lines of master_script.R before running it. Note that R must a suitable C++ configured to run the pipeline (see https://teuder.github.io/rcpp4everyone_en/020_install.html).
 

The most imporant analysis scripts are:
 - read_selection_switch.R Modify the dataset for analysis
 - prepare_analysis.R Create jobs for ReBoot algorithm
 - run_HUNT_computations.R . This script is is supposed to run on a compute server, not locally as it requires hours to run and ~ 100 GB of memory


The most relevant visualisation scripts to look into are:
 - export_interaction_count_ss.R for the threshold figures
 - generate_community_label_ss.R for the network of interactions and the phylogram
 - community_dynamics.R for the dynamic PCoA ordinartions
 - create_community_label_ss_robustness.R which does the same as the former three scripts, but for the combinations of parameters
 
Please also note that the intermediate files can take gigabytes of space.

About

This repository contains the code and data needed to replicate the analysis carried out in the manuscript of Pettersen J et al. 2021

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published