This repository contains all the code and data files necessary to recreate the analyses presented in "Disentangling key species interactions in diverse and heterogeneous communities: A Bayesian sparse modeling approach". Full details on the method are available in the manuscript and a description of the files and structure of the repo can be found in the Readme file.