<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>/home/\/\ick &#187; C</title>
	<atom:link href="http://timony.com/mickzblog/category/programming/c/feed/" rel="self" type="application/rss+xml" />
	<link>http://timony.com/mickzblog</link>
	<description>Things that interest me.</description>
	<lastBuildDate>Fri, 29 Jul 2011 04:08:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<atom:link rel="next" href="http://timony.com/mickzblog/category/programming/c/feed/?page=2" />

		<item>
		<title>Compiling EIGENSOFT on Ubuntu Januty</title>
		<link>http://timony.com/mickzblog/2009/07/08/compiling-eigensoft-on-ubuntu-januty/</link>
		<comments>http://timony.com/mickzblog/2009/07/08/compiling-eigensoft-on-ubuntu-januty/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 05:34:18 +0000</pubDate>
		<dc:creator>Mick</dc:creator>
				<category><![CDATA[C]]></category>
		<category><![CDATA[fortran]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[chemical computing]]></category>
		<category><![CDATA[EIGENSOFT]]></category>
		<category><![CDATA[EIGENSTRAT]]></category>
		<category><![CDATA[example.perl]]></category>
		<category><![CDATA[make]]></category>

		<guid isPermaLink="false">http://timony.com/mickzblog/?p=665</guid>
		<description><![CDATA[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: http://www.hsph.harvard.edu/faculty/alkes-price/software/ Create a location to build the code: Warning: /tmp is for temporary files, and any files &#38; directories you create there will be remove upon some subsequent [...]]]></description>
			<content:encoded><![CDATA[<p>These are rough notes on how to compile <a href="http://genepath.med.harvard.edu/~reich/Software.htm">Eigensoft 3</a> on Ubuntu Jaunty.</p>
<p><strong>Update</strong>, <em>Eigensoft 4 is available and should compile on more recent versions of Ubuntu:</em><br />
<a href="http://www.hsph.harvard.edu/faculty/alkes-price/software/">http://www.hsph.harvard.edu/faculty/alkes-price/software/</a></p>
<p><strong>Create a location to build the code:</strong></p>
<p><em>Warning:</em> /tmp is for temporary files, and any files &amp; directories you create there will be remove upon some subsequent reboot.</p>
<pre>cd /tmp;</pre>
<pre>mkdir EIGEN;</pre>
<pre>cd  EIGEN;</pre>
<p><strong>Get the Eigensoft source code:</strong></p>
<pre>wget  http://www.hsph.harvard.edu/faculty/alkes-price/files/EIG3.0.tar.gz;</pre>
<pre>tar xzvf EIG3.0.tar.gz;</pre>
<p><strong>Install required dependences:<span id="more-665"></span></strong></p>
<pre>sudo apt-get install f2c libg2c0 libatlas-base-dev liblapack-dev;</pre>
<p>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&#8217;m wrong, it&#8217;s late at night and I could be mistaken):</p>
<pre>sudo ln -s /usr/lib/libg2c.so.0 /usr/lib/libg2c.so;</pre>
<p><strong>Build the code:</strong></p>
<pre>cd /tmp/EIGEN;</pre>
<pre>cd src;</pre>
<p><strong>Create a backup copy of the Makefile:</strong></p>
<pre>cp Makefile  Makefile.org;</pre>
<p><strong>Edit the Makefile:</strong></p>
<pre>emacs -nw Makefile;</pre>
<p><em>Change this line (line 24):</em></p>
<p>FF=g77</p>
<p>To read as:</p>
<p>FF=&#8221;gfortran -std-legacy&#8221;</p>
<p>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.</p>
<p><strong>Run make:</strong></p>
<pre>make eigenstrat;</pre>
<p>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&#8217;s left over from when the author was testing his code. Also, running &#8220;make clean&#8221; does not remove the binaries in the bin directory, but does remove those build in the src directory.</p>
<pre>make install;</pre>
<p>And that should be it run the example.perl in the EIGENSTRAT directory and you should see output like this:</p>
<p style="padding-left: 30px;"><em>./example.perl<br />
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<br />
smartpca -p example.pca.par &gt;example.log<br />
ploteig -i example.pca.evec -c 1:2  -p Case:Control  -x  -y  -o example.plot.xtxt<br />
evec2pca.perl 2 example.pca.evec example.ind example.pca<br />
smarteigenstrat.perl  -i example.geno  -a example.snp  -b example.ind  -p example.pca  -k 1  -o example.chisq  -l example.log<br />
smarteigenstrat -p example.chisq.par &gt;example.loggc.perl example.chisq example.chisq.GC</em></p>
<p>If you run into problems running and compiling the code, the README suggests running the following:</p>
<pre>make pcatoy;</pre>
<p>And, as per the README, contact your sys admin if it doesn&#8217;t work. <img src='http://timony.com/mickzblog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://timony.com/mickzblog/2009/07/08/compiling-eigensoft-on-ubuntu-januty/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
	</channel>
</rss>

