These are rough notes on how to compile Eigensoft 3 on Ubuntu Jaunty.
Update, Eigensoft 4 is available and should compile on more recent versions of Ubuntu:
Create a location to build the code:
Warning: /tmp is for temporary files, and any files & directories you create there will be remove upon some subsequent reboot.
Get the Eigensoft source code:
tar xzvf EIG3.0.tar.gz;
Install required dependences:
sudo apt-get install f2c libg2c0 libatlas-base-dev liblapack-dev;
This symbolic link is needed as the Makefile links looks for the static version of the library and not the shared version (correct me if I’m wrong, it’s late at night and I could be mistaken):
sudo ln -s /usr/lib/libg2c.so.0 /usr/lib/libg2c.so;
Build the code:
Create a backup copy of the Makefile:
cp Makefile Makefile.org;
Edit the Makefile:
emacs -nw Makefile;
Change this line (line 24):
To read as:
This is needed as the g77 fortran compiler is not longer included with Ubuntu, but you can use the gfortan compiler instead, but you must run it in legacy mode.
This next step is essential, because binaries are included in the bin directory that appear to have been build against a 64-bit kernel and are probably artefact’s left over from when the author was testing his code. Also, running “make clean” does not remove the binaries in the bin directory, but does remove those build in the src directory.
And that should be it run the example.perl in the EIGENSTRAT directory and you should see output like this:
smartpca.perl -i example.geno -a example.snp -b example.ind -k 2 -o example.pca -p example.plot -e example.eval -l example.log -m 5 -t 2 -s 6.0
smartpca -p example.pca.par >example.log
ploteig -i example.pca.evec -c 1:2 -p Case:Control -x -y -o example.plot.xtxt
evec2pca.perl 2 example.pca.evec example.ind example.pca
smarteigenstrat.perl -i example.geno -a example.snp -b example.ind -p example.pca -k 1 -o example.chisq -l example.log
smarteigenstrat -p example.chisq.par >example.loggc.perl example.chisq example.chisq.GC
If you run into problems running and compiling the code, the README suggests running the following:
And, as per the README, contact your sys admin if it doesn’t work.