Hi fellow scientists!
We're going to start with my most recent project, which involves installing BGC software. BGC (Bayesian estimates of Genomic Clines) is a program that has been around for ages (first published in 2011) and models introgression across multiple loci. In other words, if two species are intermingling and hybridizing, this program allows you to see what the genetics are doing in response. As far as bioinformatic programs go, BGC is well documented: the functions are straight-forward and the scripts in the manual run as expected. However, I had a couple of issues installing the program, which involved some troubleshooting. This post is exclusively on the installation of BGC. Hardware and software requirements: BGC requires a UNIX or linux platform, and GSL (GNU Scientific Library) and HDF5 (no idea what the acronym is) libraries. Although I have access to a Linux cluster through my university, it was challenging to install the GSL and HDF5 dependencies without root access, and I eventually switched to installing it locally on my MacBook. If you only have access to a Windows operating system, I suggest a Linux partition. BGC seems to be relatively easy on the local computer hardware, unless you are working with thousands of loci. For reference, I can run my dataset of 50 loci through 170,000 iterations within 40 minutes on a MacBook Pro with 16 GB of RAM and an 1.4 GHz Quad-Core Intel i5 processor. Installation steps: (1) Because I was compiling a couple of libraries, I first needed to download and install Xcode from the Apple App Store. Forewarning, Xcode is a large download and will require a decent amount of available space on the local hard drive (to date, version 12.5.1 is 11.7 GB). Xcode contains a variety of developer tools, including the C++ compilers I needed for BGC. The first time Xcode is used on a computer, the user needs to accept the license agreement, which can be done by opening the Terminal and running the command: sudo xcodebuild -license accept (2) To install GSL and HDF5 libraries, you can either download them and build them manually (ew) or download Homebrew to do it for you (yay). Homebrew is a package manager for macOS and Linux and a life-saver if you have a life where you consistently build programs from source code. Once Homebrew is installed, the following commands can be run in the Terminal to install GSL and HDF5 libraries, respectively: brew install gsl brew install hdf5 (3) Finally, the .tar.gz file can be downloaded directly from the BGC website. MacOS typically unzips .gz files automatically, and clicking on the resulting .tar file will untar it. This directory should be moved somewhere easy to remember and reference from the command line; I made a file called bgcdist in my home directory. Navigate into the BGC distribution folder in the Terminal; the cd command navigates directories (e.g., cd /Users/[profile name]/bgcdist), and the pwd command will print the working directory to verify you are in the right place. Once inside the BGC distribution, the following command will build BGC: h5c++ -Wall -O2 -o bgc bgc_main.C bgc_func_readdata.C bgc_func_initialize.C bgc_func_mcmc.C bgc_func_write.C bgc_func_linkage.C bgc_func_ngs.C bgc_func_hdf5.C mvrandist.c -lgsl -lm -lgslcblas Note, the -lgslcblas flag is not included in the BGC manual for MacOS X installation, but must be added for the program to install correctly. Once the program finishes compiling, it can be executed by running the bgc command within the BGC distribution folder! References and resources: - Gompert Z, Buerkle CA (2011) Bayesian estimation of genomic clines. Molecular Ecology, 20:2111-2127. - Gompert Z, Parchman TL, Buerkle CA. (2012) Genomics of isolation in hybrids. Philosophical Transactions of the Royal Society B: Biological Sciences, 1587:439-450. - Gompert Z, Lucas LK, Nice CC, Fordyce JA, Forister ML, Buerkle CA (2012) Genomic regions with a history of divergent selection affect fitness of hybrids between two butterfly species. Evolution, 66:2167–2181. - Gompert Z, Buerkle CA (2012) bgc: Software for Bayesian estimation of genomic clines. Molecular Ecology Resources, doi: 10.1111/1755-0998.12009.x.
0 Comments
Your comment will be posted after it is approved.
Leave a Reply. |
Elizabeth Scott (Hendrickson)I am a plant biologist specializing in ecological genetics. This blog is dedicated to sharing the many tutorials in my lab notebooks with others. ArchivesCategories |