<?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>That's Funny... &#187; linux</title>
	<atom:link href="http://staff.washington.edu/rec3141/wordpress/archives/tag/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://staff.washington.edu/rec3141</link>
	<description>the website of Eric Collins, grad student</description>
	<lastBuildDate>Wed, 11 Nov 2009 18:25:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Predicting the height of a saturated peak on an electropherogram</title>
		<link>http://staff.washington.edu/rec3141/wordpress/archives/527</link>
		<comments>http://staff.washington.edu/rec3141/wordpress/archives/527#comments</comments>
		<pubDate>Thu, 07 May 2009 01:12:08 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[none]]></category>
		<category><![CDATA[bacteria]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[open access]]></category>
		<category><![CDATA[science]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[sea ice]]></category>

		<guid isPermaLink="false">http://staff.washington.edu/rec3141/?p=527</guid>
		<description><![CDATA[One way to assess the microbial community structure in an environment is to use a &#8216;fingerprinting&#8217; technique, like T-RFLP or ARISA, to interrogate the &#8217;species&#8217; living there as determined from their 16S rRNA genes or some functional gene like amoA. Here&#8217;s an example of a T-RFLP electropherogram from sea ice:

You can see that most of [...]]]></description>
			<content:encoded><![CDATA[<p>One way to assess the microbial community structure in an environment is to use a &#8216;fingerprinting&#8217; technique, like T-RFLP or ARISA, to interrogate the &#8217;species&#8217; living there as determined from their 16S rRNA genes or some functional gene like amoA. Here&#8217;s an example of a T-RFLP electropherogram from sea ice:<br />
<a href="http://staff.washington.edu/rec3141/wordpress/wp-content/uploads/2009/05/examplecsv0.png"><img src="http://staff.washington.edu/rec3141/wordpress/wp-content/uploads/2009/05/examplecsv0.png" alt="examplecsv0" title="examplecsv0" width="480" height="480" class="size-full wp-image-548" /></a></p>
<p>You can see that most of the signal in this sample is contained within a few peaks. Sometimes those peaks saturate (max-out, overblow) the detector, which is bad if I am interested in comparing the heights of the peaks (a controversial subject, I should note I am only doing bulk, not individual, comparisons). Of course, I could just add less DNA and run it again, except that then I would be liable to lose some of the smaller peaks (also, it&#8217;s not practical for me to re-run these specific samples). So I&#8217;ve written a script in the open-source <a href="http://www.r-project.org">statistical package R</a> to estimate the heights of the saturated peaks by fitting a Gaussian function of the form</p>
<p><img src='/rec3141/wordpress/wp-content/plugins/latexrender/pictures/c29244c515375b57599c5786bb562c8d_7.85951pt.png' title='f(x) = y_0+\dfrac{b\sqrt{2/\pi}}{d}*e^{-2\left(\dfrac{x-x_0}{d}\right)^2}' alt='f(x) = y_0+\dfrac{b\sqrt{2/\pi}}{d}*e^{-2\left(\dfrac{x-x_0}{d}\right)^2}'  style="vertical-align:-7.85951pt;" ></p>
<p>where &#8216;y_0&#8242; is the y-minimum, &#8216;x_0&#8242; is the center of the peak, &#8216;b&#8217; is a scaling factor, and &#8216;d&#8217; is related to the standard deviation of the distribution.</p>
<p>You can download the script here: <a href='http://staff.washington.edu/rec3141/wordpress/wp-content/uploads/2009/05/gaussfit.r'>gaussfit.r</a></p>
<p>The figures below show (A) a fitted regular-sized peak, and (B) a fitted saturated peak. In my case, the fitted function has a maximum that is 1.6 ± 2.5% of the observed maximum for regular-sized peaks.</p>
<p><img src="http://staff.washington.edu/rec3141/wordpress/wp-content/uploads/2009/05/examplecsv1.png" alt="examplecsv1" title="examplecsv1" width="320" height="320" class="size-full wp-image-541" /></a><a href="http://staff.washington.edu/rec3141/wordpress/wp-content/uploads/2009/05/examplecsv2.png"><img src="http://staff.washington.edu/rec3141/wordpress/wp-content/uploads/2009/05/examplecsv2.png" alt="examplecsv2" title="examplecsv2" width="320" height="320" class="size-full wp-image-542" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://staff.washington.edu/rec3141/wordpress/archives/527/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Bazaar version control system for my Ph.D. Thesis</title>
		<link>http://staff.washington.edu/rec3141/wordpress/archives/513</link>
		<comments>http://staff.washington.edu/rec3141/wordpress/archives/513#comments</comments>
		<pubDate>Thu, 30 Apr 2009 21:58:15 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[none]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[science]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://staff.washington.edu/rec3141/?p=513</guid>
		<description><![CDATA[I wrote my last paper in LaTeX and the submitted file was named &#8216;paper_v26&#8242;. Various other files with similar names are floating around and it is a chore to keep up with which is the latest version when they are split between two computers and three operating systems.  For my thesis I decided to [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote my last paper in LaTeX and the submitted file was named &#8216;paper_v26&#8242;. Various other files with similar names are floating around and it is a chore to keep up with which is the latest version when they are split between two computers and three operating systems.  For my thesis I decided to make things easier. I tried using subversion. I really did. But it just wasn&#8217;t doing it for me. So I tried Bazaar and got it to work intuitively in just a few minutes. So that&#8217;s what I&#8217;m going to start using now. To help get you (and me) started, here&#8217;s a distilled version of <a href="http://doc.bazaar-vcs.org/latest/en/mini-tutorial/index.html">this tutorial</a> and <a href="http://doc.bazaar-vcs.org/latest/en/user-guide/index.html">this user guide</a>). Requirements for my setup: 1) unfrightened by the command line; 2) SSH daemon running on central repository host.</p>
<p>Briefly, the way it works is that you set up a central repository for your files, preferably on some computer that is connected to the internet all the time, even better if it has a static domain name. Into this repository you place the files you want to be version controlled. This works best for plain text files (like LaTeX source files) because it is simple to compare versions if necessary, but it will also work for binary files like OpenOffice documents (which have built-in version control, if you didn&#8217;t know) and images. If you are working on the computer with the central repository, great, just make sure to update the files each time before you work on them and commit them each time you are done. You could probably write a cron job to do this for you if you are liable to forget. If you are working on a different computer, you just have to ask the central repository for the files and it will give you the latest versions. After you edit them you have to commit the changes to a local repository, which can then be merged with the central repository.</p>
<p>To get started:</p>
<ul>
<li>Install <a href="http://bazaar-vcs.org/">bzr</a></li>
<li>Make a new directory and copy the files you&#8217;ll be starting with into it. If you&#8217;re using LaTeX, you&#8217;ll probably only want the files that are not compiled, e.g. *.tex, *.bib, *.bst and NOT *.aux, *.log, etc.</li>
<li>Tell bzr who you are:
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">bzr whoami &quot;me &lt;me@me.com&gt;&quot;</div></div>
</li>
<li>Initialize tracking in this directory:
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">bzr init</div></div>
</li>
<li>Add all the files in the directory, recursively:
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">bzr add</div></div>
</li>
<li>Commit the files to the first revision. Make sure to add a message (-m), or you might find yourself in &#8216;vi&#8217; (shudder). Do this after every work session.
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">bzr commit -m &quot;very important message&quot;</div></div>
</li>
<li>Next time you work from this computer with the central repository, make sure you are using the most recent version:
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">bzr update</div></div>
<li>The first time you work on your project from a different computer, pull a new copy via ssh from that computer:
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">bzr branch sftp://user@host.domain:port/location/to/remote/files /new/local/location</div></div>
</li>
<li>In future sessions, pull new edits from the central repository before working on them:
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">bzr merge sftp://user@host.domain:port/location/to/remote/files<br />
bzr commit -m &quot;merge from parent&quot;</div></div>
</li>
<li>To submit edits to the central repository, first commit them locally, then push edits via ssh to that computer:
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">bzr commit -m &quot;local changes&quot;<br />
bzr push sftp://user@host.domain:port/location/to/remote/files</div></div>
</li>
</ul>
<p>Some further usage, much of which is intuitive because it works just like regular unix commands:</p>
<ul>
<li>Clean up a directory by deleting non-versioned files and reloading the last commit:
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">bzr commit<br />
&nbsp;rm *<br />
bzr revert</div></div>
</li>
<li>Make a new versioned subdirectory:
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">bzr mkdir ./newdirectory</div></div>
</li>
<li>Add a new file to the repository:
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">bzr add ./newfile.txt</div></div>
</li>
<li>Remove a file from the repository:
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">bzr rm ./oldfile.txt</div></div>
</li>
<li>Rename or move a file or directory in the repository:
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">bzr mv oldfile.txt newfile.txt</div></div>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://staff.washington.edu/rec3141/wordpress/archives/513/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ARB install on Kubuntu 8.10</title>
		<link>http://staff.washington.edu/rec3141/wordpress/archives/439</link>
		<comments>http://staff.washington.edu/rec3141/wordpress/archives/439#comments</comments>
		<pubDate>Mon, 26 Jan 2009 18:00:19 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[none]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[phylogeny]]></category>
		<category><![CDATA[science]]></category>

		<guid isPermaLink="false">http://staff.washington.edu/rec3141/?p=439</guid>
		<description><![CDATA[I added the following lines to my &#8216;/etc/apt/sources.list&#8217;
deb http://techno.mikro.biologie.tu-muenchen.de/debian intrepid non-free
deb http://techno.mikro.biologie.tu-muenchen.de/debian hardy non-free
and installed the packages arb (base installation), transfig (something to do with LaTeX), xfig (for exporting trees), and libmotif3 (for library libXm.so.3)
sudo apt-get install arb transfig, xfig, libmotif3
More info here: http://techno.mikro.biologie.tu-muenchen.de/
]]></description>
			<content:encoded><![CDATA[<p>I added the following lines to my &#8216;/etc/apt/sources.list&#8217;</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">deb http://techno.mikro.biologie.tu-muenchen.de/debian intrepid non-free<br />
deb http://techno.mikro.biologie.tu-muenchen.de/debian hardy non-free</div></div>
<p>and installed the packages arb (base installation), transfig (something to do with LaTeX), xfig (for exporting trees), and libmotif3 (for library libXm.so.3)</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sudo apt-get install arb transfig, xfig, libmotif3</div></div>
<p>More info here: <a href="http://techno.mikro.biologie.tu-muenchen.de/">http://techno.mikro.biologie.tu-muenchen.de/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://staff.washington.edu/rec3141/wordpress/archives/439/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Phylogeny workflow</title>
		<link>http://staff.washington.edu/rec3141/wordpress/archives/410</link>
		<comments>http://staff.washington.edu/rec3141/wordpress/archives/410#comments</comments>
		<pubDate>Tue, 13 Jan 2009 23:16:18 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[none]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[phylogeny]]></category>
		<category><![CDATA[science]]></category>

		<guid isPermaLink="false">http://staff.washington.edu/rec3141/?p=410</guid>
		<description><![CDATA[This is my general phylogeny workflow, starting with raw FASTA sequences and ending in a maximum parsimony or maximum likelihood phylogenetic tree with distances.  Programs used: ARB 07.12.06org, Seaview, PAUP* 4.0 beta 10 (MacOSX), PHYLIP 3.68, ModelTest Server 1.0, PRAP2, Inkscape, XFIG.

get sequences into ARB, via e.g. greengenes or SILVA or RDP. If importing [...]]]></description>
			<content:encoded><![CDATA[<p>This is my general phylogeny workflow, starting with raw FASTA sequences and ending in a maximum parsimony or maximum likelihood phylogenetic tree with distances.  Programs used: <a href="http://arb-home.de">ARB 07.12.06org</a>, <a href="http://pbil.univ-lyon1.fr/software/seaview.html">Seaview</a>, <a href="http://paup.csit.fsu.edu/">PAUP* 4.0 beta 10 (MacOSX)</a>, <a href="http://evolution.genetics.washington.edu/phylip.html">PHYLIP 3.68</a>, <a href="http://darwin.uvigo.es/software/modeltest_server.html">ModelTest Server 1.0</a>, <a href="http://systevol.nees.uni-bonn.de/software/PRAP2">PRAP2</a>, <a href="http://www.inkscape.org/">Inkscape</a>, <a href="http://www.xfig.org/">XFIG</a>.</p>
<ol>
<li>get sequences into ARB, via e.g. <a href="http://greengenes.lbl.gov/">greengenes</a> or <a href="http://www.arb-silva.de/">SILVA</a> or <a href="http://rdp.cme.msu.edu/">RDP</a>. If importing an alignment in FASTA format you may need to use the following IFT (save with rest of arb .ift files, e.g. usr/arb/lib/import/fasta_wgap.ift):
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">AUTODETECT &nbsp; &nbsp; &nbsp;&quot;&gt;*&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; #Global settings:<br />
KEYWIDTH &nbsp; &nbsp; &nbsp; &nbsp;1<br />
BEGIN &nbsp; &quot;&gt;??*&quot;<br />
MATCH &nbsp; &quot;&gt;*&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; SRT &quot;* *=*1:*\t*=*1&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; WRITE &quot;name&quot;<br />
MATCH &nbsp; &quot;&gt;*&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; SRT &quot;*|*=*1&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; WRITE &quot;full_name&quot;<br />
SEQUENCEAFTER &nbsp; &quot;*&quot;<br />
SEQUENCESRT &nbsp; &nbsp; &quot;&quot;<br />
SEQUENCECOLUMN &nbsp;0<br />
SEQUENCEEND &nbsp; &nbsp; &quot;&gt;*&quot;<br />
# DONT_GEN_NAMES<br />
CREATE_ACC_FROM_SEQUENCE<br />
END &nbsp; &nbsp; &quot;//&quot;</div></div>
</li>
<li>in ARB: prune tree to closest isolates, closest clones/from environment, and enough internal branches for context. make a copy for each tree you work on.</li>
<li>in ARB: mark all in tree, look at alignment, unselect those not full length/long enough, note start and end of full length section by position.</li>
<li>in ARB: export sequence to fasta (File&#8211;>Export&#8211;>Export to foreign format).  You may want to use a simple export file (EFT) like the following (save it with the others e.g. usr/arb/lib/import/fasta_simple.eft or wherever) :
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">SUFFIX &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fasta<br />
BEGIN<br />
&gt;*(name)<br />
*(|export_sequence)</div></div>
<p>During the export use a hypervariable SAI (made by parsimony) to filter by quality (Lane 1991 mask) &#8220;-=.0123456&#8243; and region to export, using the starting and ending positions you determined previously</li>
<li>in SEAVIEW, open exported FASTA file and save as NEXUS file (the export filter from ARB to PAUP doesn&#8217;t seem to work very well)</li>
<li>PAUP may get grouchy if you have digit-only sequence names, so you can run the following script to temporarily change the names.
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">s<span style="color: #000000; font-weight: bold;">/</span><span style="color: #ff0000;">'\([0-9]\{4,\}\)'</span><span style="color: #000000; font-weight: bold;">/</span><span style="color: #ff0000;">'\1tmpname'</span><span style="color: #000000; font-weight: bold;">/</span>g</div></div>
<p>Save the script as &#8216;fromdigits.sed&#8217; (it&#8217;s easier as a file because the apostrophes in the regular expression complicate things on the command line) and run</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-f</span> fromdigits.sed <span style="color: #7a0874; font-weight: bold;">&#91;</span>filename.nexus<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>filename.converted.nexus<span style="color: #7a0874; font-weight: bold;">&#93;</span></div></div>
<p>After running PAUP you can change the names back in the PHYLIP tree files by using the following sed script:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/\([0-9]\{4,\}\)tmp[name]*/\1/g'</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>treefile.phy<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>treefile.converted.phy<span style="color: #7a0874; font-weight: bold;">&#93;</span></div></div>
<p>Or, from NEXUS tree files:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'s/\([0-9]\{4,\}\)tmp[name]*/\1/g'</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>treefile.nexus<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>treefile.converted.nexus<span style="color: #7a0874; font-weight: bold;">&#93;</span></div></div>
<li>in a text editor, open NEXUS file and append PAUP block to end, save as new file. for bootstrapping, the PAUP block may come from MODELTEST (NOTE <a href="http://paup.csit.fsu.edu/problems.html">bug in PAUP 4.10b</a> means you have to add an extra command to MODELTEST input block: &#8220;default lscores longfmt=yes&#8221;). for ratcheting the PAUP block may come from PRAP2</li>
<li>run in PAUP to get parsimony/likelihood trees, save trees in phylip format. if you only have a NEXUS tree, open it in a texteditor and delete the introductory NEXUS block. keep only what is between the outermost parentheses.</li>
<li>in ARB: input consensus tree with bootstraps back into arb using Tree&#8211;>TreeAdmin&#8211;>Import. make sure to remove the period (.) from the tree name or it won&#8217;t import.</li>
<li>in ARB: save distance matrix to &#8216;infile&#8217; by doing Tree&#8211;>Build Tree&#8211;>Distance Methods&#8211;>Phylip Distance Matrix, then use the same filter as above for trees. Hit &#8216;y&#8217; and try to save the file that opens up as &#8216;/tmp/infile&#8217;. If no file pops up, make sure you&#8217;ve installed &#8216;xedit&#8217; or make a soft link from e.g. /usr/bin/xedit to some other text editor e.g. gedit, kedit. If you can&#8217;t save the file anywhere, copy it from the ~/.arb_tmp directory in your home folder.</li>
<li>in ARB: save tree to /tmp/arbtree (Tree&#8211;>Tree Admin&#8211;>Export).
</li>
<li>here is a script that does the following 3 steps:
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;height:300px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># Script file for automating the process of adding distances to likelihood tree</span><br />
<span style="color: #666666; font-style: italic;"># REC</span><br />
<br />
<span style="color: #666666; font-style: italic;"># turns tree from arb ('arbtree') and distance matrix from dnadist ('distmatrix') into arb tree plus distances ('arbtree.fitch.outtree')</span><br />
<br />
<span style="color: #007800;">filedate</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">date</span> +<span style="color: #000000; font-weight: bold;">%</span>s<span style="color: #000000; font-weight: bold;">`</span><br />
<br />
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> tmp<span style="color: #007800;">$filedate</span><br />
<span style="color: #7a0874; font-weight: bold;">cd</span> tmp<span style="color: #007800;">$filedate</span><br />
<br />
<span style="color: #666666; font-style: italic;"># clean up tree file</span><br />
<span style="color: #666666; font-style: italic;"># the sed '1d' removes the notes line -- if you have zero or more than one you'll need to change this or do it manually</span><br />
<span style="color: #666666; font-style: italic;"># the tr -d [:space:] gets rid of all the whitespace</span><br />
<span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'1d'</span> <span style="color: #000000; font-weight: bold;">&lt;</span> .<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>arbtree <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">tr</span> <span style="color: #660033;">-d</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>:space:<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&gt;</span> intree<br />
<br />
<span style="color: #666666; font-style: italic;"># unroot tree file</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">echo</span> y; <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #c20cb9; font-weight: bold;">w</span>; <span style="color: #7a0874; font-weight: bold;">echo</span> u; <span style="color: #7a0874; font-weight: bold;">echo</span> q<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>retree<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #c20cb9; font-weight: bold;">mv</span> intree arbtree.retree.intree<br />
<span style="color: #c20cb9; font-weight: bold;">mv</span> outtree intree<br />
<br />
<span style="color: #666666; font-style: italic;"># run fitch to add the distances to the tree we've supplied</span><br />
<span style="color: #c20cb9; font-weight: bold;">cp</span> .<span style="color: #000000; font-weight: bold;">/</span>..<span style="color: #000000; font-weight: bold;">/</span>distmatrix infile<br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">echo</span> d; <span style="color: #7a0874; font-weight: bold;">echo</span> u; <span style="color: #7a0874; font-weight: bold;">echo</span> -; <span style="color: #7a0874; font-weight: bold;">echo</span> y<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>fitch<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #c20cb9; font-weight: bold;">mv</span> intree arbtree.fitch.intree<br />
<span style="color: #c20cb9; font-weight: bold;">mv</span> infile arbtree.fitch.infile<br />
<span style="color: #c20cb9; font-weight: bold;">mv</span> outtree arbtree.fitch.outtree<br />
<span style="color: #c20cb9; font-weight: bold;">mv</span> outfile arbtree.fitch.outfile<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> ..</div></div>
</li>
<p>to do it manually: in a text editor: delete first line and despace tree for phylip, or do the following on the command line:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sed '1d' &lt; arbtree | tr -d [:space:] &gt; intree</div></div>
<p>with PHYLIP: run retree &#8211;> write unrooted tree, then mv outtree intree</li>
<p>with PHYLIP: run fitch, choose options D &#8211;> minimum evolution, U &#8211;> input file, &#8211; &#8211;> no negative lengths</li>
<li>in ARB: import outtree with Tree&#8211;>Tree Admin&#8211;>Import</li>
<li>get NDS info organized and displayed correctly, e.g.
<ul>
<li>
&#8211;to rename accession numbers to accession numbers from greengenes<br />
copy full_name to acc</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">:*=*(full_name)</div></div>
<p>then get rid of extraneous info:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/[0-9][0-9]* [A-Z][A-Z]*[0-9]*\.*[0-9]* //<br />
/\..*//</div></div>
</li>
<li>&#8211;to rename full_name by sequence info<br />
copy full_name to tmp and to backup (just in case)</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">:*=*(full_name)</div></div>
<p>then get rid of extraneous info:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/[0-9][0-9]* [A-Z][A-Z]*[0-9]*\.*[0-9]* //</div></div>
</li>
<li>then copy tmp to full_name
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">:*=*(tmp)</div></div>
</li>
</ul>
<li>in ARB: export to XFIG (Tree&#8211;>Export to xfig) with no handles, no colors, full tree</li>
<li>in XFIG: immediately export to SVG</li>
<li>in INKSCAPE: open svg tree file and edit as necessary</li>
<li>in INKSCAPE: resize page (File &#8211;> document properties &#8211;> fit page to selection), resize selection to maximize page, export bitmap 300dpi png</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://staff.washington.edu/rec3141/wordpress/archives/410/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Parsimony ratchets and efficient time usage</title>
		<link>http://staff.washington.edu/rec3141/wordpress/archives/386</link>
		<comments>http://staff.washington.edu/rec3141/wordpress/archives/386#comments</comments>
		<pubDate>Tue, 06 Jan 2009 23:35:05 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[none]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[phylogeny]]></category>
		<category><![CDATA[science]]></category>

		<guid isPermaLink="false">http://staff.washington.edu/rec3141/wordpress/archives/386</guid>
		<description><![CDATA[Trying to get a Parsimony (and likelihood) Ratchet protocol going I spent a couple hours trying to get PAUPRat working, including compiling an old compiler and finding old versions of libraries and editing Makefiles&#8230; then I found a newer Java program that does the same thing: PRAP2.  The program includes the Likelihood ratchet protocol [...]]]></description>
			<content:encoded><![CDATA[<p>Trying to get a <a href="http://hem.fyristorg.com/acacia/MLpaup.htm" target="_blank">Parsimony (and likelihood) Ratchet</a> protocol going I spent a couple hours trying to get <a href="http://users.iab.uaf.edu/~derek_sikes/software2.htm" target="_blank">PAUPRat</a> working, including compiling an old compiler and finding old versions of libraries and editing Makefiles&#8230; then I found a newer Java program that does the same thing: <a href="http://systevol.nees.uni-bonn.de/software/PRAP2" target="_blank">PRAP2</a>.  The program includes the Likelihood ratchet protocol described above but not the Parsimony.  Here are the settings for the Parsimony ratchet protocol, as described by Sikes et al., which are then replicated by PRAP2 into PAUP* blocks.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;height:300px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[!* startcmd: * * * * * * * * * * * * * &nbsp;*] &nbsp;<br />
[!* ----- Parsimony Ratchet &nbsp;-----*]<br />
[!* &nbsp; &nbsp; &nbsp; as in PAUPrat &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
[!* &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; January, 2009 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*] &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
Time;<br />
Log File=paupratchet.log; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
Set Increase=auto;<br />
hs status=no nrep=1 swap=tbr start=stepwise addseq=random nchuck=1 chuckscore=1;<br />
savetrees file=mydata.tre replace;<br />
savetrees file=mydata.tmp replace;<br />
[!* paupcmd: * * * * * * * * * * * * * &nbsp;*]<br />
pset mstaxa=uncertain;<br />
hsearch status=no start=1 swap=tbr multrees=no;<br />
[!* rewtdcmd:* * * * * * * * * * * * * &nbsp;*] &nbsp;<br />
[!* normcmd:* * * * * * * * * * * * * &nbsp;*]<br />
savetrees file=mydata.tmp replace;<br />
gettrees file=mydata.tre mode=7;<br />
savetrees file=mydata.tre replace;<br />
gettrees file=mydata.tmp mode=3 warntree=no;<br />
Time;<br />
[!* stopcmd: * * * * * * * * * * * * * &nbsp;*]<br />
gettrees file=mydata.tre mode=3;<br />
pscores all;<br />
Time; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
Log Stop; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
[!* * * * * * * * * * * * * * * * *] <br />
[!* -- THIS SEARCH IS COMPLETE -- *] <br />
[!* &nbsp;A LOG FILE HAS BEEN WRITTEN &nbsp;*] <br />
[!* AND ALL TREES HAVE BEEN SAVED *] <br />
[!* &nbsp; &nbsp;IT IS OKAY TO QUIT PAUP &nbsp; &nbsp;*] <br />
[!* * * * * * * * * * * * * * * * *] <br />
Quit;</div></div>
<p>Update: PRAP2 has a built-in parsimony ratchet that is more cleanly written than this one, except I had to remove the command &#8216;dropmode=execute&#8217; because PAUP* 4b10 wasn&#8217;t recognizing it.  Using the pre-configured ratchet you can choose the number of runs to code automatically, but using a custom script you can&#8217;t.  So here&#8217;s a bash shell script to automate the script above, after generating some number (here N=20) script files named &#8217;sequences.[1-N].nexus&#8217;.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">#!/bin/bash<br />
for i in `jot 20 1 20`;<br />
do<br />
&nbsp;`paup sequences.$i.nexus`<br />
&nbsp;`mv -f mydata.tmp mydata.$i.tmp`<br />
&nbsp;`mv -f mydata.tre mydata.$i.tre`<br />
&nbsp;`mv -f paupratchet.log paupratchet.$i.log`<br />
done</div></div>
<p>Since the parsimony ratchets run quickly it is fine to do them all on one processor, but I&#8217;m starting the likelihood runs separately on each processor.  This script will run them one at a time, but if you add &#8217;screen -S like.$i&#8217; to the line before &#8216;/bin/paup&#8230;&#8217; it should start up to 10 simultaneously in separate &#8220;<a href="http://www.linuxforums.org/applications/the_screen_program.html">screens</a>&#8220;, assuming your nexus files are all in the same directory and named ratchet.like.[1-10].nexus</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/bash</span><br />
<span style="color: #000000; font-weight: bold;">for</span> i <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span>jot 10 1 10<span style="color: #000000; font-weight: bold;">`</span>;<br />
<span style="color: #000000; font-weight: bold;">do</span><br />
&nbsp;<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">mkdir</span> like<span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">`</span><br />
&nbsp;<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">cp</span> ratchet.like.<span style="color: #007800;">$i</span>.nexus .<span style="color: #000000; font-weight: bold;">/</span>like<span style="color: #007800;">$i</span><span style="color: #000000; font-weight: bold;">/`</span><br />
&nbsp; <span style="color: #7a0874; font-weight: bold;">cd</span> like<span style="color: #007800;">$i</span><br />
&nbsp;<span style="color: #000000; font-weight: bold;">`/</span>bin<span style="color: #000000; font-weight: bold;">/</span>paup4b10-ppc-macosx <span style="color: #660033;">-n</span> .<span style="color: #000000; font-weight: bold;">/</span>ratchet.like.<span style="color: #007800;">$i</span>.nexus<span style="color: #000000; font-weight: bold;">`</span><br />
&nbsp;<span style="color: #7a0874; font-weight: bold;">cd</span> ..<br />
<span style="color: #000000; font-weight: bold;">done</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://staff.washington.edu/rec3141/wordpress/archives/386/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>kubuntu 8.10 on macbook5</title>
		<link>http://staff.washington.edu/rec3141/wordpress/archives/290</link>
		<comments>http://staff.washington.edu/rec3141/wordpress/archives/290#comments</comments>
		<pubDate>Mon, 03 Nov 2008 02:48:28 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[none]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[open access]]></category>

		<guid isPermaLink="false">http://staff.washington.edu/rec3141/?p=290</guid>
		<description><![CDATA[I just bought an aluminum macbook5,1 and successfully installed kubuntu 8.10 intrepid ibex onto it.  
Mostly, I used this wiki page: https://help.ubuntu.com/community/MacBook Aluminum
and this forum thread: http://ubuntuforums.org/showthread.php?t=947947
UPDATE 2009-01-08: I&#8217;ve got the macbook back, now with it&#8217;s 3rd logic board and 2nd magsafe board. The tech said he thinks there was a &#8216;bad batch&#8217; of [...]]]></description>
			<content:encoded><![CDATA[<p>I just bought an aluminum macbook5,1 and successfully installed kubuntu 8.10 intrepid ibex onto it.  </p>
<p>Mostly, I used this wiki page: <a href="https://help.ubuntu.com/community/MacBook Aluminum">https://help.ubuntu.com/community/MacBook Aluminum</a><br />
and this forum thread: <a href="http://ubuntuforums.org/showthread.php?t=947947">http://ubuntuforums.org/showthread.php?t=947947</a></p>
<p>UPDATE 2009-01-08: I&#8217;ve got the macbook back, now with it&#8217;s 3rd logic board and 2nd magsafe board. The tech said he thinks there was a &#8216;bad batch&#8217; of logic boards in the late summer and fall that were &#8216;thinner&#8217; than usual. One guy got 4 boards replaced before he got one that worked. How about some Quality Control, Apple?!</p>
<p>UPDATE 2009-01-07: The honeymoon is over.  My MacBook has been in the Apple Hospital for the better part of 3 weeks.  First, the lcd screen dissolved to white for no apparent reason and would not display anything but white although I could hear things booting up in the background. After a couple of attempts at fixing it by resetting the NVRAM and SMC it wouldn&#8217;t boot up at all.  I took it in and they replaced the Logic Board. Then they tried to blame it on rEFIt, something about how it was a software package that overwrote the EFI and therefore invalidated the warranty and it would cost $1000 to replace the board blah blah.  I think the manager knew he was full of it and ended up replacing it for free (rEFIt apparently does not invalidate the warranty but you might want to remove it anyway &#8212; I&#8217;d rather not have to hire a lawyer to prove it).  Then, less than a week later, the battery slowly stopped charging.  I thought it was the power adapter because the display model adapter at the Apple store worked (green light came on) so I got a replacement but it didn&#8217;t work.  I had to take it back in and they still have it.  Now they&#8217;re replacing the magsafe board.</p>
<p><span id="more-290"></span><br />
First in OSX I partitioned the harddrive using bootcamp into a 50Gb OSX partition and the rest for &#8216;windows&#8217;.</p>
<p>Next, I installed refit v0.12 (<a href="http://refit.sourceforge.net/">http://refit.sourceforge.net/</a>) in OSX.  [I later edited refit.conf to boot linux first by uncomment the legacyboot line.]</p>
<p>Then I burned an ISO of the kubuntu 8.10 livecd and restarted the computer, holding &#8216;c&#8217; at the white screen</p>
<p>Then I installed kubuntu.  At the partition step, I went to the &#8216;manual&#8217; screen and deleted the FAT32 partition created by bootcamp and instead made a 103Gb ext3 partition (mounted to /) and a ~4Gb swap partition.  At the confirmation screen, I clicked the &#8216;Advanced&#8217; button and unchecked the box for where to install grub because I wasn&#8217;t sure what to put there.  [Probably the answer was (hd0,2)].</p>
<p>After installation, I went to konsole and ran grub manually.  This step could also be done by booting into the livecd, and may in fact require first syncing the partition tables using the refit Partitioning Tool.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sudo grub<br />
find /boot/grub/stage1</div></div>
<p>I got (hd0,2), then typed</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root (hd0,2)<br />
setup (hd0,2)<br />
exit</div></div>
<p>After this, I shut down the computer and turned it back on.  [rebooting from kubuntu doesn't seem to go well, it either goes to a black screen or starts making this hideous beeping sound].</p>
<p>At the refit menu, I made sure the partition tables were synced using the Partitioning Tool.</p>
<p>After selecting the linux option from the refit menu it went to a white screen with Tux and sat there&#8230; and sat there.  So I hard-rebooted and tried it again with the same result.  Then I went investigating and found that no menu.lst had been installed in /boot/grub/ so I made my own.  <em>I probably should not have done this.</em>  I probably should have kept cycling the power until it worked, that seems to be what other people did.  But anyway it worked eventually and here is my <strong>/boot/grub/menu.lst</strong>:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># Boot automatically after 3 secs.<br />
timeout 3<br />
# By default, boot the first entry.<br />
default 0<br />
# For booting GNU/Linux<br />
title &nbsp;GNU/Linux<br />
root (hd0,2)<br />
kernel /vmlinuz root=/dev/sda3<br />
initrd /initrd.img</div></div>
<p>After that, once I was able to boot reliably into Kubuntu, I started messing with the accessories.  In particular, the trackpad is terrible to start off and manageable after a few tweaks.  After performing the following actions I can scroll with two fingers and right-click with a two-finger click, but the movement can still be a bit jerky.  The main problem is that there is no dedicated button, it has been integrated into the trackpad, so I cannot simultaneously click something with the thumb and move it with a finger.  Instead, I have to click and drag with the same finger, which is pretty annoying for dragging files or resizing windows or selecting text.  It also means I can&#8217;t rest my thumb on the trackpad at all, which goes all the way to the bottom of the laptop, so it just has to hover there.  If it touches the trackpad then the pointer won&#8217;t move.  I tried setting up the palm detection options in the file below but that turned into a disaster so I gave up.  It also means I can&#8217;t have my pointer finger on the trackpad when I click, so there&#8217;s a constant rocking back and forth between finger and thumb which is annoying.</p>
<p>So first I added the PPA repository to <strong>/etc/apt/sources.list</strong></p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">deb http://ppa.launchpad.net/mactel-support/ubuntu intrepid main</div></div>
<p>then installed some apple-specific modules:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sudo aptitude install hal-applesmc applesmc-dkms bcm5974-dkms</div></div>
<p>Only the first two are listed in the wiki page but I think I needed the third as well, which also provides access to the hardware function keys, few of which seem to work so far (F7-9 are back/play/forward; F10 mutes; the rest don&#8217;t work).  This might also be a good place to mention that if you install bcm5974-dkms the function keys stop working as normal and to access them you have to hit fn+F-key, e.g. to go to application quick-launcher you would have to hit alt+fn+F2 instead of just alt+F1, although I ended up changing this key-combination to command+escape in KDE system settings anyway.  I also figured out that you can do a real delete by using fn+delete.</p>
<p>Anyway, once those are installed I edited <strong>/etc/modules</strong> to include &#8216;applesmc&#8217; on a new line.</p>
<p>Then  I started working with the synaptics touchpad options.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sudo cp /usr/share/hal/fdi/policy/20thirdparty/11-x11-synaptics.fdi /etc/hal/fdi/policy/</div></div>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sudo pico /etc/hal/fdi/policy/20thirdparty/11-x11-synaptics.fdi</div></div>
<p>I added the following line which seems to be important though I&#8217;m not well enough informed to know why.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&amp;lt;merge key=&quot;input.x11_options.SHMConfig&quot; type=&quot;string&quot;&amp;gt;True&amp;lt;/merge&amp;gt;</div></div>
<p>As I mentioned before, other edits I made changed the behaviour of the touchpad unpredictably.  Some reminders: to scroll horizontally or vertically just drag two fingers either direction.  To right-click, click with two fingers on the touchpad.  To paste from the clipboard (middle-click) click with three fingers on the touchpad.</p>
<p>For the video driver, the program that popped up on booting Kubuntu refused to install the nvidia driver so I did it manually:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sudo apt-get install nvidia-glx-177</div></div>
<p>Sound: I added the following line to my /etc/modprobe.d/options file but I still have no sound through the speakers (only headphone jack).</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">options snd_hda_intel model=mbp3</div></div>
<p>Wireless works.</p>
<p>update: to change the brightness, and have it go back to that brightness on re-suspend:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">sudo aptitude install mbp-nvidia-bl-dkms<br />
sudo modprobe mbp-nvidia-bl-dkms</div></div>
<p>then the brightness can be changed by:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">echo 1 | sudo tee /sys/class/backlight/mbp_backlight/brightness</div></div>
]]></content:encoded>
			<wfw:commentRss>http://staff.washington.edu/rec3141/wordpress/archives/290/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>testing inline LaTeX</title>
		<link>http://staff.washington.edu/rec3141/wordpress/archives/206</link>
		<comments>http://staff.washington.edu/rec3141/wordpress/archives/206#comments</comments>
		<pubDate>Wed, 10 Sep 2008 19:48:21 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[none]]></category>
		<category><![CDATA[latex]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://staff.washington.edu/rec3141/?p=206</guid>
		<description><![CDATA[Using WordPress 2.6 and wp-latexrender and an installer.  Success after jiggling with the paths and editing class.latexrender.php lines 197&#8211;224 to replace each instance of &#8216;\f&#8217; with &#8216;\\f&#8217;.
For example, line 203 had to be changed from
$string .= &#34;\\newsavebox{\formulabox}\n&#34;;
to
$string .= &#34;\\newsavebox{\\formulabox}\n&#34;;
This change is apparently only necessary in PHP versions >5.2.5 (thanks to steve at sixthform for [...]]]></description>
			<content:encoded><![CDATA[<p>Using WordPress 2.6 and <a href="http://sixthform.info/steve/wordpress/">wp-latexrender</a> and <a href="http://fugato.net/2007/01/20/latex-in-wordpress/">an installer</a>.  Success after jiggling with the paths and editing class.latexrender.php lines 197&#8211;224 to replace each instance of &#8216;\f&#8217; with &#8216;\\f&#8217;.</p>
<p>For example, line 203 had to be changed from</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$string .= &quot;\\newsavebox{\formulabox}\n&quot;;</div></div>
<p>to</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$string .= &quot;\\newsavebox{\\formulabox}\n&quot;;</div></div>
<p>This change is apparently only necessary in PHP versions >5.2.5 (thanks to steve at <a href="http://sixthform.info/steve/wordpress/">sixthform</a> for figuring that out).</p>
<p><img src='/rec3141/wordpress/wp-content/plugins/latexrender/pictures/20ff89e216d49714f87fc83359efd42d_1.83333pt.png' title='e^{i\pi}+1 =0' alt='e^{i\pi}+1 =0'  style="vertical-align:-1.83333pt;" ></p>
<p>ta da!</p>
]]></content:encoded>
			<wfw:commentRss>http://staff.washington.edu/rec3141/wordpress/archives/206/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>nifty linux command lines</title>
		<link>http://staff.washington.edu/rec3141/wordpress/archives/167</link>
		<comments>http://staff.washington.edu/rec3141/wordpress/archives/167#comments</comments>
		<pubDate>Fri, 15 Aug 2008 23:58:42 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[none]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://staff.washington.edu/rec3141/wordpress/archives/167</guid>
		<description><![CDATA[watch -n 1 ‘dmesg &#124; tail’
watches a file (or other input) and outputs it every &#8216;1&#8242; second
]]></description>
			<content:encoded><![CDATA[<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">watch -n 1 ‘dmesg | tail’</div></div>
<p>watches a file (or other input) and outputs it every &#8216;1&#8242; second</p>
]]></content:encoded>
			<wfw:commentRss>http://staff.washington.edu/rec3141/wordpress/archives/167/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
