Installing BGC (Bayesian Genomic Clines) on Ubuntu 14.04 Server

BGC source code is available from  https://sites.google.com/site/bgcsoftware/home/bgcdist1.03.tar.gz.

It depends upon GSL (GNU Scientific Library) and HDF5 (www.hdfgroup.org).  GSL is usually installed on unix like systems at “/usr/local/”.  If you have installed GSL at a nonstandard location, it would be necessary to tell BGC compiler of that location.  For now let’s assume that location as “/usr/include/gsl”

HDF packages you will need. Use ‘sudo apt-get install PACKAGE’
hdf5-tools
libhdf5-doc
libhdf5-7
libhdf5-dev
hdfview

Now unpack the bgc tar archive you downloaded earlier.  Navigate inside ‘./bgcdist’ in your favorite terminal shell.  Then compile bgc as follows:

h5c++ -Wall -O2 -L/usr/include/gsl -I/usr/include/gsl -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 -lgslcblas

If you do not get any error messages, your current directory should now contain the ‘bgc’ binary. Execute it without any options to make sure it works.

crypticlineage@Wright:/popgen/bgcdist$ ./bgc
./bgc version 1.03 -- 03 April 2014
Usage: bgc -a p0infile -b p1infile -h admixinfile [options]
-a Infile with genetic data for parental population 0
-b Infile with genetic data for parental population 1
-h Infile with genetic data for admixed population(s)
-M Infile with genetic map, only used for ICARr
...truncated

If you get an error message that the compiler can’t find mpi.h file, open /usr/include/H5public.h in your favorite text editor as a sudoer, and edit L63 to reflect the correct path to mpi.h. That should get rid of the error messages.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s