ThetaMater: Rapid and scalable Bayesian estimation of the population size parameter theta=4Nu from diverse genetic data
NOTE See the file https://github.com/radamsRHA/ThetaMater/tree/master/vignettes for detailed instructions
Steps for Bayesian estimation of theta and alpha (see tutorial for more details)
- Read input files and convert to infinite-sites data used by ThetaMater
- Choose a specific Bayesian model for estimating theta along (
ThetaMater.M1), theta with a fixed alpha shape parameter (
ThetaMater.M2), or the joint posterior distribution of theta and alpha (
- (Optional) Convert the results of ThetaMater into estimates of effective population size by multiplying the posterior distribution of theta by a given mutation rate.
- (Optional) Filter out loci with high mutation counts that likely represent spurious loci using the posterior predictive simulator function (
- (Optional) Identifying the maximum bounds of mutation counts from the posterior distribution, remove loci with outlier mutation counts that are too high beyond the posterior distribution, and re-estimate Theta using filtered dataset
Installing R package GppFst from github
*** IMPORTANT: ThetaMater was written using R.3.3.3. We recommend using this version of R to ensure that the underlying c++ functions will operate correctly (this version of Rcpp works best with R.3.3.3). If you discover memory errors (Rstudio unexpectedly closeles, segmental fault errors, etc.) when attempting to run ThetaMater, please reinstall R.3.3.3 and this should correct any issues. Contact the author (email@example.com) if any memory errors associated with c++ and Rcpp arise when using ThetaMater. R version 3.3.3 can be download here: https://cran.r-project.org/bin/macosx/. These packages will be updated in the future for further support in updated R versions. ***
*** ThetaMater require the Boost c++ libraries to be installed for the fast calculation of the underlying likelihood functions. I recommend install the Boost libraries using brew for Mac systems (brew install boost). The latest version of the Boost c++ libraries here: https://www.boost.org
The R package ThetaMater is freely available to download and distribute from github https://github.com/radamsRHA/ThetaMater/. To install and load ThetaMater, you must first install the R packages
MCMCpack. Additionally, make sure the most updated version of R version 3.3.3 is installed (see above warning). Download R version 3.3.3 here: https://cran.r-project.org/bin/macosx/.
install.packages("devtools") install.packages("MCMCpack") install.packages("Rcpp")
Now using devtools we can install
ThetaMater from github:
library(devtools) install_github("radamsRHA/ThetaMater") library(ThetaMater) # Load package ThetaMater library(MCMCpack) # Load dependancy phybase
To begin using
ThetaMater try using our vignette with example files provided with this package.