BG2 Code

Code for the BG2 manuscript is located at For this case study, the code is sourced into the local environment with the following command.


BG2 A. Thaliana Case Study

Data on root-like structures in A. Thaliana is from a study of plant regeneration from root explants (Lardon et al. 2020). We focus on the number of root-like structures after 21 days in which seedlings are under warm white light at 21\(^o\)C following a 14/10 h light/dark regime. There are 188,980 SNPs from 152 ecotypes of A. Thaliana from TAIR9 with MAF>0.01. Each ecotype has differing number of replicates with the majority of ecotypes having 12 explants.

The SNP matrix, the kinship matrix, the observed phenotypes, the SNP information, and the number of replicates of each ecotype for this A. Thaliana case study are available from the link below. The model chosen to fit based on results of the simulation study in the BG2 manuscript is a Poisson generalized linear mixed model with a kinship random effect and an overdispersion random effect. Further, a simulation study has shown that a uniform prior for the nonlocal prior dispersion parameter \(\tau\) leads to favorable statistical properties. The below code demonstrates how to obtain the results from the case study in the BG2 manuscript.

This takes approximately 5 minutes on a Macbook Pro with a 2.6GHz Intel Core i5 processor.

n <- length(Y)
covariance <- list()
covariance[[1]] <- kinship
covariance[[2]] <- diag(1, nrow = n, ncol = n)

output_casestudy <- BG2(Y=Y, SNPs=SNPs, Fixed = NULL, 
                        Covariance=covariance, Z=NULL, family="poisson", 
                        replicates=replicates, Tau="uniform",FDR_Nominal = 0.05, 
                        maxiterations = 4000, runs_til_stop = 400)
##       chromosome position
## 11205          1  6968274
## 11208          1  6969618
## 11657          1  7186893

To further investigate SNPs discovered by BG2, we used the JBrowse software available online at These SNPs are located in protein-coding genes AT1G20090, AT1G20100, and AT1G20720.