<?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; phylogeny</title>
	<atom:link href="http://staff.washington.edu/rec3141/wordpress/archives/tag/phylogeny/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>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>
	</channel>
</rss>
