<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8532065960756482590</id><updated>2026-04-11T07:09:49.357-04:00</updated><category term="R"/><category term="humor"/><category term="NGS"/><category term="velvet"/><category term="Samtools"/><category term="BioConductor"/><category term="economics"/><category term="BSgenome"/><category term="BioPerl"/><category term="bash history"/><category term="bioinformatics"/><category term="cycling"/><category term="hardware"/><category term="histfile"/><category term="n50"/><category term="os x"/><category term="reproducible research"/><title type='text'>Jermdemo</title><subtitle type='html'>Mostly bioinformatics, NGS, and cat litter box reviews</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jermdemo.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://jermdemo.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Jermdemo</name><uri>http://www.blogger.com/profile/01662705354227625640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>21</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8532065960756482590.post-5018056555810153477</id><published>2012-12-27T16:08:00.000-05:00</published><updated>2014-06-05T14:26:00.008-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="reproducible research"/><title type='text'>The Reproducible Research Guilt Trip May Finally Be Paying Off</title><content type='html'>&lt;h4&gt;
We might be closer to killing off the &quot;Just take my word for it - I&#39;m pretty sure I did this right&quot; methods section&lt;/h4&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
There is no shortage of well-reasoned articles filled persuasive arguments about the need for higher reproducible research standards in the scientific literature. With so many good posts about the virtues of reproducible research, they all boil down to one overarching concept:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQv_qhALQlWpW11aPwjAgsJ07B5tc-cvb8aaezv_HZrakJk3IG2PchViuPDbjpfMpH51XFlxWlaTbvpG7DhoDOkeROapfr83hMakW_hl9erlkZvdiALhsDIv0r0hTGxBSIdWzf7hhmq7k/s1600/writeshitdown.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;write shit down&quot; border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQv_qhALQlWpW11aPwjAgsJ07B5tc-cvb8aaezv_HZrakJk3IG2PchViuPDbjpfMpH51XFlxWlaTbvpG7DhoDOkeROapfr83hMakW_hl9erlkZvdiALhsDIv0r0hTGxBSIdWzf7hhmq7k/s320/writeshitdown.jpg&quot; title=&quot;&quot; width=&quot;242&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Why is this even an issue? Biologists in particular seem to be collectively and subconsciously reacting to those awful General Chemistry labs where they had you copy down pages of instructions verbatim into your lab notebook. It should come as no surprise that bioinformatics is ground zero for&amp;nbsp;reproducibility&amp;nbsp;activism.&lt;br /&gt;
&lt;br /&gt;
It is unfortunate reproducible research is tied up with all sorts of other holier-than-thou practices: open access, open source, open data, literate programming, blogging, functional programming. This&amp;nbsp;all-encompassing evangelism tends to polarize people.&amp;nbsp;While wonky über-programmers like C. Titus Brown lay out &lt;a href=&quot;http://ivory.idyll.org/blog/replication-i.html&quot;&gt;fundamental practices for reproducibility&lt;/a&gt;, most&amp;nbsp;PIs have been publicly giving lip service to the idea of reproducible research, belying&amp;nbsp;a &quot;I don&#39;t wanna eat my vegetables&quot;-type disdain. There are now &quot;&lt;a href=&quot;http://biotest.cgrb.oregonstate.edu/&quot;&gt;corsortia&lt;/a&gt;&quot; and an &quot;&lt;a href=&quot;https://www.scienceexchange.com/reproducibility&quot;&gt;initiative&lt;/a&gt;&quot; to compel scientists to actually write their shit down, preferably with door prizes. If you think this has a &quot;&lt;a href=&quot;http://www.youtube.com/watch?v=dDjBsOkidek&quot;&gt;posture pals&lt;/a&gt;&quot;&amp;nbsp;(video)&amp;nbsp;feel to it, you&#39;re not alone.&amp;nbsp;As the number of pro-RR articles has steadily increased, few take these to heart.&lt;br /&gt;
&lt;br /&gt;
This head against wall bashing has been the pattern for many years - better tools are now available (RStudio, knitr, Galaxy, cloud computing, figshare, github, bitbucket) and more rah-rah from the blogosphere - but little enforcement from major journals. But now a recent development has raised my hopes, because it indicates editors have been tightening the screws enough to cause discomfort:&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;People have actually started to argue against reproducible research!&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNUKgQ6_XiJM0aJFrg71wOCqQJFFjgi_4TuZvwh_Nk5DhI3_imwbwQvLDS2S6X-pRgRlGGCDJAyDny3kkBx5Y9c5kceVRpMFkIT_7fJC_yokJmzqet7R7y_mn8a_loZJhRp1V3ZTbrkcs/s1600/thinker2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;255&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNUKgQ6_XiJM0aJFrg71wOCqQJFFjgi_4TuZvwh_Nk5DhI3_imwbwQvLDS2S6X-pRgRlGGCDJAyDny3kkBx5Y9c5kceVRpMFkIT_7fJC_yokJmzqet7R7y_mn8a_loZJhRp1V3ZTbrkcs/s400/thinker2.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h4&gt;
Hearts and Minds&lt;/h4&gt;
&lt;br /&gt;
The founder of the irreplicability movement is Christopher Drummond, author of “&lt;a href=&quot;http://cogprints.org/8675/&quot;&gt;Reproducible Research: a Dissenting Opinion&lt;/a&gt;”. I will attempt to paraphrase his arguments here:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Richard Feynman never had a Github account.&lt;/li&gt;
&lt;li&gt;No one is really going to read your damn code anyway.&lt;/li&gt;
&lt;li&gt;Writing shit down == A big drag, man.&lt;/li&gt;
&lt;li&gt;The Anil Potti incident proves liars always lie about their Rhodes Scholarships&amp;nbsp;first. We should crack down on curricula vitae, not&amp;nbsp;veritas curat.&lt;/li&gt;
&lt;/ol&gt;
Drummond&#39;s points are challenged &lt;a href=&quot;http://simplystatistics.org/2012/11/15/reproducible-research-with-us-or-against-us-3/&quot;&gt;here&lt;/a&gt;&amp;nbsp;by statistician and &lt;a href=&quot;https://www.coursera.org/course/compdata&quot;&gt;Coursera&lt;/a&gt; favorite Roger Peng.&lt;br /&gt;
&lt;br /&gt;
A precursor to the dissenting opinion article is Drummond&#39;s &quot;&lt;a href=&quot;http://cogprints.org/7691/7/icmlws09.pdf&quot;&gt;Replicability is not Reproducibility:&amp;nbsp;&lt;/a&gt;&lt;a href=&quot;http://cogprints.org/7691/7/icmlws09.pdf&quot;&gt;Nor is it Good Science&lt;/a&gt;&quot;. A distinction is drawn between reproducibility and replicability, the former being what is advocated and the latter being more generalizable or scientifically provable. The idea we require researchers to submit their data and code, replicable research, is a narrow concept really only useful for ferreting out scientific misconduct.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;a href=&quot;http://www.flickr.com/photos/usfwsmtnprairie/8282763616/&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot; title=&quot;Black-footed Ferret by USFWS Mountain Prairie, on Flickr&quot;&gt;&lt;img alt=&quot;Black-footed Ferret&quot; height=&quot;132&quot; src=&quot;http://farm9.staticflickr.com/8063/8282763616_3e4f7cb057.jpg&quot; title=&quot;credit: Kimberly Tamkun / USFWS&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
I would argue that ignorance&amp;nbsp;of biological sequence analysis, and even moreso statistics, is a bigger threat than the outright fraud seen in the Duke case.&amp;nbsp;Most bioinformatics manuscripts feature analysis which is not replicable, which is frightening to consider when GWAS and exome NGS variant papers implicate so many genes in disease, many of them residing along a razor thin p-value threshold tweaked by several incomprehensible&amp;nbsp;cherry picked&amp;nbsp;program parameters.&lt;br /&gt;
&lt;br /&gt;
It is not clear science can efficiently&amp;nbsp;&lt;a href=&quot;http://blogs.nature.com/news/2012/12/is-the-scientific-literature-self-correcting.html&quot;&gt;self-correct&lt;/a&gt;.&amp;nbsp;So while replicability is not reproducibility, reproducibility is too slow to substitute for replicability. A manuscript that describes real reproducible biological phenomena is essentially conjecture until it can be repeated. The greatest &lt;a href=&quot;http://en.wikipedia.org/wiki/Ferret_legging&quot;&gt;ferret-legger&lt;/a&gt;&amp;nbsp;the world has ever known will live in obscurity until they buy a ferret. We have a culture of scientists who refuse to buy a ferret.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Accounting for Tastes&lt;/h4&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
The other dissenting opinion (&lt;a href=&quot;http://gasstationwithoutpumps.wordpress.com/2012/08/27/accountable-research-software/&quot;&gt;here&lt;/a&gt;) is from UCSC&#39;s Kevin Karplus, who replies to&amp;nbsp;Iddo Friedberg&#39;s &lt;a href=&quot;http://bytesizebio.net/index.php/2012/08/24/can-we-make-research-software-accountable/&quot;&gt;post&lt;/a&gt; recommending a panel of white coat mechanics to help biologists get their code ready for publication.&amp;nbsp;Karplus raises two points:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;It is difficult to make polished software for others to use and that is not the point of research.&lt;/li&gt;
&lt;li&gt;Replicability is not reproducibility.&lt;/li&gt;
&lt;/ul&gt;
Regardless of Friedberg&#39;s proposal, railing against &quot;polished software&quot; is simply a straw man argument. Reproducible research in &lt;strike&gt;2012&amp;nbsp;&lt;/strike&gt;2013&amp;nbsp;does not mean robust, extensible, or even well documented code. Most sequence analysis papers feature very little compiled code, but rely on using a series of executable programs glued together using scripting languages, producing intermediate data then digested into a report, often written in R.&lt;br /&gt;
&lt;br /&gt;
Getting these sequence analysis workflows to be reproducible will not require a highly skilled platoon of developers. Any willing researcher can submit a shell script or a build script of commands provided they avoid these common pitfalls:&lt;br /&gt;
&lt;ul&gt;
&lt;li dir=&quot;ltr&quot;&gt;Using bioinformatics web applications with no web service capability&lt;/li&gt;
&lt;li dir=&quot;ltr&quot;&gt;Using desktop bioinformatics software with no logging capability&lt;/li&gt;
&lt;li dir=&quot;ltr&quot;&gt;Relying on proprietary institutional databases, perhaps with stored procedures that prove too unwiedly to dump&lt;/li&gt;
&lt;li dir=&quot;ltr&quot;&gt;Using command line programs without a &lt;a href=&quot;https://gist.github.com/1651133&quot;&gt;directory-based bash history&lt;/a&gt;&lt;/li&gt;
&lt;li dir=&quot;ltr&quot;&gt;Using Excel to manually manipulate data&lt;/li&gt;
&lt;/ul&gt;
As our toolset and research community matures, these &lt;strike&gt;excuses&lt;/strike&gt;&amp;nbsp;obstacles will eventually disappear. But there is one scenario which will always be true in some of the more competitive arenas of bioinformatics programming (e.g. structure prediction, de novo assembly):&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;The researcher was perfectly capable of submitting code but decided to retain a competitive advantage.&lt;/li&gt;
&lt;/ul&gt;
&quot;Over-CASPed&quot; researchers who are unwilling to divulge their secret sauce should be relegated to appropriate sandboxes.&lt;br /&gt;
&lt;br /&gt;
Replication does not prove a biological truth but we often don&#39;t even have the fleeting proof that a scientist did what they said they did.&lt;br /&gt;
&lt;br /&gt;
Which brings us back to those damn chemistry labs. While many public access talk shows find&amp;nbsp;&lt;a href=&quot;http://www.philly.com/philly/blogs/evolution/Why-are-So-Many-Chemists-Creationists-.html&quot;&gt;chemists willing argue against evolution&lt;/a&gt;, you would be hard pressed to find a one who would argue against writing shit down.&lt;br /&gt;
&lt;br /&gt;
In other words:&amp;nbsp;&lt;i&gt;Not writing shit down is an even worse idea than creationism.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;There, I blogged in 2012.&lt;/i&gt;</content><link rel='replies' type='application/atom+xml' href='http://jermdemo.blogspot.com/feeds/5018056555810153477/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jermdemo.blogspot.com/2012/12/the-reproducible-research-guilt-trip.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/5018056555810153477'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/5018056555810153477'/><link rel='alternate' type='text/html' href='http://jermdemo.blogspot.com/2012/12/the-reproducible-research-guilt-trip.html' title='The Reproducible Research Guilt Trip May Finally Be Paying Off'/><author><name>Jermdemo</name><uri>http://www.blogger.com/profile/01662705354227625640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQv_qhALQlWpW11aPwjAgsJ07B5tc-cvb8aaezv_HZrakJk3IG2PchViuPDbjpfMpH51XFlxWlaTbvpG7DhoDOkeROapfr83hMakW_hl9erlkZvdiALhsDIv0r0hTGxBSIdWzf7hhmq7k/s72-c/writeshitdown.jpg" height="72" width="72"/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8532065960756482590.post-7206707885663816984</id><published>2012-02-20T21:44:00.000-05:00</published><updated>2017-05-22T12:13:39.050-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="humor"/><category scheme="http://www.blogger.com/atom/ns#" term="NGS"/><title type='text'>AGBT: digesting diposable MinIONs in diaspora</title><content type='html'>Despite my current&amp;nbsp;&lt;a href=&quot;http://www.biostars.org/user/list/&quot;&gt;ranking of 15th in Biostar&lt;/a&gt;, myriad page views of my &lt;a href=&quot;http://jermdemo.blogspot.com/2011/06/big-ass-servers-and-myths-of-clusters.html&quot;&gt;BAS&lt;/a&gt;™ post (albeit mostly misdirected perverts), and positive response for my celebrated campaign against more microarray papers, for some reason I was not &quot;comped&quot; an all-expenses paid trip as honorary blog journalist to this year&#39;s &lt;a href=&quot;http://agbt.org/&quot;&gt;Advances in Biology and Genome Technology&lt;/a&gt;, which is kind of like CES for&amp;nbsp;sequencing&amp;nbsp;people, except AGBT is still worth attending. Normally the oversight would not bother me, as bioinformatics itself is not the focus of this meeting, but the flood of &lt;a href=&quot;https://twitter.com/#%21/search/realtime/%23AGBT&quot;&gt;#AGBT&lt;/a&gt; tweets would not let me forget this fact and I was forced to stew and blog in envy.
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
The first game changing disruptive revolutionary thing from England since 1964&lt;/h4&gt;
Even from my distant perch it was obvious all the scientific presentations at AGBT were overshadowed by a 17-minute showstopping demo from Clive Brown of Oxford Nanopore, a company that by all appearances would either die, focus on some minor stuff, or bring it. They chose the third option, and in so doing boosted the &quot;&lt;a href=&quot;http://www.google.com/trends/?q=clive&quot;&gt;Clive index&lt;/a&gt;&quot; to unprecedented levels. OxN&#39;s recent decision to enlist famed geneticist and serial startup advisor George Church struck me as a huge gamble, as the string of Route 128 flameouts touting his name lead me to assume long ago that Church had stowed away some cursed Tiki idol in his luggage like Bobby in that episode of the Brady Bunch. However, after reading up on OxN, I had to admit I was just bitter about Dr. Church&#39;s refusal to invest in my chain of &lt;a href=&quot;http://www.polonator.org/&quot;&gt;Polonator&lt;/a&gt;-based paternity testing clinics, Yo Po&#39;lonatizz!™&lt;br /&gt;
&lt;br /&gt;
Two new sequencer platforms were announced:&lt;br /&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float: right; margin-left: 1em; text-align: right;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOwwzg6YpVyRUH4OEGQO-XN2QkVmxPsvuf3TiFF0Zjvr82PaBswkNGvopdxpiWpXEdKICbafrQ6n09k1C84zJ1d2YnKu_nMx5E83dI_F0p_JYGllIRTmnDumLjb4GcD2vIilijl4XP4QE/s1600/MinION_in_laptop.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOwwzg6YpVyRUH4OEGQO-XN2QkVmxPsvuf3TiFF0Zjvr82PaBswkNGvopdxpiWpXEdKICbafrQ6n09k1C84zJ1d2YnKu_nMx5E83dI_F0p_JYGllIRTmnDumLjb4GcD2vIilijl4XP4QE/s320/MinION_in_laptop.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;A MinION. Forget to hit eject before removing this&lt;br /&gt;
and you will instantly lose $900.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ul&gt;
&lt;li&gt;The MinION, a $900 &quot;disposable&quot; USB drive which detects minute changes in voltage incurred by the passage of DNA through a 
robust and delicious lipid bilayer. Finally a device capable of sequencing filthy rabbit blood right on the spot!&lt;/li&gt;
&lt;li&gt;The GridION system, a scalable rackmounted sequencer, which despite some lack of pricing clarity, should produce an actual $1000 15-minute human genome by 2013.&lt;/li&gt;
&lt;/ul&gt;
These exotic machines must be truly game-changing because they made properly expanding Albert Vilella&#39;s &lt;a href=&quot;https://docs.google.com/spreadsheet/ccc?key=0AvaxS3m5rl-9dHdtUGRtaGlsZWNFNWJleDRXaUhQTHc&quot;&gt;NGS sequencer spreadsheet&lt;/a&gt; quite difficult. The MinION, in particular, could be viewed as a free device with $900 of consumables. This effectively lowers the bar to getting high-throughput sequence in the doctor&#39;s office to a 100% unamortized billable transaction. These things also claim &lt;i&gt;fucking unlimited read lengths.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Expression microarrays, SAGE, 454, ABI SOLiD, and now Pacific Biosciences have all left bad tastes of uncertainty and dissatisfaction in the mouths of scientists. It is easy to disappoint people on a grand scale with a $700,000 machine, but $900 worth of chemicals in a USB drive is a different animal, and it seems likely this invention will find a following if it even delivers on a fraction of what it promises.&lt;br /&gt;
&lt;br /&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float: left; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi33MMhm5V8Yh1u26z04rIZPlzOfF7Nwdyy6KcR_yqc09e0Zl78ahGn4LwupbYxKHNbp10Lkgi4Nj2voVwwTAmWmMFlZrAlLyTl3MXLy7l0NUK8uYF9oZSa5PG_FIDlHJHo37V_VD0C2vY/s1600/GridION_scaling.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;170&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi33MMhm5V8Yh1u26z04rIZPlzOfF7Nwdyy6KcR_yqc09e0Zl78ahGn4LwupbYxKHNbp10Lkgi4Nj2voVwwTAmWmMFlZrAlLyTl3MXLy7l0NUK8uYF9oZSa5PG_FIDlHJHo37V_VD0C2vY/s320/GridION_scaling.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;The GridION - put it in a rack or right on the floor.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
Good information on this sequencer-on-a-stick is to be found at&amp;nbsp;&lt;a href=&quot;http://pathogenomics.bham.ac.uk/blog/2012/02/oxford-nanopore-megaton-announcement-why-do-you-need-a-machine-exclusive-interview-for-this-blog/&quot;&gt;Nick Loman&#39;s blog&lt;/a&gt;,&amp;nbsp;&lt;a href=&quot;http://www.genomesunzipped.org/2012/02/making-sequencing-simpler-with-nanopores.php&quot;&gt;Genomes Unzipped&lt;/a&gt;, &lt;a href=&quot;http://www.nanoporetech.com/news/press-releases/view/39&quot;&gt;and official press releases&lt;/a&gt;. An excellent discussion of the nanopores themselves can be found at &lt;a href=&quot;http://www.omespeak.com/blog/?p=507&quot;&gt;Omically Speaking&lt;/a&gt;.
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;



More cringeworthy marketing from the West coast &lt;/h4&gt;
The Oxford Nanopore machines are so jaw-dropping, in fact, that&amp;nbsp;&lt;a href=&quot;http://www.forbes.com/sites/matthewherper/2012/02/18/who-doubts-the-usb-thumb-drive-sequencer-a-rival/&quot;&gt;Jonathan Rothberg is already crying vaporware&lt;/a&gt;. His complaints do seem warranted, given disappointments from past year&#39;s announcements and the lack of publicly available sequence from these devices.
&lt;br /&gt;
&lt;br /&gt;
Unfortunately Ion Torrent has spent all of its goodwill on an&amp;nbsp;inane and hamfisted advertising war against Illumina&#39;s MiSeq, an intentionally crippled opponent. Seemingly orchestrated by castoffs from the Celebrity Apprentice, this assault began with &lt;a href=&quot;http://www.youtube.com/watch?feature=player_embedded&amp;amp;v=GUr17pHezUo&quot;&gt;cringe-inducing derivations&lt;/a&gt; of Apple commercials, and has expanded to include a sort of &quot;feature combover.&quot; Through some&lt;a href=&quot;http://www.youtube.com/watch?v=jv-JHafk4UA&amp;amp;feature=youtu.be&quot;&gt;&amp;nbsp;convoluted logic&lt;/a&gt; involving consensus, a professional whiteboard artist attempts to convince the public how the homopolymer error rate is actually lower using Ion Torrent PGM than MiSeq. This is the sequencing equivalent of having your mom try to convince you two apples is better than one&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/Drake%27s_Devil_Dogs&quot;&gt;devil dog&lt;/a&gt;, or some such utter nonsense.
&lt;br /&gt;
&lt;br /&gt;
My response was predictably measured and cerebral.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
This is not the&amp;nbsp;&lt;a href=&quot;https://picasaweb.google.com/lh/photo/oyux1nepVh9nxAqgbMnA1Px8lHi6ePCYZLKzcyR0WMQ?feat=directlink&quot;&gt;first time&lt;/a&gt;&amp;nbsp;I have tweet-confronted Ion Torrent over its&amp;nbsp;odious approach.&amp;nbsp;All this is rather unnecessary because overall, and despite the homopolymer issues, the utility of the PGM has been more or less within expectations. The MiSeq is also exactly within expectations, since it is basically a transparent, measly 1/50th slice of a HiSeq.&amp;nbsp;The same cannot really be said for the RS, whose error rate is clearly far above what was expected at the outset. So if anyone requires an aggressive smokescreen-type marketing campaign (or a new machine) it is Pacific Biosciences.</content><link rel='replies' type='application/atom+xml' href='http://jermdemo.blogspot.com/feeds/7206707885663816984/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jermdemo.blogspot.com/2012/02/agbt-digesting-diposable-minions-in.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/7206707885663816984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/7206707885663816984'/><link rel='alternate' type='text/html' href='http://jermdemo.blogspot.com/2012/02/agbt-digesting-diposable-minions-in.html' title='AGBT: digesting diposable MinIONs in diaspora'/><author><name>Jermdemo</name><uri>http://www.blogger.com/profile/01662705354227625640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOwwzg6YpVyRUH4OEGQO-XN2QkVmxPsvuf3TiFF0Zjvr82PaBswkNGvopdxpiWpXEdKICbafrQ6n09k1C84zJ1d2YnKu_nMx5E83dI_F0p_JYGllIRTmnDumLjb4GcD2vIilijl4XP4QE/s72-c/MinION_in_laptop.jpg" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8532065960756482590.post-8185076191620100624</id><published>2012-01-18T21:15:00.000-05:00</published><updated>2013-09-27T09:44:26.912-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="humor"/><category scheme="http://www.blogger.com/atom/ns#" term="NGS"/><category scheme="http://www.blogger.com/atom/ns#" term="R"/><title type='text'>When can we expect the last damn microarray paper?</title><content type='html'>&lt;h3&gt;With bonus R code&lt;/h3&gt;
It came as a shock to learn from PubMed that almost &lt;a href=&quot;http://www.ncbi.nlm.nih.gov/pubmed?term=microarray%5Btitle%5D%20and%202011%5Bpdat%5D&quot;&gt;900 papers&lt;/a&gt; were published with the word &quot;microarray&quot; in their titles last year alone, just 12 shy of the 2010 count. More alarming, many of these papers were not of the innocuous &quot;Microarray study of gene expression in dog scrotal tissue&quot; variety, but dry rehashings along the lines of &quot;Statistical approaches to normalizing microarrays to the reference brightness of Ursa Minor&quot;.
&lt;p&gt;
It&#39;s an ugly truth we must face: people aren&#39;t just using microarrays, &lt;i&gt;they&#39;re still writing about them&lt;/i&gt;.
&lt;/p&gt;
&lt;p&gt;
See for yourself:
&lt;/p&gt;



&lt;pre class=&quot;brush: shell&quot;&gt;getCount&amp;lt;-function(term){function(year){
  nihUrl&amp;lt;-concat(&quot;http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&amp;amp;term=&quot;,term,&quot;+&quot;,year,&quot;[pdat]&quot;)
  #cleanurl&amp;lt;-gsub(&#39;\\]&#39;,&#39;%5D&#39;,gsub(&#39;\\[&#39;,&#39;%5B&#39;,x=url))
  #http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&amp;amp;term=microarray%5btitle%5d+2003%5bpdat%5d
  xml&amp;lt;-xmlTreeParse(URLencode(nihUrl),isURL=TRUE)
  #Data Mashups in R, pg17
  as.numeric(xmlValue(xml$doc$children$eSearchResult$children$Count$children$text))
}}

years&amp;lt;-1995:2011
df&amp;lt;-data.frame(type=&quot;obs&quot;,year=years,
    mic=sapply(years,function(x){do.call(getCount(&#39;microarray[title]&#39;),list(x))}),
    ngs=sapply(years,function(x){do.call(getCount(&#39;&quot;next generation sequencing&quot;[title] OR &quot;high-throughput sequencing&quot;[title]&#39;),list(x))})
)
#papers with &quot;microarray&quot; in title
&amp;gt; df[,c(&quot;year&quot;,&quot;mic&quot;)]
   year  mic
1  1995    2
2  1996    4
3  1997    0
4  1998    7
5  1999   28
6  2000  108
7  2001  273
8  2002  553
9  2003  770
10 2004 1032
11 2005 1135
12 2006 1216
13 2007 1107
14 2008 1055
15 2009  981
16 2010  909
17 2011  897
&lt;/pre&gt;
Reading another treatise on microarray normalization in 2012 would be just tragic. Who still reads these? Who still writes these papers? Can we stop them? If not, when can we expect NGS to wipe them off the map?

&lt;br /&gt;
&lt;pre class=&quot;brush: shell&quot;&gt;
#97 is a fair start
df&lt;-subset(df,year&gt;=1997)
mdf&lt;-melt(df,id.vars=c(&quot;type&quot;,&quot;year&quot;),variable_name=&quot;citation&quot;)

c&lt;-ggplot(mdf,aes(x=year))
p&lt;-c+geom_point(aes(y=value,color=citation)) +
  ylab(&quot;papers&quot;) +
  stat_smooth(aes(y=value,color=citation),data=subset(mdf,citation==&quot;mic&quot;),method=&quot;loess&quot;) +
  scale_x_continuous(breaks=seq(from=1997,to=2011,by=2))
print(p)
&lt;/pre&gt;
Here I plot both microarray and next-generation sequencing papers (in title). We see kurtosis is working in our favor, and LOESS seems to agree!

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg92YKe9G8CaS6-w7yX0s_kQMkqxGJPXMFfRC9F_7yNtJ-1u-GYfWljbvhM4sWYyaHkk9fiFprGgQP8xJ_0UZRp3Zfnim4CcFhOgMD8ORcynBszIJOdaTIgU_zsnoyVTOqe-p2DtsCZlIc/s1600/obs.png&quot; imageanchor=&quot;1&quot; style=&quot;&quot;&gt;&lt;img border=&quot;0&quot;  src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg92YKe9G8CaS6-w7yX0s_kQMkqxGJPXMFfRC9F_7yNtJ-1u-GYfWljbvhM4sWYyaHkk9fiFprGgQP8xJ_0UZRp3Zfnim4CcFhOgMD8ORcynBszIJOdaTIgU_zsnoyVTOqe-p2DtsCZlIc/s800/obs.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;


But when will the pain end? Let us extrapolate, wildly.
&lt;pre class=&quot;brush: shell&quot;&gt;
#Return 0 for negative elements
# noNeg(c(3,2,1,0,-1,-2,2))
# [1] 3 2 1 0 0 0 2
noNeg&lt;-function(v){sapply(v,function(x){max(x,0)})}

#Return up to the first negative/zero element inclusive
# toZeroNoNeg(c(3,2,1,0,-1,-2,2))
# [1] 3 2 1 0
toZeroNoNeg&lt;-function(v){noNeg(v)[1:firstZero(noNeg(v))]}

#return index of first zero
firstZero&lt;-function(v){which(noNeg(v)==0)[1]}

#let&#39;s peer into the future
df.lo.mic&lt;-loess(mic ~ year,df,control=loess.control(surface=&quot;direct&quot;))

#when will it stop?
mic_predict&lt;-as.integer(predict(df.lo.mic,data.frame(year=2012:2020),se=FALSE))
zero_year&lt;-2011+firstZero(mic_predict)
cat(concat(&quot;LOESS projects &quot;,sum(toZeroNoNeg(mic_predict)),&quot; more microarray papers.&quot;))
cat(concat(&quot;The last damn microarray paper is projected to be in &quot;,(zero_year-1),&quot;.&quot;))

#predict ngs growth
df.lo.ngs&lt;-loess(ngs ~ year,df,control=loess.control(surface=&quot;direct&quot;))
ngs_predict&lt;-as.integer(predict(df.lo.ngs,data.frame(year=2012:zero_year),se=FALSE))

pred_df&lt;-data.frame(type=&quot;pred&quot;,year=c(2012:zero_year),mic=toZeroNoNeg(mic_predict),ngs=ngs_predict)
df2&lt;-rbind(df,pred_df)

mdf2&lt;-melt(df2,id.vars=c(&quot;type&quot;,&quot;year&quot;),variable_name=&quot;citation&quot;)

c2&lt;-ggplot(mdf2,aes(x=year))
p2&lt;-c2+geom_point(aes(y=value,color=citation,shape=type),size=3) +
    ylab(&quot;papers&quot;) +
    scale_y_continuous(breaks=seq(from=0,to=1600,by=200))+
    scale_x_continuous(breaks=seq(from=1997,to=zero_year,by=2))
print(p2)
&lt;/pre&gt;


&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7-7kD6X4ZSpc0QDS2HR50W9iRh1Ey_WIThuLA-9Rk5RBM9AXHnpMsuequdzbSU7iY3eKkUBXkAOX0Br7b3_gZy8gko1Fpj484oUjp1tR1VZhEnDVue7TK5LBfxSpur2nMGsMUnyUv2cA/s1600/pred.png&quot; imageanchor=&quot;1&quot; style=&quot;&quot;&gt;&lt;img border=&quot;0&quot;  src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7-7kD6X4ZSpc0QDS2HR50W9iRh1Ey_WIThuLA-9Rk5RBM9AXHnpMsuequdzbSU7iY3eKkUBXkAOX0Br7b3_gZy8gko1Fpj484oUjp1tR1VZhEnDVue7TK5LBfxSpur2nMGsMUnyUv2cA/s800/pred.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;



&lt;p&gt;LOESS projects 2038 more microarray papers.&lt;br/&gt;
The last damn microarray paper is projected to be published in 2016.
&lt;/p&gt;
&lt;p&gt;
Yeah, right...
&lt;/p&gt;

Full R code here: &lt;a href=&quot;https://gist.github.com/1637248&quot;&gt;https://gist.github.com/1637248&lt;/a&gt;

&lt;script src=&quot;https://gist.github.com/leipzig/1637248.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://jermdemo.blogspot.com/feeds/8185076191620100624/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jermdemo.blogspot.com/2012/01/when-can-we-expect-last-damn-microarray.html#comment-form' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/8185076191620100624'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/8185076191620100624'/><link rel='alternate' type='text/html' href='http://jermdemo.blogspot.com/2012/01/when-can-we-expect-last-damn-microarray.html' title='When can we expect the last damn microarray paper?'/><author><name>Jermdemo</name><uri>http://www.blogger.com/profile/01662705354227625640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg92YKe9G8CaS6-w7yX0s_kQMkqxGJPXMFfRC9F_7yNtJ-1u-GYfWljbvhM4sWYyaHkk9fiFprGgQP8xJ_0UZRp3Zfnim4CcFhOgMD8ORcynBszIJOdaTIgU_zsnoyVTOqe-p2DtsCZlIc/s72-c/obs.png" height="72" width="72"/><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8532065960756482590.post-8951008304523784002</id><published>2011-06-23T17:14:00.000-04:00</published><updated>2011-06-24T10:07:55.055-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="hardware"/><category scheme="http://www.blogger.com/atom/ns#" term="NGS"/><title type='text'>Big-Ass Servers™ and the myths of clusters in bioinformatics</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;Spending $55k for a 512GB machine (Big-Ass Server™ or BAS™) can be a tough sell for a bioinformatics researcher to pitch to a department head.&lt;br /&gt;
&lt;br /&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float: right; margin-left: 1em; text-align: right;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://i.dell.com/images/global/products/pedge/pedge_highlights/server-poweredge-r900-overview2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://i.dell.com/images/global/products/pedge/pedge_highlights/server-poweredge-r900-overview2.jpg&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Dell PowerEdge r900, available in orange and lemon-lime&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;Speaking as someone who keeps his copy of &lt;a href=&quot;http://en.wikipedia.org/wiki/Introduction_to_Algorithms&quot;&gt;CLR&lt;/a&gt; safely stored in the basement, ready to help rebuild society after a nuclear holocaust, I am painfully aware of the importance of algorithm development in the history of computing, and the possibilities for parallel computing to make problems tractable.&lt;br /&gt;
&lt;br /&gt;
Having recently spent 3 years in industry, however, I am now more inclined to just throw money at problems. In the case of hardware, I think this approach is more effective than clever programming for many of the current problems posed by NGS.&lt;br /&gt;
&lt;br /&gt;
From an economic and productivity perspective, I believe most bioinformatics shops doing basic research would benefit more from having access to a BAS™ than a cluster. Here&#39;s why:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;The development of multicore/multiprocessor machines and memory capacity has outpaced the speed of networks. NGS analyses tends to be more &lt;a href=&quot;http://en.wikipedia.org/wiki/Memory_bound_function&quot;&gt;memory-bound&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/I/O_bound&quot;&gt;IO-bound&lt;/a&gt; rather than &lt;a href=&quot;http://en.wikipedia.org/wiki/CPU_bound&quot;&gt;CPU-bound&lt;/a&gt;, so relying on a cluster of smaller machines can quickly overwhelm a network.&lt;/li&gt;
&lt;li&gt;NGS has forced the number of high-performance applications from BLAST and protein structure prediction to doing dozens of different little analyses, with tools that change on a monthly basis, or are homegrown to deal with special circumstances. There isn&#39;t time or ability to write each of these for parallel architectures.&lt;/li&gt;
&lt;/ul&gt;If those don&#39;t sound very convincing, here is my layman&#39;s guide to dealing with the myths you might encounter concerning NGS and clusters:&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Myth: Google uses server farms. We should too.&lt;/h3&gt;&lt;br /&gt;
Google has to focus on doing one thing very well: search.&lt;br /&gt;
&lt;br /&gt;
Bioinformatics programmers have to explore a number of different questions for any given experiment. There is not time to develop a parallel solution to many of these questions as they will lead to dead ends.&lt;br /&gt;
&lt;br /&gt;
Many bioinformatic problems, de-novo assembly being a prime example, are notoriously difficult to divide among several machines without being overwhelmed with messaging. You can imagine trying to divide a jigsaw puzzle among friends sitting several tables, you would spend more time talking about the pieces than fitting them together.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Myth: Our development setup should mimic our production setup&lt;/h3&gt;&lt;br /&gt;
An experimental computing structure with a BAS™ allows for researchers to freely explore big data without having to think about how to divide it efficiently. If an experiment is successful and there is the need to scale-up to a clinical or industrial platform, that can happen later.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Myth: Clusters have been around a long time so there is a lot of shell-based infrastructure to distribute workflows&lt;/h3&gt;&lt;br /&gt;
There are tools for queueing jobs, but those are often quite helpless to assist in managing workflows that are written as parallel and serial steps - for example, waiting for steps to finish before merging results.&lt;br /&gt;
&lt;br /&gt;
Various programming languages have features to take advantage of clusters. For example, R has &lt;a href=&quot;http://cran.r-project.org/web/packages/snow/index.html&quot;&gt;SNOW&lt;/a&gt;. But Rsamtools requires you to load BAM files into memory, so a BAS™ is not just preferable for NGS analysis with R, it&#39;s required.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Myth: The rise of cloud computing and Hadoop means that homegrown clusters are irrelevant that but also means we don&#39;t need a BAS™&lt;/h3&gt;&lt;br /&gt;
The popularity of cloud computing in bioinformatics is also driven by the newfound ability to rent time on a BAS™. The main problem with cloud computing is the bottleneck posed by transferring GBs data to the cloud.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Myth: Crossbow and Myrna are based on Hadoop, we can develop similar tools&lt;/h3&gt;&lt;br /&gt;
Ben Langmead, Cole Trapnell, and Michael Schatz, alums of Steven Salzberg&#39;s group at UMD, have developed NGS solutions using the Hadoop MapReduce framework.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Crossbow is a Hadoop-based implementation of Bowtie. &lt;/li&gt;
&lt;li&gt;Myrna is an RNA-Seq pipeline. &lt;/li&gt;
&lt;li&gt;Contrail is a de novo short read assembler. &lt;/li&gt;
&lt;/ul&gt;These are difficult programs to develop, and these examples are also somewhat limited experimental proofs of concept or are married to components that may be undesirable for certain analyses. The Bowtie stack (Bowtie, Tophat, Cufflinks), while revolutionary in its implementation of Burroughs-Wheeler algorithm, is itself is built around the limitations of computers in the year 2008. For many it lacks the sensitivity to deal with, for example, 1000 Genomes data.&lt;br /&gt;
&lt;br /&gt;
The dynamic scripting languages used most bioinformatics programmers are not as well suited to Hadoop as Java. To imply we can all develop similar tools of this sophistication is unrealistic. Many bioinformatics programs are not even &lt;i&gt;threaded&lt;/i&gt;, much less designed to work amongst several machines.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Myth: &lt;a href=&quot;http://en.wikipedia.org/wiki/Embarrassingly_parallel&quot;&gt;embarrassingly parallel&lt;/a&gt; problems imply a cluster is needed&lt;/h3&gt;&lt;h3&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;A server with 4 quad-core processors is often adequate for handling these embarrassing problems. Dividing the work just tends to lead to further embarrassments.&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;&lt;h3&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt;Here is a particularly telling &lt;a href=&quot;http://biostar.stackexchange.com/questions/2657/scalemp-vsmp-or-physical-ram&quot;&gt;quote&lt;/a&gt; from Biohaskell developer Ketil Malde on Biostar:&lt;br /&gt;
&lt;blockquote&gt;In general, I think HPC are doing the wrong thing for bioinformatics. It&#39;s okay to spend six weeks to rewrite your meteorology program to take advantage of the latest supercomputer (all of which tend to be just a huge stack of small PCs these days) if the program is going to run continously for the next three years. It is not okay to spend six weeks on a script that&#39;s going to run for a couple of days.&lt;br /&gt;
&lt;br /&gt;
In short, I keep asking for a big PC with a bunch of the latest Intel or AMD core, and as much RAM as we can afford. &lt;/blockquote&gt;&lt;br /&gt;
&lt;h3&gt;Myth: We don&#39;t have money for a BAS™ because we need a new cluster to handle things like BLAST&lt;/h3&gt;&lt;br /&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float: left; margin-right: 1em; text-align: left;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://farm3.static.flickr.com/2758/4400143436_50bcd3843a.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;215&quot; src=&quot;http://farm3.static.flickr.com/2758/4400143436_50bcd3843a.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;IBM System x3850 X5 expandable to 1536GB, mouse not included&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;Even  the BLAST setup we think of as being the essence of parallel (a  segmented genome index - every node gets a part of the genome) is often  not the one that many institutions have settled on. Many rely on farming  out queries to a cluster in which every node has the full genome index  in memory.&lt;br /&gt;
&lt;br /&gt;
Secondly, the mpiBLAST appears to be more  suited to dividing an index among older machines than today&#39;s, which typically have &amp;gt;32GB RAM. Here is a telling FAQ entry: &lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;I benchmarked mpiBLAST but I don&#39;t see super-linear speedup! Why?!&lt;br /&gt;
&lt;br /&gt;
mpiBLAST  only yields super-linear speedup when the database being searched is  significantly larger than the core memory on an individual node. The  super-linear speedup results published in the ClusterWorld 2003 paper  describing mpiBLAST are measurements of mpiBLAST v0.9 searching a 1.2GB  (compressed) database on a cluster where each node has 640MB of RAM. A  single node search results in heavy disk I/O and a long search time.&lt;br /&gt;
&lt;a href=&quot;http://www.mpiblast.org/Docs/FAQ#super-linear&quot;&gt;http://www.mpiblast.org/Docs/FAQ#super-linear&lt;/a&gt;&lt;/blockquote&gt;&lt;br /&gt;
Your comments on this topic are welcome!</content><link rel='replies' type='application/atom+xml' href='http://jermdemo.blogspot.com/feeds/8951008304523784002/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jermdemo.blogspot.com/2011/06/big-ass-servers-and-myths-of-clusters.html#comment-form' title='17 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/8951008304523784002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/8951008304523784002'/><link rel='alternate' type='text/html' href='http://jermdemo.blogspot.com/2011/06/big-ass-servers-and-myths-of-clusters.html' title='Big-Ass Servers™ and the myths of clusters in bioinformatics'/><author><name>Jermdemo</name><uri>http://www.blogger.com/profile/01662705354227625640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://farm3.static.flickr.com/2758/4400143436_50bcd3843a_t.jpg" height="72" width="72"/><thr:total>17</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8532065960756482590.post-4715969279352296289</id><published>2010-12-23T15:42:00.000-05:00</published><updated>2010-12-29T16:24:12.858-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BioConductor"/><category scheme="http://www.blogger.com/atom/ns#" term="BSgenome"/><category scheme="http://www.blogger.com/atom/ns#" term="R"/><title type='text'>Chromosome bias in R, my notebook</title><content type='html'>My goal is to develop a means of detecting chromosome bias from a human BAM file.&lt;br /&gt;
&lt;br /&gt;
Because I&#39;ve been working with proprietary and novel plant genomes for the last three years, I haven&#39;t had the chance to use any of the awesome UCSC-based annotational features that have been introduced and refined in Bioconductor until now. I&#39;ve returned to biomedical research and I have some catching up to do.&lt;br /&gt;
&lt;br /&gt;
BSgenome might sound like horsecrap, but each &lt;b&gt;B&lt;/b&gt;io&lt;b&gt;s&lt;/b&gt;trings-based &lt;b&gt;genome&lt;/b&gt; data package is actually a huge digested version of a UCSC/NCBI genome freeze and basic sequence annotation compiled into R objects.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.bioconductor.org/help/bioc-views/release/bioc/html/BSgenome.html&quot;&gt;BSgenome at Bioconductor&lt;/a&gt;&lt;br /&gt;
&lt;blockquote&gt;Be careful with googling bioconductor help - often the results point to older versions. Make sure your link has &quot;release&quot; in the url.&lt;/blockquote&gt;&lt;br /&gt;
Here are the BSgenomes available today:&lt;br /&gt;
&lt;pre class=&quot;brush: shell&quot;&gt;&amp;gt; available.genomes(type=getOption(&quot;pkgType&quot;))
BioC_mirror = http://www.bioconductor.org
Change using chooseBioCmirror().
 [1] &quot;BSgenome.Amellifera.BeeBase.assembly4&quot; &quot;BSgenome.Amellifera.UCSC.apiMel2&quot;     
 [3] &quot;BSgenome.Athaliana.TAIR.01222004&quot;      &quot;BSgenome.Athaliana.TAIR.04232008&quot;     
 [5] &quot;BSgenome.Btaurus.UCSC.bosTau3&quot;         &quot;BSgenome.Btaurus.UCSC.bosTau4&quot;        
 [7] &quot;BSgenome.Celegans.UCSC.ce2&quot;            &quot;BSgenome.Celegans.UCSC.ce6&quot;           
 [9] &quot;BSgenome.Cfamiliaris.UCSC.canFam2&quot;     &quot;BSgenome.Dmelanogaster.UCSC.dm2&quot;      
[11] &quot;BSgenome.Dmelanogaster.UCSC.dm3&quot;       &quot;BSgenome.Drerio.UCSC.danRer5&quot;         
[13] &quot;BSgenome.Drerio.UCSC.danRer6&quot;          &quot;BSgenome.Ecoli.NCBI.20080805&quot;         
[15] &quot;BSgenome.Ggallus.UCSC.galGal3&quot;         &quot;BSgenome.Hsapiens.UCSC.hg17&quot;          
[17] &quot;BSgenome.Hsapiens.UCSC.hg18&quot;           &quot;BSgenome.Hsapiens.UCSC.hg19&quot;          
[19] &quot;BSgenome.Mmusculus.UCSC.mm8&quot;           &quot;BSgenome.Mmusculus.UCSC.mm9&quot;          
[21] &quot;BSgenome.Ptroglodytes.UCSC.panTro2&quot;    &quot;BSgenome.Rnorvegicus.UCSC.rn4&quot;        
[23] &quot;BSgenome.Scerevisiae.UCSC.sacCer1&quot;     &quot;BSgenome.Scerevisiae.UCSC.sacCer2&quot;    
&lt;/pre&gt;Select and load hg19&lt;br /&gt;
&lt;pre class=&quot;brush: shell&quot;&gt;biocLite(&quot;BSgenome.Hsapiens.UCSC.hg19&quot;)
library(&quot;BSgenome.Hsapiens.UCSC.hg19&quot;)
&lt;/pre&gt;&lt;br /&gt;
When we get an alignment file one of the first things we want to do is look for red flags that might indicate something went awry in the lab or downstream. An example is chromosome bias - are we seeing more reads aligned to certain chromosomes than would be expected on size alone? A sticky question, since any experiment will introduce confounds based on the inherent uneven distribution of interesting genomic features, not to mention mapability. And yet I think this is still a worthwhile exercise and should be part of any ngs sequencing pipeline.&lt;br /&gt;
&lt;br /&gt;
What we don&#39;t want to do is ignore that 7.6% of the GRCh37 freeze is sequence that looks like &quot;NNNNNNN&quot; - gaps representing unsequencable regions such as centromeres, scaffold gap delinations, and the like. We especially don&#39;t want to ignore gaps because they are not evenly distributed across the chromosomes (chrY is 56% gaps).&lt;br /&gt;
&lt;br /&gt;
Raw chromosome length can be obtained from the BAM file header, but for this chromosome bias analysis I need the &quot;non-gappy&quot; length, the portion eligible for alignment. This is one of the &quot;masks&quot; turned on by default for BSgenomes in order to allow various functions to work properly (see MaskCollection in the &lt;a href=&quot;http://www.bioconductor.org/help/bioc-views/release/bioc/html/IRanges.html&quot;&gt;IRanges&lt;/a&gt; package for more information).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: shell&quot;&gt;&amp;gt; masks(Hsapiens)
Error in function (classes, fdef, mtable)  : 
  unable to find an inherited method for function masks, for signature &quot;BSgenome&quot;
#oops I see masks are a member of MaskedDNAString objects (i.e. chromosomes) not BSgenome objects
&amp;gt; masks(Hsapiens$chrY)
MaskCollection of length 4 and width 59373566
masks:
  maskedwidth maskedratio active names                               desc
1    33720000 0.567929506   TRUE AGAPS                      assembly gaps
2           0 0.000000000   TRUE   AMB   intra-contig ambiguities (empty)
3    16024357 0.269890426  FALSE    RM                       RepeatMasker
4      587815 0.009900281  FALSE   TRF Tandem Repeats Finder [period&amp;lt;=12]
all masks together:
  maskedwidth maskedratio
     49783032   0.8384713
all active masks together:
  maskedwidth maskedratio
     33720000   0.5679295
#I think the maskedwidth should reveal sum of actively masked nucleotides
&amp;gt; maskedwidth(Hsapiens$chrY)
[1] 33720000
#can we mess with the masks?
&amp;gt; active(masks(Hsapiens$chrY))[&quot;RM&quot;]&amp;lt;-TRUE
Error in `$&amp;lt;-`(`*tmp*`, &quot;chrY&quot;, value = &amp;lt; S4 object of class &quot;MaskedDNAString&quot;&amp;gt;) : 
  no method for assigning subsets of this S4 class
#oops I can&#39;t manipulate a BSgenome this way - it is behaving like a class instead of an instance of a class
&amp;gt; chrY&amp;lt;-Hsapiens$chrY
&amp;gt; active(masks(chrY))[&quot;RM&quot;]&amp;lt;-TRUE
&amp;gt; maskedwidth(chrY)
[1] 49744357
# ok maskedwidth is working as I figured, but i need unmasked width
&amp;gt; unmaskedWidth&amp;lt;-function(chr){length(chr)-maskedwidth(chr)}
&amp;gt; unmaskedWidth(Hsapiens$chrY)
[1] 25653566
#how can I iterate over something with a $ operator? let&#39;s try [[]]
&amp;gt; unmaskedWidth(Hsapiens[[&quot;chrY&quot;]])
[1] 25653566
&lt;/pre&gt;Now I want to create a data frame of with sequence names and unmaskedWidths to go with some read counts from a BAM file. Whenever I want to go from a list, through a function, to a data frame I think &lt;a href=&quot;http://had.co.nz/plyr/&quot;&gt;plyr&lt;/a&gt;, specifically ldply (&lt;b&gt;l&lt;/b&gt;ist to &lt;b&gt;d&lt;/b&gt;ata frame).&lt;br /&gt;
&lt;pre class=&quot;brush: shell&quot;&gt;# let&#39;s take chr 1-22,X,Y, skipping the unscaffolded sequences and mitochondrial chr
&amp;gt; maskedSizes&amp;lt;-ldply(.data=seqnames(Hsapiens)[1:24],
  .fun=function(x){
    data.frame(chr=x,seqlength=length(Hsapiens[[x]]),
    unmaskedWidth=unmaskedWidth(Hsapiens[[x]]))},
  .progress=&quot;text&quot;,
  .parallel=TRUE)
&amp;gt; maskedSizes
                     chr seqlength unmaskedWidth
1                   chr1 249250621     225280621
2                   chr2 243199373     238204518
3                   chr3 198022430     194797135
4                   chr4 191154276     187661676
5                   chr5 180915260     177695260
6                   chr6 171115067     167395066
7                   chr7 159138663     155353663
8                   chr8 146364022     142888922
9                   chr9 141213431     120143431
10                 chr10 135534747     131314738
11                 chr11 135006516     131129516
12                 chr12 133851895     130481393
13                 chr13 115169878      95589878
14                 chr14 107349540      88289540
15                 chr15 102531392      81694766
16                 chr16  90354753      78884753
17                 chr17  81195210      77795210
18                 chr18  78077248      74657229
19                 chr19  59128983      55808983
20                 chr20  63025520      59505520
21                 chr21  48129895      35106642
22                 chr22  51304566      34894545
23                  chrX 155270560     151100560
24                  chrY  59373566      25653566
&lt;/pre&gt;&lt;br /&gt;
Load the BAM file and get read counts in a data frame.&lt;br /&gt;
&lt;pre class=&quot;brush: shell&quot;&gt;#other methods include scanBam and readAligned
bamFile&amp;lt;-readBamGappedAlignments(&quot;myIndexedSortedBamFile.bam&quot;)
&amp;gt; levels(rname(bamFile))
 [1] &quot;1&quot;          &quot;2&quot;          &quot;3&quot;          &quot;4&quot;          &quot;5&quot;         
 [6] &quot;6&quot;          &quot;7&quot;          &quot;8&quot;          &quot;9&quot;          &quot;10&quot;        
[11] &quot;11&quot;         &quot;12&quot;         &quot;13&quot;         &quot;14&quot;         &quot;15&quot;        
[16] &quot;16&quot;         &quot;17&quot;         &quot;18&quot;         &quot;19&quot;         &quot;20&quot;        
[21] &quot;21&quot;         &quot;22&quot;         &quot;X&quot;          &quot;Y&quot;          &quot;MT&quot;        
[26] &quot;GL000207.1&quot; &quot;GL000226.1&quot; &quot;GL000229.1&quot; &quot;GL000231.1&quot; &quot;GL000210.1&quot;
[31] &quot;GL000239.1&quot; &quot;GL000235.1&quot; &quot;GL000201.1&quot; &quot;GL000247.1&quot; &quot;GL000245.1&quot;
[36] &quot;GL000197.1&quot; &quot;GL000203.1&quot; &quot;GL000246.1&quot; &quot;GL000249.1&quot; &quot;GL000196.1&quot;
[41] &quot;GL000248.1&quot; &quot;GL000244.1&quot; &quot;GL000238.1&quot; &quot;GL000202.1&quot; &quot;GL000234.1&quot;
[46] &quot;GL000232.1&quot; &quot;GL000206.1&quot; &quot;GL000240.1&quot; &quot;GL000236.1&quot; &quot;GL000241.1&quot;
[51] &quot;GL000243.1&quot; &quot;GL000242.1&quot; &quot;GL000230.1&quot; &quot;GL000237.1&quot; &quot;GL000233.1&quot;
[56] &quot;GL000204.1&quot; &quot;GL000198.1&quot; &quot;GL000208.1&quot; &quot;GL000191.1&quot; &quot;GL000227.1&quot;
[61] &quot;GL000228.1&quot; &quot;GL000214.1&quot; &quot;GL000221.1&quot; &quot;GL000209.1&quot; &quot;GL000218.1&quot;
[66] &quot;GL000220.1&quot; &quot;GL000213.1&quot; &quot;GL000211.1&quot; &quot;GL000199.1&quot; &quot;GL000217.1&quot;
[71] &quot;GL000216.1&quot; &quot;GL000215.1&quot; &quot;GL000205.1&quot; &quot;GL000219.1&quot; &quot;GL000224.1&quot;
[76] &quot;GL000223.1&quot; &quot;GL000195.1&quot; &quot;GL000212.1&quot; &quot;GL000222.1&quot; &quot;GL000200.1&quot;
[81] &quot;GL000193.1&quot; &quot;GL000194.1&quot; &quot;GL000225.1&quot; &quot;GL000192.1&quot;
#the deflines in my reference do not match the BSgenome names, must fix at least the chromosomes of interest
levels(rname(bamFile))[1:25]&amp;lt;-paste(&#39;chr&#39;,c(1:22,&#39;X&#39;,&#39;Y&#39;,&#39;M&#39;),sep=&#39;&#39;)

#run length encoded read counts per chromosome
readRle&amp;lt;-rname(bamFile)

#get a data frame with chromosome and read counts
allReadsDf&amp;lt;-ldply(runValue(readRle),function(x){data.frame(chr=levels(runValue(readRle))[x],reads=runLength(readRle)[x])})
&amp;gt; head(allReadsDf)
   chr   reads
1 chr1 3616909
2 chr2 3642052
3 chr3 2843019
4 chr4 2636141
5 chr5 2590352
6 chr6 2497123
&lt;/pre&gt;&lt;br /&gt;
Merge the read counts with unmasked chromosome lengths and plot their relationship.&lt;br /&gt;
&lt;pre class=&quot;brush: shell&quot;&gt;chrSizesReads&amp;lt;-merge(maskedSizes,readCounts,sort=FALSE)
library(ggplot2)
p&amp;lt;-ggplot(data=chrSizesReads, aes(x=unmaskedWidth, y=reads, label=chr)) + 
  geom_point() +
  geom_text(vjust=2,size=3) +
  stat_smooth(method=&quot;lm&quot;, se=TRUE,level=0.95) +
  ylab(&quot;Reads aligned&quot;) +
  xlab(&quot;Unmasked chromosome size&quot;) +
  opts(title = &quot;Reads vs Chromosome Size&quot;)
print(p)
&lt;/pre&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikQqdIJXvfhCF-jd6Vzvk1PU-sbv0z0I_7k48As_jx01w9btTvEFh2JzULCIaNZhnz41pyFr3ZsnCqowzKQiI-5RF_LJusPunbursRPN5ivugxHdZ-c7tTieQkl1Sw_ftXVKwicyg1Es0/s1600/readChr.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;305&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikQqdIJXvfhCF-jd6Vzvk1PU-sbv0z0I_7k48As_jx01w9btTvEFh2JzULCIaNZhnz41pyFr3ZsnCqowzKQiI-5RF_LJusPunbursRPN5ivugxHdZ-c7tTieQkl1Sw_ftXVKwicyg1Es0/s320/readChr.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;There should be a strong linear relationship between read count and chromosome size. We can test this using a linear regression model, the null hypothesis being the number of reads aligned to a chromosome is independent of its size.  &lt;br /&gt;
&lt;pre class=&quot;brush: shell&quot;&gt;&amp;gt; mylm&amp;lt;-lm(reads~unmaskedWidth,data=chrSizesReads)
&amp;gt; mysummary&amp;lt;-summary(mylm)
&amp;gt; mysummary

Call:
lm(formula = reads ~ unmaskedWidth, data = chrSizesReads)

Residuals:
    Min      1Q  Median      3Q     Max 
-271816 -108122  -43984   42826  676284 

Coefficients:
               Estimate Std. Error t value Pr(&amp;gt;|t|)    
(Intercept)   1.774e+05  9.505e+04   1.866   0.0754 .  
unmaskedWidth 1.455e-02  7.145e-04  20.365 9.12e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 

Residual standard error: 206600 on 22 degrees of freedom
Multiple R-squared: 0.9496, Adjusted R-squared: 0.9473 
F-statistic: 414.8 on 1 and 22 DF,  p-value: 9.123e-16 
&lt;/pre&gt;The low p-value (that chr size has no influence) and R-squared (predictive value of the linear model) suggest this model is sound.&lt;br /&gt;
&lt;br /&gt;
The following plot is obtained from the standardized residuals (the standardized difference between data observed and values expected) of the linear model described earlier.&lt;br /&gt;
&lt;br /&gt;
Chromosome bias refers to uneven read alignment distribution across various chromosomes. We can expect some chromosome bias in treatment sets because of the inherient nature any experimental conditions - recovered fragments will not be evenly distributed among chromosomes because regions of affect are not evenly distributed. Other possible factors of chromosome bias include heterochromatin, uneven repeat content, and the potential for aligning the against an incorrect set of sex chromsomes. Aligners will typically randomly, evenly, assign discrete positions to reads which map ambiguously to multiple locations. &lt;br /&gt;
&lt;pre class=&quot;brush: shell&quot;&gt;&amp;gt; p&amp;lt;-qplot(chrSizesReads$chr,rstandard(mylm))+
   aes(label=chrSizesReads$chr)+
   geom_text(vjust=2,size=3)+
   xlab(&quot;Chromosome&quot;)+
   ylab(&quot;Std Residual from lm (reads)&quot;)+
   geom_abline(slope=0,intercept=0)+
   opts(axis.text.x = theme_text(angle=45,hjust=1))+
   opts(title = &quot;Linear Regression Residuals&quot;)
&amp;gt; print(p)
&lt;/pre&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY5Ut4RdeF93ArZHwavk_IBp0O1REonnKgMX9KimOWTJPVtv1YIi1YjCcxaG3_BIhfhBWrA5QaV6MHqJLQ-LDiUf3CsphBnvXJJTFGs6Pc2qY3GeLdq8aJyY3BRyUQnKYQXhXgVbQymZY/s1600/resid.png&quot; imageanchor=&quot;1&quot; style=&quot;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; width=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY5Ut4RdeF93ArZHwavk_IBp0O1REonnKgMX9KimOWTJPVtv1YIi1YjCcxaG3_BIhfhBWrA5QaV6MHqJLQ-LDiUf3CsphBnvXJJTFGs6Pc2qY3GeLdq8aJyY3BRyUQnKYQXhXgVbQymZY/s320/resid.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Fortunately, there is no clear pattern to these residual values, which would indicate some model problems, but with a Z-score of 3.36, chrX appears to be an outlier. With 46M total alignments this is certainly not due to sampling error, but we can still test our observation with a Lund statistic. &lt;br /&gt;
&lt;pre class=&quot;brush: shell&quot;&gt;#http://stackoverflow.com/questions/1444306/how-to-use-outlier-tests-in-r-code
&amp;gt;lundcrit&amp;lt;-function(a, n, q) {
 F&amp;lt;-qf(c(1-(a/n)),df1=1,df2=n-q-1,lower.tail=TRUE)
 crit&amp;lt;-((n-q)*F/(n-q-1+F))^0.5
 crit
}
&amp;gt; n&amp;lt;-nrow(chrSizesReads)
&amp;gt; q&amp;lt;-length(mylm$coefficients)
&amp;gt; crit&amp;lt;-lundcrit(0.05,n,q)
&amp;gt; chrSizesReads[which(rstandard(mylm)&amp;gt;crit),&quot;chr&quot;]
[1] chrX
&lt;/pre&gt;&lt;br /&gt;
Happy holidays!</content><link rel='replies' type='application/atom+xml' href='http://jermdemo.blogspot.com/feeds/4715969279352296289/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jermdemo.blogspot.com/2010/12/chromosome-bias-in-r-my-notebook.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/4715969279352296289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/4715969279352296289'/><link rel='alternate' type='text/html' href='http://jermdemo.blogspot.com/2010/12/chromosome-bias-in-r-my-notebook.html' title='Chromosome bias in R, my notebook'/><author><name>Jermdemo</name><uri>http://www.blogger.com/profile/01662705354227625640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikQqdIJXvfhCF-jd6Vzvk1PU-sbv0z0I_7k48As_jx01w9btTvEFh2JzULCIaNZhnz41pyFr3ZsnCqowzKQiI-5RF_LJusPunbursRPN5ivugxHdZ-c7tTieQkl1Sw_ftXVKwicyg1Es0/s72-c/readChr.png" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8532065960756482590.post-3210463591938969866</id><published>2010-12-09T17:41:00.000-05:00</published><updated>2012-01-20T22:56:37.301-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bash history"/><category scheme="http://www.blogger.com/atom/ns#" term="histfile"/><title type='text'>Directory-based bash histories</title><content type='html'>Using a directory-based bash history allows for a record of shell actions on a directory basis, so a group of developers have some record of what was done while in a directory, when, and by whom. This can be helpful when trying to reconstruct history with limited documentation.&lt;br /&gt;
&lt;br /&gt;
I know this setup will be of some benefit to my successor at my previous job because he has access to everything I ever did in any project directory.&lt;br /&gt;
&lt;br /&gt;
Place this code in your ~/.bash_profile or ~/.bashrc&lt;br /&gt;
&lt;br /&gt;
(type source ~/.bash_profile (or .bashrc) to load this for your current session)&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/1651133.js&quot;&gt; &lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://jermdemo.blogspot.com/feeds/3210463591938969866/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jermdemo.blogspot.com/2010/12/directory-based-bash-histories.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/3210463591938969866'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/3210463591938969866'/><link rel='alternate' type='text/html' href='http://jermdemo.blogspot.com/2010/12/directory-based-bash-histories.html' title='Directory-based bash histories'/><author><name>Jermdemo</name><uri>http://www.blogger.com/profile/01662705354227625640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8532065960756482590.post-938423623754390009</id><published>2010-08-30T14:12:00.000-04:00</published><updated>2010-08-31T13:50:03.872-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="NGS"/><category scheme="http://www.blogger.com/atom/ns#" term="Samtools"/><title type='text'>NGS viewers reviewed</title><content type='html'>I gathered up some of the recent &lt;i&gt;free&lt;/i&gt; next generation sequence viewers that were capabale of viewing BAM files - and put each through the motions with a few BAM files and reference sequences of various sizes. While there are some great ideas and several choices to be found along the feature spectrum, I think we are still in the dark ages with this stuff. No viewer has really been able to entirely combine usability with performance and analysis capabilities, let alone extensibility and web connectivity.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://picasaweb.google.com/lh/photo/oeGoMtCA47G7fFzw89a96Q?feat=embedwebsite&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1xWQ4IANBnIx5d7Y5d7IU_a30v87JOEE7z3bY4goSBzEbAzsAMMsiph7ZL-HSRNH4eV7moQk72GefMHtpJ3RuSae_kIL9oLCxqkGa4E-AFzWrHoRVQCq0HyG-sDsPAaBd9k6Vp3VUIq8/s288/tview.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;a href=&quot;http://samtools.sourceforge.net/&quot;&gt;tview&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;My take:&lt;/b&gt; tview is the barebones, text-rendered viewer that is included with Samtools. People who favor this as their BAM viewer probably think Vim is too polished. Even the very limited navigation is remarkably unituitive (goto a coordinate requires chr:position even if you have just one chromosome, no errors are displayed if you forget chr).&lt;br /&gt;
&lt;b&gt;Most resembles which video game: &lt;/b&gt;Oregon Trail&lt;br /&gt;
&lt;b&gt;Good standout feature:&lt;/b&gt; command line access&lt;br /&gt;
&lt;b&gt;Bad feature:&lt;/b&gt; text display&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://picasaweb.google.com/lh/photo/WexFGlirQLnEUmeBpTZ4CQ?feat=embedwebsite&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJoWzwdcQ3BSEBd4s4NahXR6sph23Jjh-MfRNMoHukEHh_NuiNPKGIXWbWYcKMa1L0eTtfdG61SB99Vi0Diw4plOSDD3PgoKJN7benL8b31gPX1PIRcLZmGfscxCWZ9r0HN9LKlE6IfI4/s288/bamview.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;a href=&quot;http://bamview.sourceforge.net/&quot;&gt;BamView&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;My take:&lt;/b&gt; Bamview is a wicked fast simple BAM file viewer. It doesn&#39;t have much in the way of features, but for cursory examination of BAM files it is more palatable than tview.&lt;br /&gt;
&lt;b&gt;Most resembles which video game: &lt;/b&gt;Burgertime&lt;br /&gt;
&lt;b&gt;Good standout feature:&lt;/b&gt; strand split screen&lt;br /&gt;
&lt;b&gt;Bad feature:&lt;/b&gt; drag selecting a region turns it red, and umm... that&#39;s all it does&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://picasaweb.google.com/lh/photo/gey5Qp6K7mT-ZErxkbN3IA?feat=embedwebsite&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0IASkgTwD5wLovhSd2AdQdakYAn_z2AQOq36V4AsBwS4ZNeZmZkvxNzbtPGcRffB_GZtg0FLdChv7nM-yV83vlAG4ngiVupRdnHVzVArDwyeULz46GsSuicmmUsRh4KlEwWDI-7e2xr0/s288/genoviewer-2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;a href=&quot;http://www.genoviewer.com/&quot;&gt;GenoViewer&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;My take:&lt;/b&gt; The only NGS viewer endorsed by &lt;a href=&quot;http://www.youtube.com/watch?v=--Vaz9jW054&quot;&gt;Speak&lt;/a&gt; the Hungarian rapper, unfortunately this recent entrant leaves a lot to be desired in terms of performance with large files. GenoViewer is very hard on the eyes - the indiscriminate use of primary colors looks like a kid somehow vomited up the ball pit at Chuck E. Cheese.&lt;br /&gt;
&lt;b&gt;Most resembles which video game: &lt;/b&gt;Centipede&lt;br /&gt;
&lt;b&gt;Good standout feature:&lt;/b&gt; promises that &quot;You will not get lost in the details, and can easily figure out the true meaning behind the data. Guaranteed.&quot;&lt;br /&gt;
&lt;b&gt;Bad feature:&lt;/b&gt; graphics&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://picasaweb.google.com/lh/photo/TqnwOx1tMnM8vcYS7_lHSg?feat=embedwebsite&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzBgPZVOPgeJE7ghvuQBZ4cURNNtKpYwGzQmbswsBr5McmRkXmXVWpIMpq6Uu6AK-7A0uu-_FtON60KAULhPAk3HhlN6SND50xyhAvCLO9rYPRf6AfNauv53uPYSYZruEDTtQ9gi84huE/s288/magicviewer.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;a href=&quot;http://bioinformatics.zj.cn/magicviewer/&quot;&gt;MagicViewer&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;My take:&lt;/b&gt; MagicViewer has come a long way since its initial release last December. With its interesting pie-chart icon renderings of SNP purity, decent treatment of annotation tracks, and improved performance, MagicViewer might soon be a contender to Tablet in the midweight category. The navigation is workable but takes some getting used to - it&#39;s unclear when to use scroll bars vs. arrows&lt;br /&gt;
&lt;b&gt;Most resembles which video game: &lt;/b&gt;Moon Patrol&lt;br /&gt;
&lt;b&gt;Good standout feature:&lt;/b&gt; primer design tool&lt;br /&gt;
&lt;b&gt;Bad feature:&lt;/b&gt; some regions are simply not visible - no reference, no reads&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://picasaweb.google.com/lh/photo/yPwsdAPqe8I5vM4gtHq_bA?feat=embedwebsite&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2wIKIyQgJTV_RH8bQ5ow4CDQP-dBCHBhv5M4zSkCkbkO3ovWWE9tkQuA0ydzdCaEHCEYssBvs0ulGLRv8AVVSh164cJosEcsIFuPLUom36siXDtKTPlTNv-_75SdPVsglJqsEvxZdNlk/s288/tablet.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;a href=&quot;http://bioinf.scri.ac.uk/tablet/&quot;&gt;Tablet&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;My take:&lt;/b&gt; Hands down the most attractive of the viewers, Tablet is aimed at fostering a delicate balance between performance, features, and aesthetics. Tablet comes with a suite of read views - Packed, Stacked, and Classic - to suit both young children and elderly scientists alike. GFF feature files can be loaded but they appear to merely serve as position indices.&lt;br /&gt;
&lt;b&gt;Most resembles which video game: &lt;/b&gt;SimCity&lt;br /&gt;
&lt;b&gt;Good standout feature:&lt;/b&gt; interface&lt;br /&gt;
&lt;b&gt;Bad feature:&lt;/b&gt; read insertions not displayed correctly&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://picasaweb.google.com/lh/photo/Scp_X0E2C49rvYzqX8_CFA?feat=embedwebsite&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQ9cuDDp2x9Lqs2Fze8rMi89C2iSkxuKLCyoqjcHLW8hD83cA77ujvk2TXFsJ3TrmVehUW_tEt1oU-PsX6Yai_hUijUveQLHezVqz64W2VfpBfzId94m8sjtCY9dx9HUJVCYSpzkLu-mU/s280/igv.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;a href=&quot;http://www.broadinstitute.org/igv/&quot;&gt;IGV&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;My take:&lt;/b&gt; The Integrative Genomics Viewer is a serious tool for exploring and analyzing large datasets. In addition to viewing, IGV is designed to allow users to extract the kind of hard publishable data that has typically been the domain of Bio* scripts. Like the true product of an Ivy League education, IGV can appear aloof and arrogant to newcomers. The viewer will let you load BAM files and other annotation tracks that have nothing to do with the reference without comment or guidance, then require an extra unitutive click to actually generate a view. While not the easiest or even the best in performance, in terms of generating real queries on your data from the viewer there is nothing comparable.&lt;br /&gt;
&lt;b&gt;Most resembles which video game: &lt;/b&gt;Dig Dug&lt;br /&gt;
&lt;b&gt;Good standout feature:&lt;/b&gt; analysis tools&lt;br /&gt;
&lt;b&gt;Bad feature:&lt;/b&gt; throws a hissy fit if it cannot connect to home server&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://picasaweb.google.com/lh/photo/8pD4iTemnoCaiTx1EpeAug?feat=embedwebsite&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPRWUeOe1OUmlWR1FYjAwiKn4Cfp-7yDS_HGI38dWq811FFn6vezgIG9XgNl3yE-I4wQlSSG9cjM9eJDn3WNDXc3nkXUuB2P2oSThIASzK-xwIlAbGeZxZJsP9yiEQ1AekdlAZ6syyQkg/s288/gb2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;a href=&quot;http://gmod.org/wiki/GBrowse&quot;&gt;gbrowse2&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;My take:&lt;/b&gt; gbrowse2 is the AJAXified protege to the venerable generic genome browser. Samtools integration is a recent addition to this highly extensible platform, which has been used for years to display everything from large genomes to small sequencing projects. Of all the viewers here, GB2 provides the best set of visualization tools, such that virtually any biological information that can be rendered linearly has been done so as gbrowse tracks. The lone true web application, gbrowse genomic positions can be hyperlinked or even snapshot-embedded on the web. The web provides the best platform to share visual genomic data among several users. However, a gbrowse2 installation with BAM tracks can be a massive pain to install, configure, and debug (&quot;landmark chrI not found&quot; is the most popular google search in all of bioinformatics). Novices can expect a minefield of historical gotchas and arcane conventions (&quot;Name=&quot; not &quot;name=&quot; field in gff3, bp_seqfeature_load instead of bp_load_gff for gff3, no validator for conf files), and even experienced users are often baffled by cryptic errors that pop up in server logs.&lt;br /&gt;
&lt;b&gt;Most resembles which video game: &lt;/b&gt;Sissyfight 2000&lt;br /&gt;
&lt;b&gt;Good standout feature:&lt;/b&gt; hyperlinks&lt;br /&gt;
&lt;b&gt;Bad feature:&lt;/b&gt; setup</content><link rel='replies' type='application/atom+xml' href='http://jermdemo.blogspot.com/feeds/938423623754390009/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jermdemo.blogspot.com/2010/08/ngs-viewers-reviewed.html#comment-form' title='18 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/938423623754390009'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/938423623754390009'/><link rel='alternate' type='text/html' href='http://jermdemo.blogspot.com/2010/08/ngs-viewers-reviewed.html' title='NGS viewers reviewed'/><author><name>Jermdemo</name><uri>http://www.blogger.com/profile/01662705354227625640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1xWQ4IANBnIx5d7Y5d7IU_a30v87JOEE7z3bY4goSBzEbAzsAMMsiph7ZL-HSRNH4eV7moQk72GefMHtpJ3RuSae_kIL9oLCxqkGa4E-AFzWrHoRVQCq0HyG-sDsPAaBd9k6Vp3VUIq8/s72-c/tview.png" height="72" width="72"/><thr:total>18</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8532065960756482590.post-6723366348517987937</id><published>2010-03-09T16:57:00.000-05:00</published><updated>2010-04-15T10:39:09.475-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BioConductor"/><category scheme="http://www.blogger.com/atom/ns#" term="R"/><title type='text'>Getting the basics from readAligned</title><content type='html'>The &lt;a href=&quot;http://manuals.bioinformatics.ucr.edu/home/ht-seq&quot;&gt;UCR&lt;/a&gt; guide is a little sparse with regard to getting basic information from readAligned.&lt;br /&gt;&lt;br /&gt;I&#39;d like to add to the general cookbook. If some bioc people out there can contribute some alignment recipes can fill me in on some more basics please comment:&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;brush: shell&quot;&gt;&lt;br /&gt;alignedReads &lt;- readAligned(&quot;./&quot;, pattern=&quot;output.bowtie&quot;, type=&quot;Bowtie&quot;)&lt;br /&gt;&lt;br /&gt;#how many reads did I attempt to align&lt;br /&gt;#i don&#39;t think you can&#39;t get this from alignedReads&lt;br /&gt;&lt;br /&gt;#how many reads aligned (one or more times)&lt;br /&gt;length(unique(id(alignedReads)))&lt;br /&gt;&lt;br /&gt;#how many hits were there?&lt;br /&gt;length(alignedReads)&lt;br /&gt;&lt;br /&gt;#how many reads produced multiple hits&lt;br /&gt;length(unique(id(alignedReads[srduplicated(id(alignedReads))])))&lt;br /&gt;&lt;br /&gt;#how many reads produced multiple hits at the best strata?&lt;br /&gt;#please fill me in on this one&lt;br /&gt;&lt;br /&gt;#how many reads aligned uniquely (with exactly one hit)&lt;br /&gt;length(unique(id(alignedReads)))-length(unique(id(alignedReads[srduplicated(id(alignedReads))])))&lt;br /&gt;&lt;br /&gt;#how many reads aligned uniquely at the best strata (the other hits were not as good)&lt;br /&gt;#please fill me in on this one&lt;br /&gt;&lt;br /&gt;#how many unique positions were hit? what if I ignore strand?&lt;br /&gt;#please fill me in on this one&lt;br /&gt;&lt;br /&gt;#how many converging hits were there (two query sequences aligned to the same genomic position)&lt;br /&gt;#please fill me in on this one&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://jermdemo.blogspot.com/feeds/6723366348517987937/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jermdemo.blogspot.com/2010/03/getting-basics-from-readaligned.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/6723366348517987937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/6723366348517987937'/><link rel='alternate' type='text/html' href='http://jermdemo.blogspot.com/2010/03/getting-basics-from-readaligned.html' title='Getting the basics from readAligned'/><author><name>Jermdemo</name><uri>http://www.blogger.com/profile/01662705354227625640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8532065960756482590.post-674636573435045694</id><published>2010-03-03T16:48:00.000-05:00</published><updated>2010-08-04T12:22:36.400-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bioinformatics"/><category scheme="http://www.blogger.com/atom/ns#" term="R"/><title type='text'>Quality trimming in R using ShortRead and Biostrings</title><content type='html'>I wrote an R function to do soft-trimming, right clipping FastQ reads based on quality.&lt;br /&gt;
&lt;br /&gt;
This function has the option of leaving out sequences trimmed to extinction and will do left-side fixed trimming as well.&lt;br /&gt;
&lt;pre class=&quot;brush: shell&quot;&gt;#softTrim
#trim first position lower than minQuality and all subsequent positions
#omit sequences that after trimming are shorter than minLength
#left trim to firstBase, (1 implies no left trim)
#input: ShortReadQ reads
#       integer minQuality
#       integer firstBase
#       integer minLength
#output: ShortReadQ trimmed reads
library(&quot;ShortRead&quot;)
softTrim&lt;-function(reads,minQuality,firstBase=1,minLength=5){
qualMat&lt;-as(FastqQuality(quality(quality(reads))),&#39;matrix&#39;)
qualList&lt;-split(qualMat,row(qualMat))
ends&lt;-as.integer(lapply(qualList,
function(x){which(x &lt; minQuality)[1]-1}))
#length=end-start+1, so set start to no more than length+1 to avoid negative-length
starts&lt;-as.integer(lapply(ends,function(x){min(x+1,firstBase)}))
#use whatever QualityScore subclass is sent
newQ&lt;-ShortReadQ(sread=subseq(sread(reads),start=starts,end=ends),
quality=new(Class=class(quality(reads)),
quality=subseq(quality(quality(reads)),
start=starts,end=ends)),
id=id(reads))

#apply minLength using srFilter
lengthCutoff &lt;- srFilter(function(x) {
width(x)&gt;=minLength
},name=&quot;length cutoff&quot;)
newQ[lengthCutoff(newQ)]
}  
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
To use:&lt;br /&gt;
&lt;pre class=&quot;brush: shell&quot;&gt;library(&quot;ShortRead&quot;)
source(&quot;softTrimFunction.R&quot;) #or whatever you want to name this
reads&lt;-readFastq(&quot;myreads.fq&quot;) trimmedReads&lt;-softTrim(reads=reads,minQuality=5,firstBase=4,minLength=3) writeFastq(trimmedReads,file=&quot;trimmed.fq&quot;) &lt;/pre&gt;


I strongly recommend reading the excellent UC Riverside HT-Sequencing Wiki cookbook and tutorial if you wish to venture into using R for NGS handling. Among other things, it will explain how to perform casting if you have Solexa scaled (base 64) fastq files. The function should respect that.
&lt;a href=&quot;http://manuals.bioinformatics.ucr.edu/home/ht-seq&quot;&gt;http://manuals.bioinformatics.ucr.edu/home/ht-seq&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://jermdemo.blogspot.com/feeds/674636573435045694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jermdemo.blogspot.com/2010/03/soft-trimming-in-r-using-shortread-and.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/674636573435045694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/674636573435045694'/><link rel='alternate' type='text/html' href='http://jermdemo.blogspot.com/2010/03/soft-trimming-in-r-using-shortread-and.html' title='Quality trimming in R using ShortRead and Biostrings'/><author><name>Jermdemo</name><uri>http://www.blogger.com/profile/01662705354227625640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8532065960756482590.post-6849014121716243135</id><published>2009-11-19T13:56:00.000-05:00</published><updated>2010-12-07T14:38:56.703-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="velvet"/><title type='text'>Using Vmatch to combine assemblies</title><content type='html'>&lt;h3&gt;In praise of Vmatch&lt;/h3&gt;&lt;br /&gt;
If I could take only one bioinformatics tool with me to a desert island it would be &lt;a href=&quot;http://www.vmatch.de/&quot;&gt;Vmatch&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
In addition to being a versatile alignment tool, Vmatch has many lesser-known features which also leverage suffix trees. The dbcluster option allows Vmatch to cluster similar sequences using Vmatch index files. This method is about 1000x faster than attempting to align all sequences against each other, no matter how clever the algorithm.&lt;br /&gt;
&lt;br /&gt;
Originally presented as means to cluster EST sequences, this option is useful for processing the output from de novo short read assemblers like Velvet and ABYSS. Vmatch -dbcluster allows us to easily create a non-redundant set of contig sequences originating from several assemblies.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;Why would we want to combine assemblies? &lt;/h3&gt;&lt;br /&gt;
&lt;h4&gt;Every kmer is sacred&lt;/h4&gt;&lt;br /&gt;
&lt;img style=&quot;margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 313px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbxtRzh08vkPF3A1qZo0ZXMEXoOw5jnBe8qwNBPwbFOg9mUPSy3qcVIFcOg1WYa7N5uDO7Imv4loThdXnXouLZxxpLx_pHhQE2KmI0eulf4j7RYo-ciMXudo1Hw6DDTm3rapI-YDv_mpc/s640/svarP1.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5405584666748028370&quot; border=&quot;0&quot; /&gt;&lt;p&gt;Why not just take the one with the highest N50? At the recent Genome Informatics meeting at CSHL, Inanc Birol (ABYSS) said &quot;every kmer is sacred&quot;. Our experience with the de novo transcriptome assembly of plants has been that &lt;span style=&quot;font-weight: bold;&quot;&gt;the best set of contigs is spread out all over the parameter space&lt;/span&gt;. Longer kmer and cvCut settings can produce a longer set of elite contigs at the expense of omitting lowly expressed (or spurious?) contigs that appear at less stringent settings.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;Reads held hostage&lt;/h4&gt;&lt;br /&gt;
&lt;img style=&quot;margin: 0pt 10px 10px 0pt; float: right; cursor: pointer; width: 320px; height: 316px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinO0uJ8IbeQ6G4Ap9w0kXsLx98THJMu1CTljHdez3QZcY6QOjc9Py-WZjD29BNvazVyAqZCrUEB6xUfRt8JiJDxKhvUSYTIyLjijFIjZ2u1Tb1Str8SUL5cUsPHzGvZ6o4kKFb7GCMVKs/s640/svarP2.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5405585865730142370&quot; border=&quot;0&quot; /&gt;&lt;p&gt;To the point above, I would add &quot;every cvCut is also sacred&quot;. That doesn&#39;t exactly roll off the tongue, but we have seen some instances in which an assembly will have a higher read usage at a cvCut of 10 than at 5. This paradox suggests there is a &lt;span style=&quot;font-weight: bold;&quot;&gt;&quot;contig read hostage&quot;&lt;/span&gt; situation, in which reads critical to the formation of longer contigs can be held captive in low coverage short contigs. Raising the cvCut threshold frees up these critical reads to extend more plausible contigs and allowing additional reads from the pool to be recruited into the assembly.&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;div class=&quot;clear&quot;&gt;&lt;/div&gt;&lt;br /&gt;
&lt;h3&gt;What is a non-redundant set?&lt;/h3&gt;&lt;br /&gt;
The following sequences have some redundancies. NODE2 and NODE3 do not add any information.&lt;br /&gt;
The non-redundant set will have only NODE1 and NODE4.&lt;br /&gt;
&lt;pre&gt;&gt;NODE1
AATTCAGTTGAAGTAATAGAGGCAGCTGCTGTTAGAACTTCGCTACGACTAGCAACGCTATGTCGAGTTGTACCTTCCCACCTCGTATACAAGGAGCATGAAGTCATCAGCC
CTTTCTACAGAATCTAGGTCCGAAATGATGAAATTAAGAGAAAGACAACTGAAGGTTTTAGGAGGCAAGGTTTACAGGGTAATGAACACGGAAAAACCCACAAGCTAGGAAC
AGTGTGTCTTGGAGTTTAAACTGATTTGGTAGTAGTTCGAAAACAAATTGGAAGGGACATTTAAAGTCCGAGTTGACGTTATCTGAGACAACTTTGTCTTTAACCGACAGGG
AGTTGAGGTAGGAGAGAGTGTCCACATATTTAACGTTGTTCAGATATGGGATGTAGCAGTTGTAACCGAAGCATGTAGGAAGGTTAAAGGGGTCCATACCTCTATTCTAGTC
CCGAAGGTTGGTAGCTAGACTCGGTGACCTAAAATGAGAACGGAAGAAACGGAGGTGACATCCATGGGGCTTGTCGTATATCCAATCATACCTTTGGAGAAGGAAGTTAAAG
GTCAAAACTTTAAAAACCATGAGGACCATTTTATCCTCGTCACTGTCGACTATGGTGAAGTGACCTAGCAGGTTTGTGTAGTTACTGTTTTGTAAGTGTAAAGTGCGTTGCT
GGCTATAGGAGTTTCGCATGAAACATGCTCGCTCTTGTGACCCATCGGTTACCAAGTTTACAGACTAGGTGAGGACTAGGTCACCTCTGTTTGGTAACCAAAAAGTAGAGAA
AGAATATCAACAAGGTATATACAACAACTTAGAGTAGCAAACCTTAAAAGAGTTGTCGTCAGTCACAAAGGGAGAGTTGTACTAAAGGGAACTTTTGTTCACAGAGCTAAAA
CTCATTAAGACCATTTTAATGTGGTCTACCAAGTCTGTCGAAAAGAAGTGGATGCTACGGCAGA
&gt;NODE2 a substring of NODE1
AATTCAGTTGAAGTAATAGAGGCAGCTGCTGTTAGAACTTCGCTACGACTAGCAACGCTATGTCGAGTTGTACCTTCCCACCTCGTATACAAGGAGCATGAAGTCATCAGCC
CTTTCTACAGAATCTAGGTCCGAAATGATGAAATTAAGAGAAAGACAACTGAAGGTTTTAGGAGGCAAGGTTTACAGGGTAATGAACACGGAAAAACCCACAAGCTAGGAAC
AGTGTGTCTTGGAGTTTAAACTGATTTGGTAGTAGTTCGAAAACAAATTGGAAGGGACATTTAAAGTCCGAGTTGACGTTATCTGAGACAACTTTGTCTTTAACCGACAGGG
AGTTGAGGTAGGAGAGAGTGTCCACATATTTAACGTTGTTCAGATATGGGATGTAGCAGTTGTAACCGAAGCATGTAGGAAGGT
&gt;NODE3 a reverse complement substring of NODE1
CGACAGACTTGGTAGACCACATTAAAATGGTCTTAATGAGTTTTAGCTCTGTGAACAAAAGTTCCCTTTAGTACAACTCTCCCTTTGTGACTGACGACAACTCTTTTAAGGT
TTGCTACTCTAAGTTGTTGTATATACCTTGTTGATATTCTTTCTCTACTTTTTGGTTACCAAACAGAGGTGACCTAGTCCTCACCTAGTCTGTAAACTTGGTAACCGATGGG
TCACAAGAGCGAGCATGTTTCATGCGAAACTCCTATAGCCAGCAACGCACTT
&gt;NODE4 a new sequence
TTACGAACGATAGCATCGATCGAAAACGCTACGCGCATCCGCTAAGCACTAGCATAATGCATCGATCGATCGACTACGCCTACGATCGACTAGCTAGCATCGAGCATCGATC
AGCATGCATCGATCGATCGAT
&lt;/pre&gt;&lt;br /&gt;
&lt;strike&gt;&lt;h3&gt;How do we create a non-redundant set?&lt;/h3&gt;&lt;br /&gt;
&lt;h4&gt;Do not use -nonredundant&lt;/h4&gt;&lt;br /&gt;
No, really. There is an option called -nonredundant which should presumably do what we want, but unfortunately that writes a &quot;representative&quot; member of each cluster to a file, which may or may not be the longest contig. I&#39;m not sure what makes a sequence representative of a cluster, but for this application we want the &lt;span style=&quot;font-style: italic;&quot;&gt;longest&lt;/span&gt; member of each cluster.&lt;/strike&gt;&lt;br /&gt;
&lt;em&gt;&lt;br /&gt;
On April 29th 2010, Vmatch 2.1.3 was released. The most important change is that the option -nonredundant now delivers the longest sequence from the corresponding cluster (instead&lt;br /&gt;
of an unspecified representative). This should make the longestSeq.pl approach unnecessary.&lt;/em&gt;&lt;br /&gt;
&lt;br /&gt;
To create a non-redundant set we will produce cluster files and then extract the longest sequence from each file. Use the following commands to produce your cluster files from an index:&lt;br /&gt;
&lt;pre class=&quot;brush: shell&quot;&gt;mkvtree -allout -pl -db contigs1.fa contigs2.fa -dna -indexname myIndex
#mkvtree will accept multiple fasta or gzipped fasta files

#if using Vmatch 2.1.3 or later:
vmatch -d -p -l 25 -dbcluster 100 0 -v -nonredundant nonredundantset.fa myIndex &gt; mySeqs.rpt
# thx to Hamid Ashrafi for debugging this syntax


#if using older Vmatch
mkdir sequenceMatches 
#this is where vmatch will put each cluster

vmatch -d -p -l 25 -dbcluster 100 0 mySeqs &quot;(1,0)&quot; -v -s myIndex &gt; mySeqs.rpt
mv mySeqs*.match mySeqs*.fna sequenceMatches&lt;/pre&gt;&lt;br /&gt;
&lt;h3&gt;What do these options do?&lt;/h3&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;-d direct matches (forward strand)&lt;/li&gt;
&lt;li&gt;-p palindromic matches (reverse strand)&lt;/li&gt;
&lt;li&gt;-l search length (set this below your shortest sequence)&lt;/li&gt;
&lt;li&gt;-dbcluster queryPerc targetPerc - runs an internal alignment of the index created by mkvtree.&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;The two numeric arguments specify what percentage of your query sequence (the smaller) is involved in an alignment to the cluster sentinel/target superstring. For our purposes we require 100% of our query sequence substring to match the target. We don&#39;t care what percentage of the target is aligned, so set the second parameter to 0.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;The third argument to dbcluster is the index prefix name that vmatch will give to the THOUSANDS of cluster .fna and .match files it will create.&lt;/li&gt;
&lt;li&gt;The fourth argument &quot;(1,0)&quot; specifies that we want to keep singletons (in a file called mySeqs.single.fna) and that there is no limit to the number of sequences in an acceptable cluster.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;-v verbose report (redirected to a the .rpt)&lt;/li&gt;
&lt;li&gt;-s create the individual cluster fasta files and match reports&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
Consult the vmatch manual for fuzzy matches and more examples:&lt;br /&gt;
&lt;a href=&quot;http://www.zbh.uni-hamburg.de/vmatch/virtman.pdf&quot;&gt;http://www.zbh.uni-hamburg.de/vmatch/virtman.pdf&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The standard output details the clusters and singlets.&lt;br /&gt;
&lt;pre&gt;0:761437: NODE_83_length_31_cov_22.451612857642: 
NODE_106_length_31_cov_22.451612621409: NODE_152_length_29_cov_27.758621749981: 
NODE_185_length_29_cov_27.7586211:761861: NODE_531_length_424_cov_26.851416805590: 
NODE_1413_length_320_cov_28.187500837480: NODE_1236_length_320_cov_28.187500858407: 
NODE_937_length_320_cov_28.187500765510: NODE_1542_length_108_cov_34.870369621979: 
NODE_786_length_425_cov_32.602352750915: NODE_1290_length_321_cov_34.392525
&lt;/pre&gt;&lt;br /&gt;
&lt;h3&gt;Extract the longest sequence from your cluster files&lt;/h3&gt;&lt;br /&gt;
&lt;em&gt;If using Vmatch 2.1.3 or later this is unnecessary&lt;/em&gt;&lt;br /&gt;
Here is a perl script, which we will call longestSeq.pl, to do that&lt;br /&gt;
&lt;pre class=&quot;brush: perl&quot;&gt;#!/usr/bin/perl
#print the longest sequence in a fasta file
use strict;my %seqs;my $defline;
while (&lt;&gt;) {
  chomp;
  if ( /^#/ || /^\n/ ) {
    #comment line or empty line do nothing
  }elsif (/&gt;/) {
    s/&gt;//g;$defline = $_;
    $seqs{$defline} = &quot;&quot;;
  }elsif ($defline) {
    $seqs{$defline} .= $_;
  }else{
    die(&#39;invalid FASTA file&#39;);
  }
}
my $max = $defline;
foreach my $def ( keys %seqs ) {
  $max = ( length( $seqs{$def} ) &gt; length( $seqs{$max} ) ) ? $def : $max;
}
print &quot;&gt;&quot; . $max . &quot;\n&quot; . $seqs{$max} . &quot;\n&quot;;&lt;/pre&gt;&lt;br /&gt;
We want the longest member of each cluster and all sequences in the singletons file:&lt;br /&gt;
&lt;pre class=&quot;brush: shell&quot;&gt;for f in sequenceMatches/*fna;
do
if [ &quot;$f&quot; = &quot;sequenceMatches/mySeqs.single.fna&quot; ];
then 
cat $f &gt;&gt; mySeqs_longest_seqs.fa;
else perl longestSeq.pl $f &gt;&gt; mySeqs_longest_seqs.fa;
fi;
done
&lt;/pre&gt;&lt;br /&gt;
That&#39;s it - now you have a comprehensive and non-redundant set of the longest contigs from a number of assemblies.</content><link rel='replies' type='application/atom+xml' href='http://jermdemo.blogspot.com/feeds/6849014121716243135/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jermdemo.blogspot.com/2009/11/using-vmatch-to-combine-assemblies.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/6849014121716243135'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/6849014121716243135'/><link rel='alternate' type='text/html' href='http://jermdemo.blogspot.com/2009/11/using-vmatch-to-combine-assemblies.html' title='Using Vmatch to combine assemblies'/><author><name>Jermdemo</name><uri>http://www.blogger.com/profile/01662705354227625640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbxtRzh08vkPF3A1qZo0ZXMEXoOw5jnBe8qwNBPwbFOg9mUPSy3qcVIFcOg1WYa7N5uDO7Imv4loThdXnXouLZxxpLx_pHhQE2KmI0eulf4j7RYo-ciMXudo1Hw6DDTm3rapI-YDv_mpc/s72-c/svarP1.png" height="72" width="72"/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8532065960756482590.post-8223755843047671963</id><published>2009-11-04T12:54:00.000-05:00</published><updated>2010-04-14T15:51:28.071-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="BioPerl"/><category scheme="http://www.blogger.com/atom/ns#" term="R"/><category scheme="http://www.blogger.com/atom/ns#" term="Samtools"/><title type='text'>R&#39;s xtabs for total weighted read coverage</title><content type='html'>Samtools and its BioPerl wrapper Bio::DB:Sam prefer to give read coverage on a depth per base pair basis. This is typically an array of depths, one for every position that has at least one read aligned. OK, works for me. But how can we quickly see which targets (in my case transcripts) have the greatest total weighted read coverage (i.e. sum every base pair of every read that aligned)?&lt;br /&gt;&lt;br /&gt;My solution is to take that target-pos-depth information and import a table into R with at least the following columns:&lt;br /&gt;targetName&lt;br /&gt;depth&lt;br /&gt;&lt;br /&gt;I added the pos column here to emphasize the base-pair granularity&lt;br /&gt;&lt;pre&gt;         tx pos depth&lt;br /&gt;1   tx500090 227     1&lt;br /&gt;2   tx500090 228     1&lt;br /&gt;3   tx500090 229     1&lt;br /&gt;4   tx500090 230     1&lt;br /&gt;5   tx500090 231     1&lt;br /&gt;...&lt;br /&gt;66  tx500123 184     1&lt;br /&gt;67  tx500123 185     1&lt;br /&gt;68  tx500123 186     1&lt;br /&gt;69  tx500123 187     2&lt;br /&gt;70  tx500123 188     2&lt;br /&gt;71  tx500123 189     2&lt;/pre&gt;&lt;br /&gt;In R&lt;br /&gt;&lt;pre&gt;myCoverage&lt;-read.table(&quot;myCoverage.txt&quot;,header=TRUE)&lt;br /&gt;myxTab&lt;-xtabs(depth ~ tx,data=myCoverage)&lt;/pre&gt;&lt;br /&gt;&lt;a href=&quot;http://stat.ethz.ch/R-manual/R-patched/library/stats/html/xtabs.html&quot;&gt;xtabs&lt;/a&gt; will sum up depth-weighted positions by default (i suppose this is what tabulated contigency really means) and return an unsorted list of transcripts and their weighted coverage (total base pair read coverage)&lt;br /&gt;&lt;pre&gt;&gt; myxTab[1:100]&lt;br /&gt;tx&lt;br /&gt;tx500090 tx500123 tx500134 tx500155 tx500170 tx500178 tx500203 tx500207&lt;br /&gt;      38       92      610       46      176       46       92      130&lt;br /&gt;tx500273 tx500441 tx500481 tx500482 tx500501 tx500507 tx500667 tx500684&lt;br /&gt;      76     2390      114    71228      762      222      542      442&lt;br /&gt;tx500945 tx500955 tx501016 tx501120 tx501127 tx501169 tx501190 tx501192&lt;br /&gt;    1378     3604       46       46      420      854      130      352&lt;br /&gt;tx501206 tx501226 tx501229 tx501245 tx501270 tx501297 tx501390 tx501405&lt;br /&gt;     244     1204      206    15926      214       46      168       46&lt;br /&gt;tx501406 tx501438 tx501504 tx501694 tx501702 tx501877 tx501902 tx502238&lt;br /&gt;      38     2572     7768     3274      314      298       84      198&lt;br /&gt;tx502320 tx502364 tx502403 tx502414 tx502462 tx502515 tx502517 tx502519&lt;br /&gt;     122       38      588       46       46       38       38      466&lt;br /&gt;tx502610 tx502624 tx502680 tx502841 tx502882 tx503090 tx503192 tx503204&lt;br /&gt;     206       38      168     3750       38      122       76       92&lt;br /&gt;tx503416 tx503468 tx503523 tx503536 tx503571 tx503578 tx503623 tx503700&lt;br /&gt;     260       38      168       38       46       46       84       38&lt;br /&gt;tx503720 tx503721 tx503722 tx503788 tx503872 tx503892 tx503930 tx503970&lt;br /&gt;   97112       38       38     4708       38       38     1290       84&lt;br /&gt;tx503995 tx504107 tx504115 tx504346 tx504353 tx504355 tx504357 tx504398&lt;br /&gt;      46      152      206       46     3416     1402      122      290&lt;br /&gt;tx504434 tx504483 tx504523 tx504589 tx504612 tx504711 tx504751 tx504827&lt;br /&gt;     290     8728      176       46       46       76     5644     1308&lt;br /&gt;tx504828 tx504834 tx504882 tx504931 tx504952 tx505017 tx505029 tx505078&lt;br /&gt;    2336      328       46    34138     1000     1838       46      474&lt;br /&gt;tx505123 tx505146 tx505159 tx505184&lt;br /&gt;      38   123344      160      588&lt;/pre&gt;&lt;br /&gt;this is approximately 10000x faster than using a formula like:&lt;br /&gt;&lt;pre&gt;by(myCoverage,myCoverage$tx,function(x){sum(x$depth)}&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://jermdemo.blogspot.com/feeds/8223755843047671963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jermdemo.blogspot.com/2009/11/rs-xtabs-for-total-weighted-read.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/8223755843047671963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/8223755843047671963'/><link rel='alternate' type='text/html' href='http://jermdemo.blogspot.com/2009/11/rs-xtabs-for-total-weighted-read.html' title='R&#39;s xtabs for total weighted read coverage'/><author><name>Jermdemo</name><uri>http://www.blogger.com/profile/01662705354227625640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8532065960756482590.post-6985002185757397444</id><published>2009-10-23T15:22:00.000-04:00</published><updated>2010-04-17T15:01:10.413-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Samtools"/><title type='text'>Installing Bio::DB::Sam from CPAN</title><content type='html'>Bio::DB::Sam is Lincoln Stein&#39;s BioPerl API to the SamTools package.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Installing via CPAN might skip a necessary question that will cause it to fail.&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;cpan&gt; install Bio::DB::Sam&lt;br /&gt;...&lt;br /&gt;...&lt;br /&gt;DIED. FAILED tests 1-93&lt;br /&gt;  Failed 93/93 tests, 0.00% okay&lt;br /&gt;Failed Test Stat Wstat Total Fail  Failed  List of Failed&lt;br /&gt;-------------------------------------------------------------------------------&lt;br /&gt;t/01sam.t      2   512    93  186 200.00%  1-93&lt;br /&gt;Failed 1/1 test scripts, 0.00% okay. 93/93 subtests failed, 0.00% okay.&lt;br /&gt;make: *** [test_dynamic] Error 2&lt;br /&gt;/usr/bin/make test -- NOT OK&lt;br /&gt;Running make install&lt;br /&gt;make test had returned bad status, won&#39;t install without force&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Navigate to where CPAN has downloaded the gz ffile&lt;br /&gt;A closer examination reveals that Build.PL file wants to know where the SamTools header files are located.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Please enter the location of the bam.h and compiled libbam.a files:&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;I have no idea how to pass these arguments using CPAN. I would just avoid this method of installation.&lt;/span&gt; &lt;span style=&quot;font-weight: bold;&quot;&gt;Do the local build instead.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://jermdemo.blogspot.com/feeds/6985002185757397444/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jermdemo.blogspot.com/2009/10/installing-biodbsam-from-cpan.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/6985002185757397444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/6985002185757397444'/><link rel='alternate' type='text/html' href='http://jermdemo.blogspot.com/2009/10/installing-biodbsam-from-cpan.html' title='Installing Bio::DB::Sam from CPAN'/><author><name>Jermdemo</name><uri>http://www.blogger.com/profile/01662705354227625640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8532065960756482590.post-4030752442244195162</id><published>2009-10-12T16:46:00.000-04:00</published><updated>2010-04-17T15:00:57.494-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="os x"/><title type='text'>Disable file locking in Eclipse for OS X</title><content type='html'>Eclipse will refuse to use a workspace on an automounted OS X Server home directory.&lt;div&gt;&lt;pre&gt;Workspace in use or cannot be created&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To remedy this problem do the following:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Right click the Eclipse application and select &quot;Show Package Contents&quot;&lt;/li&gt;&lt;li&gt;Contents-&gt;MacOS&lt;/li&gt;&lt;li&gt;Edit the eclipse.ini file in a text editor&lt;/li&gt;&lt;li&gt;Add -Dosgi.locking=none to the line below -vmargs&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5RFGbBySNhHA2V-rTCO_QcCMvEviXzvtoi6qQH0_mQbM3wrq8mSj2KfyCo2qJEkEKz4UJA5rYH-npb-sWwABmWtb5G4dkCQgKxboX_nyg7kUF_Yuyvm_WkkGco7seY20kyoHTBUHQXsE/s320/Picture+17.png&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5391819444924538290&quot; /&gt;&lt;img style=&quot;cursor:pointer; cursor:hand;width: 320px; height: 170px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhleEXcAmf3nBsKk8W7GEoJPHF8WFqQrx4UwSiBGsfDhBIK-EvSyYqbQ_U_sYh6Uaf0MY2YoEZLCy_NZH3U2DPhFT8TbAgIb7c4CaO8SiQLKMfEXgUsP3KTLsT1Ir9zsrs26q7b8UOXm34/s320/Picture+18.png&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5391820040896419890&quot; /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jermdemo.blogspot.com/feeds/4030752442244195162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jermdemo.blogspot.com/2009/10/disable-file-locking-in-eclipse-for-os.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/4030752442244195162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/4030752442244195162'/><link rel='alternate' type='text/html' href='http://jermdemo.blogspot.com/2009/10/disable-file-locking-in-eclipse-for-os.html' title='Disable file locking in Eclipse for OS X'/><author><name>Jermdemo</name><uri>http://www.blogger.com/profile/01662705354227625640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5RFGbBySNhHA2V-rTCO_QcCMvEviXzvtoi6qQH0_mQbM3wrq8mSj2KfyCo2qJEkEKz4UJA5rYH-npb-sWwABmWtb5G4dkCQgKxboX_nyg7kUF_Yuyvm_WkkGco7seY20kyoHTBUHQXsE/s72-c/Picture+17.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8532065960756482590.post-6337173291502138678</id><published>2009-09-23T20:18:00.000-04:00</published><updated>2010-04-17T15:00:37.048-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cycling"/><title type='text'>My 2009 Bridge-to-Bridge Experience</title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioxtfMheEqWQyUBnaHPiMQ-BTgL4vNCGt71nTbWUWNIvnm4GW8Df61eo0t30mjWjMq3VfVvTJcM-nl5Uu1yViLoY4Uf0rqIp88MRqVBdcoN2feeet-sLax8mK9k5NWfV2mKUlcM0F3dq0/s1600-h/DSC_0060.JPG&quot;&gt;&lt;img style=&quot;margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 266px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioxtfMheEqWQyUBnaHPiMQ-BTgL4vNCGt71nTbWUWNIvnm4GW8Df61eo0t30mjWjMq3VfVvTJcM-nl5Uu1yViLoY4Uf0rqIp88MRqVBdcoN2feeet-sLax8mK9k5NWfV2mKUlcM0F3dq0/s400/DSC_0060.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5384827527818904402&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;Bridge-to-Bridge is a 105-mile ride up to the top of &lt;a href=&quot;http://en.wikipedia.org/wiki/Grandfather_Mountain&quot;&gt;Grandfather Mountain&lt;/a&gt;, one of the highest peaks in the Blue Ridge mountains.&lt;br /&gt;&lt;br /&gt;Although B2B is not an officially sanctioned race, the organizers conduct it just as professionally (with the exception of neutral support). Cops manage the major crossings, volunteers provide hand-offs at the dozen feed stations, and the event is officially timed with the aid of some magnetic shoe things.&lt;br /&gt;&lt;br /&gt;I last did this ride in 1999. Now 10 years older but about 10 pounds lighter I had somehow forgotten how much suffering was involved and figured this was a good time to tackle the challenge, despite falling ill a couple of weeks beforehand.&lt;br /&gt;&lt;br /&gt;Due to constant rain and very heavy fog, this year was utter torture for the 299 finishers and 371 &lt;span style=&quot;font-style: italic;&quot;&gt;non-finishers&lt;/span&gt; who braved the elements. I believe there may have been another 130 &lt;span style=&quot;font-style: italic;&quot;&gt;non-starters&lt;/span&gt; who stayed in their hotel rooms enjoying the Golden Girls marathon on tv. While I&#39;m sure I would have felt some sense of accomplishment doing that, I was obligated to finish this ride as we had already driven down from Philadelphia (en-route to a wedding in Nashville the following weekend).&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiELWFdQ7mxbZvJXxWLogTLSwoXReZtlWCBFiXU-tqvLxNYGyBT3zA2FNw9MfhdttHdmDCiBccl7C_Rm8bDOEevzL7Bv_zrHtiQFlH_kBfptYLJPVIFoPn4cx8MTrOwaP00OqIxaFdv6Dw/s1600-h/DSC_0011.JPG&quot;&gt;&lt;img style=&quot;margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 320px; height: 213px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiELWFdQ7mxbZvJXxWLogTLSwoXReZtlWCBFiXU-tqvLxNYGyBT3zA2FNw9MfhdttHdmDCiBccl7C_Rm8bDOEevzL7Bv_zrHtiQFlH_kBfptYLJPVIFoPn4cx8MTrOwaP00OqIxaFdv6Dw/s320/DSC_0011.JPG&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5384834869777901266&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;The Grandfather Mountain staff said riders  could not enter the park before 3pm. To accommodate both the riders and this odd rule two start times were offered - 10 and 11 am, with slower riders encouraged to start first. To me this was a welcome change from the ungodly pre-dawn start times of most big rides. Riders were advised to start at the later time if they estimated they would be pushing the 3pm threshold.&lt;br /&gt;&lt;br /&gt;I was on the fence about which group to join. I saw several very fit looking riders and expensive bikes in the 10am pack. I was still riding the same Litespeed I used in 1999. The word going around was that more rain was on the way (this turned out to be true for everyone). In the end I felt the risk of having an inexperienced rider fall in front of me to be the deciding factor to go with the second group. I knew I would have to pass several of that first group anyway but it would be on the later climbs instead of the early rollers. Ironically I almost got clipped by some idiot drifting carelessly in our pack. At the end there was considerable overlap in finishing times between the two groups.&lt;br /&gt;&lt;br /&gt;The two times I did this ride (&#39;98 and &#39;99) I got dropped by the leaders on the 13 mile climb up NC181, then spent the rest of the ride either riding alone or with a couple other guys. Despite my best efforts this year turned out roughly the same except I stuck with that front group for about half the climb instead of just the first couple miles. Remind me to buy a compact crank.&lt;br /&gt;&lt;br /&gt;This climb is very difficult psychologically - a relentless slog up a roughly-paved 4 lane highway. I was not very familiar with the profile and prematurely thought I had crested three times - each time putting in a kick over the &quot;top&quot;. The fog would clear and I would see yet another rise.&lt;br /&gt;&lt;br /&gt;Feeling dispirited and exhausted, I nearly froze to death on the descents of 181 and the Blue Ridge Parkway and was eventually caught by a small group that stuck together until the ascent of Grandfather. I was amazed by how few words were exchanged in that group during the hour or so we traded pulls through the fog and rain, which only got worse as we neared the finish. One guy did say something that stuck with me, &quot;It&#39;s like we&#39;re riding through a horror movie.&quot;&lt;br /&gt;&lt;br /&gt;After crawling to the finish in a 39x27, I was very fortunate that Mary Ellen had the foresight to drive up to the summit well in advance to meet me with a warm car. I thanked her by singing the Golden Girls theme song all the way to the hotel.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;B2B &#39;09 Results:&lt;a href=&quot;http://www.caldwellcochamber.org/support/pagepics/09Bridge.txt&quot;&gt;&lt;br /&gt;http://www.caldwellcochamber.org/support/pagepics/09Bridge.txt&lt;/a&gt;&lt;/li&gt;&lt;li&gt;An account by Bruce Humphries (1st place)&lt;a href=&quot;http://dieseldiaries.com/hom/?p=232&quot;&gt;&lt;br /&gt;http://dieseldiaries.com/hom/?p=232&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Some more blog posts on the &#39;09 ride:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://fraught.wordpress.com/2009/09/22/theres-blue-sky-ahead/&quot;&gt;http://fraught.wordpress.com/2009/09/22/theres-blue-sky-ahead/&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://twentystone.blogspot.com/2009/09/2009-bridge-to-bridge-ride-report.html&quot;&gt;http://twentystone.blogspot.com/2009/09/2009-bridge-to-bridge-ride-report.html&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://khobama.blogspot.com/2009/09/and-saga-continues.html&quot;&gt;http://khobama.blogspot.com/2009/09/and-saga-continues.html&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://grimesjoseph.blogspot.com/2009/09/shenandoah-mountain-100-2009-bridge-to.html&quot;&gt;http://grimesjoseph.blogspot.com/2009/09/shenandoah-mountain-100-2009-bridge-to.html&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://jermdemo.blogspot.com/feeds/6337173291502138678/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jermdemo.blogspot.com/2009/09/my-2009-bridge-to-bridge-experience.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/6337173291502138678'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/6337173291502138678'/><link rel='alternate' type='text/html' href='http://jermdemo.blogspot.com/2009/09/my-2009-bridge-to-bridge-experience.html' title='My 2009 Bridge-to-Bridge Experience'/><author><name>Jermdemo</name><uri>http://www.blogger.com/profile/01662705354227625640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioxtfMheEqWQyUBnaHPiMQ-BTgL4vNCGt71nTbWUWNIvnm4GW8Df61eo0t30mjWjMq3VfVvTJcM-nl5Uu1yViLoY4Uf0rqIp88MRqVBdcoN2feeet-sLax8mK9k5NWfV2mKUlcM0F3dq0/s72-c/DSC_0060.JPG" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8532065960756482590.post-7883458160331554300</id><published>2009-08-26T23:27:00.000-04:00</published><updated>2010-04-17T15:06:43.998-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="humor"/><category scheme="http://www.blogger.com/atom/ns#" term="velvet"/><title type='text'>Charles Dickens de Bruijn Graph</title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbnGDaUbUf3_Y5bWT9YgiH_rqVN9zn-SiaSSThCSfoS9OcHVWSYJfsPSZrmhueAELkWjSyxHPsd0mDLup4zryan-00ubsZMRvh8sgYpSJWpYQEoYVjHpZddifT-GjYIjhmmarrG4Nh5dg/s800/dicken-debruijn.png&quot;&gt;&lt;img style=&quot;cursor: pointer; width: 800px; height: 314px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbnGDaUbUf3_Y5bWT9YgiH_rqVN9zn-SiaSSThCSfoS9OcHVWSYJfsPSZrmhueAELkWjSyxHPsd0mDLup4zryan-00ubsZMRvh8sgYpSJWpYQEoYVjHpZddifT-GjYIjhmmarrG4Nh5dg/s800/dicken-debruijn.png&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://jermdemo.blogspot.com/feeds/7883458160331554300/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jermdemo.blogspot.com/2009/08/charles-dickens-debruijn-graph.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/7883458160331554300'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/7883458160331554300'/><link rel='alternate' type='text/html' href='http://jermdemo.blogspot.com/2009/08/charles-dickens-debruijn-graph.html' title='Charles Dickens de Bruijn Graph'/><author><name>Jermdemo</name><uri>http://www.blogger.com/profile/01662705354227625640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbnGDaUbUf3_Y5bWT9YgiH_rqVN9zn-SiaSSThCSfoS9OcHVWSYJfsPSZrmhueAELkWjSyxHPsd0mDLup4zryan-00ubsZMRvh8sgYpSJWpYQEoYVjHpZddifT-GjYIjhmmarrG4Nh5dg/s72-c/dicken-debruijn.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8532065960756482590.post-8971060436358730206</id><published>2009-08-25T10:17:00.001-04:00</published><updated>2010-04-17T15:02:29.138-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="R"/><category scheme="http://www.blogger.com/atom/ns#" term="velvet"/><title type='text'>Standardized Velvet Assembly Report</title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHrQd98u7IhVHhGsVD29ivy3zUScH11LP2b1VosTYa1ePKwlxoJvySGX30jswswPV6l6CXkJdixM3l9P9nCJ_QbejPu5eNHaCy5aLlf3GcKV0Wm_LXeZRMhOhqW71HoNgqPwSzbwk4nNU/s400/example.png&quot;&gt;&lt;img style=&quot;cursor:pointer; cursor:hand;width: 400px; height: 391px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHrQd98u7IhVHhGsVD29ivy3zUScH11LP2b1VosTYa1ePKwlxoJvySGX30jswswPV6l6CXkJdixM3l9P9nCJ_QbejPu5eNHaCy5aLlf3GcKV0Wm_LXeZRMhOhqW71HoNgqPwSzbwk4nNU/s400/example.png&quot; border=&quot;0&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://code.google.com/p/standardized-velvet-assembly-report/&quot;&gt;&lt;br /&gt;http://code.google.com/p/standardized-velvet-assembly-report/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I finally got my Velvet Assembler report script up on google code. This &quot;program&quot; consists of some short scripts and a Sweave report designed to help Velvet users identify the optimal kmer and cvCut parameters.</content><link rel='replies' type='application/atom+xml' href='http://jermdemo.blogspot.com/feeds/8971060436358730206/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jermdemo.blogspot.com/2009/08/standardized-velvet-assembly-report.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/8971060436358730206'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/8971060436358730206'/><link rel='alternate' type='text/html' href='http://jermdemo.blogspot.com/2009/08/standardized-velvet-assembly-report.html' title='Standardized Velvet Assembly Report'/><author><name>Jermdemo</name><uri>http://www.blogger.com/profile/01662705354227625640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHrQd98u7IhVHhGsVD29ivy3zUScH11LP2b1VosTYa1ePKwlxoJvySGX30jswswPV6l6CXkJdixM3l9P9nCJ_QbejPu5eNHaCy5aLlf3GcKV0Wm_LXeZRMhOhqW71HoNgqPwSzbwk4nNU/s72-c/example.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8532065960756482590.post-6738871652930622485</id><published>2009-04-01T14:22:00.000-04:00</published><updated>2010-04-17T15:03:37.632-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="economics"/><title type='text'>I pick on the WSJ again: A true cost analysis of home prices</title><content type='html'>&lt;span style=&quot;font-size:100%;&quot;&gt;Today&#39;s Wall Street Journal article&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;a href=&quot;http://online.wsj.com/article/SB123853857749575441.html&quot;&gt; Home Prices: Low, But Still No Bargain&lt;/a&gt; by Brett Arends featured a chart comparing the Case-Shiller home price index to average earnings - a metric used to measure true housing cost&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt; from Jan 1987 to the present.&lt;br /&gt;&lt;br /&gt;Compared to the Case-Shiller index alone this is a useful analysis, but it doesn&#39;t take into account that most homes are bought using mortgages, not cash, so the cost of money must be factored in.&lt;br /&gt;&lt;br /&gt;It is easy enough to access historical mortgage rates to see the rates people paid to buy homes over this period:&lt;br /&gt;&lt;a href=&quot;http://research.stlouisfed.org/fred2/series/MORTG/downloaddata?cid=114&quot;&gt;http://research.stlouisfed.org/fred2/series/MORTG/downloaddata?cid=114&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The raw WSJ index data behind their snazzy chart can be gleaned from&lt;br /&gt;&lt;a href=&quot;http://online.wsj.com/public/resources/documents/info-ROI_0904_data.xml&quot;&gt;http://online.wsj.com/public/resources/documents/info-ROI_0904_data.xml&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Using a Groovy script I parsed their index data and used a multiplier based on the 30-year mortgage rate. As was done in the article, the resulting data was normalized to the first point in Jan &#39;87 so the graphs would be comparable.&lt;br /&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Fixed_rate_mortgage#Monthly_payment_formula%20WSJ%20index&quot;&gt;http://en.wikipedia.org/wiki/Fixed_rate_mortgage#Monthly_payment_formula&lt;/a&gt;&lt;/span&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Fixed_rate_mortgage#Monthly_payment_formula%20WSJ%20index&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;WSJ index&lt;br/&gt;~prices/earnings&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLt8myCwducm4HpzpPc7r24n4CiLnWAu7FWUnJbAegr73_nwu9EianLtebgUGxgPPQmOl_kk_tOqtuEWcZVAxnmQrB5Q3Qb1nCgWCi9UoPB00De3EvoAMGiCmps_7HqLojI6ox6sTpJsw/s1600-h/wsjIndex.png&quot;&gt;&lt;img style=&quot;cursor: pointer; width: 320px; height: 184px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLt8myCwducm4HpzpPc7r24n4CiLnWAu7FWUnJbAegr73_nwu9EianLtebgUGxgPPQmOl_kk_tOqtuEWcZVAxnmQrB5Q3Qb1nCgWCi9UoPB00De3EvoAMGiCmps_7HqLojI6ox6sTpJsw/s320/wsjIndex.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5319795171150074994&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;My index&lt;br/&gt;~prices*rates/earnings&lt;/td&gt;&lt;td&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0OLD4JaXfuFtJEhk4SJ1yklULTIL5Jw5xc31ZIeygJZRTL_uzp2J1HF8s3LVM2kNQj9NlCJelIGxJMDAYPaR2OPxxsV4qIOr2OXwQvmbxhhE8mRzucSmP1D0gj5hONR9AHY8o8yqBhYM/s1600-h/trueCost.png&quot;&gt;&lt;img style=&quot;cursor: pointer; width: 320px; height: 195px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0OLD4JaXfuFtJEhk4SJ1yklULTIL5Jw5xc31ZIeygJZRTL_uzp2J1HF8s3LVM2kNQj9NlCJelIGxJMDAYPaR2OPxxsV4qIOr2OXwQvmbxhhE8mRzucSmP1D0gj5hONR9AHY8o8yqBhYM/s320/trueCost.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5319793670499833634&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Using my &quot;True Cost&quot; index, the summer of 2006 was still very elevated (my index of 150 compared to 100 in Jan &#39;87) but not quite as crazy as it would appear by not taking into account the prevailing mortgage rates (WSJ index 200 compared to 100 in Jan &#39;87).&lt;br /&gt;&lt;br /&gt;March of 1989, with its 30-year rate at 11.03%, was also a crappy time to buy a house. The true cost of housing actually did not return to the &#39;89 level until the height of the boom in &#39;06. Refinancing would only offer some comfort to the &#39;89ers- you would have had to wait until August of 1992 to refinance below 8% and until Jan of 2003 to get below 6%.&lt;br /&gt;&lt;br /&gt;With today&#39;s insanely low rates we see my index is at a manageable 84, similar to May of 1999, instead of the alarming 128 Arends has used as a metric for his article. A dip much below 5% would mean the cheapest mortgaged houses relative to earnings of in over 20 years.</content><link rel='replies' type='application/atom+xml' href='http://jermdemo.blogspot.com/feeds/6738871652930622485/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jermdemo.blogspot.com/2009/04/true-cost-analysis-of-home-prices.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/6738871652930622485'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/6738871652930622485'/><link rel='alternate' type='text/html' href='http://jermdemo.blogspot.com/2009/04/true-cost-analysis-of-home-prices.html' title='I pick on the WSJ again: A true cost analysis of home prices'/><author><name>Jermdemo</name><uri>http://www.blogger.com/profile/01662705354227625640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLt8myCwducm4HpzpPc7r24n4CiLnWAu7FWUnJbAegr73_nwu9EianLtebgUGxgPPQmOl_kk_tOqtuEWcZVAxnmQrB5Q3Qb1nCgWCi9UoPB00De3EvoAMGiCmps_7HqLojI6ox6sTpJsw/s72-c/wsjIndex.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8532065960756482590.post-7839640793580422458</id><published>2009-02-26T16:02:00.000-05:00</published><updated>2010-04-17T15:03:37.633-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="economics"/><title type='text'>The WSJ made an accounting error</title><content type='html'>Wall Street Journal 2/26:&lt;br /&gt;The 2% Illusion&lt;br /&gt;&lt;a href=&quot;http://online.wsj.com/article/SB123561551065378405.html&quot;&gt;http://online.wsj.com/article/SB123561551065378405.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I was curious to see how they arrived at the numbers for this article, given there are no citations. I found the table they were using:&lt;br /&gt;&lt;a href=&quot;http://www.irs.gov/pub/irs-soi/06in21id.xls&quot;&gt;http://www.irs.gov/pub/irs-soi/06in21id.xls&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Unfortunately, this table is only for taxpayers who filed itemized returns.&lt;/span&gt; From the opinion piece:&lt;br /&gt;&lt;blockquote&gt;Consider the IRS data for 2006, the most recent year that such tax data are available and a good year for the economy and &quot;the wealthiest 2%.&quot; Roughly 3.8 million filers had adjusted gross incomes above $200,000 in 2006. (That&#39;s about 7% of all returns; the data aren&#39;t broken down at the $250,000 point.) These people paid about $522 billion in income taxes, or roughly 62% of all federal individual income receipts.&lt;/blockquote&gt;To arrive at $522B they took rows 26:32&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja5jyJRE1hdZPaGUAwhUzHRiz75Pi450dfvvS43ACuE0RfUHGmJJQai4UFkpJjp5pbPx0oDlqlZiFjtGZjC8Jws_dT1x_OPX1fBXI2huaUg7woj_FvOdGnj5r605wqozAWPb9DqwSabt8/s1600-h/522.png&quot;&gt;&lt;img style=&quot;cursor: pointer; width: 165px; height: 172px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja5jyJRE1hdZPaGUAwhUzHRiz75Pi450dfvvS43ACuE0RfUHGmJJQai4UFkpJjp5pbPx0oDlqlZiFjtGZjC8Jws_dT1x_OPX1fBXI2huaUg7woj_FvOdGnj5r605wqozAWPb9DqwSabt8/s320/522.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5307216295373172882&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To arrive at 62% they divided this number by $837B, &lt;span style=&quot;font-weight: bold;&quot;&gt;once again this is only for itemized returns&lt;/span&gt;. One clue that might have tipped them off (they were looking at a subset) would be that there are only 42 million returns on this table for a country of over 300 million people.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTNNPJl7QnVSaGqBuIZTuKX00PSDNP54ooEa1gVKlU0I3nm9LOFwxbPVZy7aD-sNu71x156_-mbz8YHEI9s7jkjKybgynUfGPskcbquT6mQPiDRT39yYxRPi1N_oWHuPDAL6aHqj-SuwA/s1600-h/837.png&quot;&gt;&lt;img style=&quot;cursor: pointer; width: 242px; height: 168px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTNNPJl7QnVSaGqBuIZTuKX00PSDNP54ooEa1gVKlU0I3nm9LOFwxbPVZy7aD-sNu71x156_-mbz8YHEI9s7jkjKybgynUfGPskcbquT6mQPiDRT39yYxRPi1N_oWHuPDAL6aHqj-SuwA/s320/837.png&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5307216434900919026&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Perhaps most bizarre is their claim that 7% of returns report more than $200k/yr. I don&#39;t understand how this number got past them.&lt;br /&gt;&lt;br /&gt;The total for all returns (standard and itemized) can be found on&lt;br /&gt;&lt;a href=&quot;http://www.irs.gov/pub/irs-soi/06in12ms.xls&quot;&gt;http://www.irs.gov/pub/irs-soi/06in12ms.xls&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Using the correct table:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The total income tax collected is $1.023T, not $837B. ($1,023,920,139)&lt;/li&gt;&lt;li&gt;The total income tax collected by households making more than $200k is $544B, not $522B ($544,318,726)&lt;/li&gt;&lt;li&gt;The percentage of receipts collected by rich households is roughly 53%, not 62%.&lt;/li&gt;&lt;li&gt;Finally, the percentage of returns with income &gt;$200k is 2.9%, not 7% (wow)&lt;/li&gt;&lt;/ul&gt;This does not fundamentally change the WSJ&#39;s arguments, which I feel are simply irrelevant. Rich people know to hide their wealth in corporations. Their assets are all comingled with corporate assets and their expenses become business costs. In 2002, US corporations report revenues of almost $50T, income of $563B, and paid just $154B in corporate income tax. I find that very strange.&lt;br /&gt;&lt;br /&gt;Even stranger, I&#39;ve learned that some rich people actually take the standard deduction! In fact, 244 of the 15956 households making &lt;span style=&quot;font-weight: bold;&quot;&gt;more than $10M&lt;/span&gt; in income decided it was not worth itemizing in TY2006.</content><link rel='replies' type='application/atom+xml' href='http://jermdemo.blogspot.com/feeds/7839640793580422458/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jermdemo.blogspot.com/2009/02/wsj-made-accounting-error.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/7839640793580422458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/7839640793580422458'/><link rel='alternate' type='text/html' href='http://jermdemo.blogspot.com/2009/02/wsj-made-accounting-error.html' title='The WSJ made an accounting error'/><author><name>Jermdemo</name><uri>http://www.blogger.com/profile/01662705354227625640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja5jyJRE1hdZPaGUAwhUzHRiz75Pi450dfvvS43ACuE0RfUHGmJJQai4UFkpJjp5pbPx0oDlqlZiFjtGZjC8Jws_dT1x_OPX1fBXI2huaUg7woj_FvOdGnj5r605wqozAWPb9DqwSabt8/s72-c/522.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8532065960756482590.post-7617949163190406850</id><published>2008-11-26T13:37:00.000-05:00</published><updated>2010-04-17T15:06:35.256-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="humor"/><title type='text'>Automatic litterbox reviews: It makes YOU the biggest LitterMaid of all!</title><content type='html'>&lt;span style=&quot;;font-family:arial;font-size:85%;&quot;  &gt;Americans have a strong faith that technology will improve their lives, so it&#39;s always fun to see our patience get tapped by a poorly designed product. My favorite example of this is the line of LitterMaid automatic or &quot;self-cleaning&quot; cat litter boxes. When I need a good laugh I just sort the latest LitterMaid reviews on Amazon by &quot;Rating: Low to High&quot;. Here are some choice quotes:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div  style=&quot;text-align: left;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://ecx.images-amazon.com/images/I/412WD0BTK8L._SL500_SS160_.jpg&quot;&gt;&lt;img style=&quot;cursor: pointer; width: 160px; height: 160px;&quot; src=&quot;http://ecx.images-amazon.com/images/I/412WD0BTK8L._SL500_SS160_.jpg&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-weight: bold;font-family:arial;font-size:85%;&quot;  &gt;LitterMaid LM500 Automated Litter Box&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;blockquote  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;I read all the reviews saying this thing sucked, and I thought, Well I&#39;m an engineer, I can handle it but I was Wrong. I even got the older model LM500 hoping that it would work, but it didn&#39;t.&lt;br /&gt;In the automatic rake thing, there are several plastic parts put, not glued or secured together. The first couple of times the rake went offline (because of excessively large dump - this happened at least 4-5 times per day despite filling litter to lower than the mark and using premium litter etc), the little plastic parts would pop out and the rake would go offtrack. Once this started happening, the plastic pieces would pop off every time. I tried glueing it, rubberbands, etc. Nothing worked. I feel really stupid for having read all the reviews and still buying it. Look at the content of the reviews. People describe intimately what is wrong with the product (rake broken, off track, etc) and how they tried to fix it. This should tell you how involved the owner got to try and get it to work. For me this meant getting cat piss all over myself, litter in my eyes, and messing with it everyday until the day, only three weeks after I got it, when it refused to work whatsoever.&lt;br /&gt;Now I have this gigantic plastic piece of cat piss smelling garbage sitting around that I have to repackage and mail back. This is just not worth it. My brother has one, and it works, but it&#39;s just luck of the draw whether you get it to work or not. But judging from all the negative reviews, odds are against you.&lt;br /&gt;&lt;a href=&quot;http://www.amazon.com/review/R3UV59VLA3XBVK/ref=cm_cr_rdp_perm&quot;&gt;http://www.amazon.com/review/R3UV59VLA3XBVK&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;  I got more [poop] flicked in my face in 1 month then in 15 years in the veterinary business.&lt;br /&gt;Emptying the poop containers flicks sand and poop in you face and mouth. Also, litter rake would clump and you had to clean it by hand. The plastic must have been poop bonding material because you could never get it clean. After 2 weeks , it started throwing poop clumps acrosss the floor. Somehow the rake got stuck and preassure woud build and thwack! Poop and urine would fly. don&#39;t waste your money&lt;br /&gt;&lt;a href=&quot;http://www.amazon.com/review/R1ULXRUI9MSTLI/ref=cm_cr_rdp_perm&quot;&gt;http://www.amazon.com/review/R1ULXRUI9MSTLI&lt;/a&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;span style=&quot;;font-family:arial;font-size:85%;&quot;  &gt;&lt;blockquote&gt;In particular, whatever plastic is used seems to have an affinity for soiled cat litter, as it sticks to everything, especially the rake, making a mess. Remember the idea is that you don&#39;t have to deal with handling cat litter directly anymore, right?&lt;/blockquote&gt;&lt;/span&gt;&lt;blockquote  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;/span&gt;&lt;p&gt;       &lt;/p&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;I am now on the 2nd Cat Tent as the cat jumped on it one time and the first one broke and I had to use duck tape to fix it. THis new cat tent is better but is very weak for the price u pay for the plastic and plastic materal that is the tent.&lt;br /&gt;&lt;a href=&quot;http://www.amazon.com/review/R273DEU4GH0VUT/ref=cm_cr_rdp_perm&quot;&gt;http://www.amazon.com/review/R273DEU4GH0VUT&lt;/a&gt;&lt;/span&gt;&lt;/blockquote&gt; &lt;blockquote  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Now we&#39;re cleaning the litter box more than ever! We groan with despair when we know we have to go up to see the condition that it&#39;s in. To look and see poo stuck to the rake along with clumps of other stuff. Not to mention the loose litter all over the edges of the box and on the floor outside the box. We bought the crappy tent that goes with it but that tore during assembly and now there&#39;s loose litter on the bottom of the tent. The entire area must be vacuumed every other day. If you don&#39;t mind your cats stepping in clumps of broken up pee, then this product is for you!&lt;br /&gt;&lt;a href=&quot;http://www.amazon.com/review/RG26YYDGW49XF/ref=cm_cr_rdp_perm&quot;&gt;http://www.amazon.com/review/RG26YYDGW49XF&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;The motor was SO noisy that we could hear it go on when we were all the way upstairs, the noise scared our new kitten so much, he refused to use it. Our most mischievious little feline devil discovered what he needed to do to turn the motor on and that became his favorite sport, he&#39;d activate it and watch the rake go back and forth, so the lifespan of the batteries was about 3 days in our house. Our older cat, who&#39;s very fastidious, even for a cat, steadfastly refused to use it at all because it smelled. He&#39;d simply go to the spot where the old box used to be and wail. I should point out that the smell was distributed throughout our home when the box was raking. We needed to replace the motor after only 3 weeks because the casing broke, its a complicated process that takes more time than it should since you&#39;re presummed to be without a litterbox when it occurs. Cleaning it was a bigger chore than a regular litterbox and took over half hour because you had to dismantle parts of it to clean it completely. The motor couldn&#39;t be submerged in water, so taking it to the backyard and hosing it down like I did my regular box wasn&#39;t an option, it was scrape, scrub, scrap, scrub, scrape, scrub, etc every 2 or 3 days. It was a disgusting and smelly job, and you&#39;d end up with flecks of litter all over your shirt and FACE. My husband and I would actually argue about who got to clean the mess. Many times the rake would just scoop whatever litter wasn&#39;t stuck to the sides and head onto the floor, but since we had the tent, it was scooped inside the tent, so on a daily basis, that had to be dismantled and swept out, because if we didn&#39;t, one of the cats would squeeze between the box and tent to use the litter that was deposited there.&lt;br /&gt;&lt;a href=&quot;http://www.amazon.com/review/R17DPF4GT7G9IB/ref=cm_cr_rdp_perm&quot;&gt;http://www.amazon.com/review/R17DPF4GT7G9IB&lt;/a&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;span style=&quot;;font-family:arial;font-size:85%;&quot;  &gt;&lt;/span&gt;&lt;blockquote  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Everything about cleaning this unit causes you to have to get cat waste all over yourself.&lt;br /&gt;&lt;a href=&quot;http://www.amazon.com/review/RR9GJ4SFBD7LD/ref=cm_cr_rdp_perm&quot;&gt;http://www.amazon.com/review/RR9GJ4SFBD7LD&lt;/a&gt;&lt;/span&gt;  &lt;/blockquote&gt;&lt;blockquote  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;First off it scared my cats to death. One of them refused to use the litter box ever again, even after switching back to a conventional scoop one. Next, the litterbox would literally fling poo. I would give it 5 stars if we were rating it on range!&lt;br /&gt;&lt;a href=&quot;http://www.amazon.com/review/RXMX22WIAQ0OS/ref=cm_cr_rdp_perm&quot;&gt;http://www.amazon.com/review/RXMX22WIAQ0OS&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The machine only lets you put in a shallow amount of litter or it will clog as the tines rake through it. This means you have to really watch the litter level. If it is too high the machine jams and the motor runs back and forth over and over again trying to push against a pile of litter. The trouble is, with such a shallow amount of litter [1] if your cat is in the habit of using the same place in the box everytime the litter gets REALLY shallow, and [2] even with a full load of litter, the litter does not clump when your cat has a large pee. The pee soaks to the bottom and sticks, and the litter stays slightly gummy, and sticks to the tines of the rake, and the machine jams. Yes I used premium litter. To make matters worse, my cat liked to pee right on the edge of the litter by the tines where the floor of the box ramps up and there is nearly no litter. instant mess.&lt;br /&gt;&lt;br /&gt;If your cat&#39;s stool is soft that day, and/or your cat does not properly cover it, the poo smears and sticks all over the rake and it jams. And it is horrible to clean. I have has cat feces jammed way up under the tines on the side where the motor is.&lt;br /&gt;&lt;a href=&quot;http://www.amazon.com/review/R1U8PN3YPPD1I7/ref=cm_cr_rdp_perm&quot;&gt;http://www.amazon.com/review/R1U8PN3YPPD1I7&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;It is as if Littermaid tried to design a product to expose you to as much used cat litter as possible.&lt;br /&gt;&lt;a href=&quot;http://www.amazon.com/review/R2XEVH732T9MBI/ref=cm_cr_rdp_perm&quot;&gt;http://www.amazon.com/review/R2XEVH732T9MBI&lt;/a&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;the rake has just recently adopted a new trick - CATAPAULTING large clumps of poop across the kitchen floor! It&#39;s amazing how far those clumps can fly. When I was making a sandwich just now I found some small litter clumps that had landed on the kitchen counter.&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;a href=&quot;http://www.amazon.com/review/R38J95MCLK7MRX/ref=cm_cr_rdp_perm&quot;&gt;http://www.amazon.com/review/R38J95MCLK7MRX&lt;/a&gt;&lt;/span&gt;&lt;blockquote  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;a href=&quot;http://www.amazon.com/review/R38J95MCLK7MRX/ref=cm_cr_rdp_perm&quot;&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;/a&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;blockquote  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;a href=&quot;http://www.amazon.com/review/R38J95MCLK7MRX/ref=cm_cr_rdp_perm&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;Really look at the picture and think how you would like to clean poop from between all those tines on the rake.&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href=&quot;http://www.amazon.com/review/R2G6E7Y32MMI09/ref=cm_cr_rdp_pe&quot;&gt;http://www.amazon.com/review/R2G6E7Y32MMI09&lt;/a&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;  I hate this product.&lt;br /&gt;&lt;a href=&quot;http://http//www.amazon.com/review/R1XYLXKZMYG0EG&quot;&gt;http://www.amazon.com/review/R1XYLXKZMYG0EG&lt;/a&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;My wife and I received one of these as a gift and were initially very excited. The excitement, however, wore off when the cat stopped using the box and instead used the basement floor directly in front of the box.&lt;br /&gt;&lt;a href=&quot;http://www.amazon.com/review/R2LADMJG3SPAB3&quot;&gt;http://www.amazon.com/review/R2LADMJG3SPAB3&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;span style=&quot;;font-family:arial;font-size:85%;&quot;  &gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:arial;font-size:85%;&quot;  &gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://ecx.images-amazon.com/images/I/41XJKV1VSJL._SL160_SL120_.jpg&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://ecx.images-amazon.com/images/I/41XJKV1VSJL._SL160_SL120_.jpg&quot;&gt;&lt;img style=&quot;cursor: pointer; width: 120px; height: 97px;&quot; src=&quot;http://ecx.images-amazon.com/images/I/41XJKV1VSJL._SL160_SL120_.jpg&quot; alt=&quot;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:arial;font-size:85%;&quot;  &gt;&lt;a href=&quot;http://www.amazon.com/LitterMaid-LM900-Mega-Self-Cleaning-Litter/dp/B00005MF9U/ref=cm_cr_pr_pb_t&quot;&gt;LitterMaid LM900 Mega Self-Cleaning Litter Box&lt;/a&gt;&lt;br /&gt;&lt;blockquote&gt;Mine was quite entertaining when I first purchased it because it came with a unique, added bonus feature. Every time the rake would get up to the disposal container, it would hang up and then forcefully catapult it&#39;s precious cargo across the room. I would be sitting there watching turd showers as they fell like meteors after being flung from inside my closet.&lt;br /&gt;&lt;a href=&quot;http://www.amazon.com/review/R1VQSBUHBG90R1/ref=cm_cr_rdp_perm&quot;&gt;http://www.amazon.com/review/R1VQSBUHBG90R1&lt;/a&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;blockquote  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;This thing is, no pun intended, a total piece of crap.&lt;/span&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;&lt;br /&gt;&lt;a href=&quot;http://www.amazon.com/review/R1YCHB6QPNQTM4/ref=cm_cr_rdp_perm&quot;&gt;http://www.amazon.com/review/R1YCHB6QPNQTM4&lt;/a&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;span style=&quot;;font-family:arial;font-size:85%;&quot;  &gt;&lt;a href=&quot;http://www.amazon.com/review/R1YCHB6QPNQTM4/ref=cm_cr_rdp_perm&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;blockquote  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;My cats don&#39;t like the noise it makes, and I think they&#39;ve gotten scared of it, since one of them has started to poop just outside of the box, and the other one started to pee on the bathroom rug (he&#39;s 5 years old, and has never had a problem before)&lt;br /&gt;&lt;a href=&quot;http://www.amazon.com/review/R1WMGVRKP9606C/ref=cm_cr_rdp_perm&quot;&gt;http://www.amazon.com/review/R1WMGVRKP9606C&lt;/a&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;blockquote  style=&quot;font-family:arial;&quot;&gt;&lt;span style=&quot;font-size:85%;&quot;&gt;  I have admit this is a great idea, again underline/capitalize the word IDEA.&lt;br /&gt;&lt;a href=&quot;http://www.amazon.com/review/R5QXWGPTT6T9C/ref=cm_cr_rdp_perm&quot;&gt;http://www.amazon.com/review/R5QXWGPTT6T9C&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Well... these are made for cats to use, are they not?&lt;br /&gt;&lt;a href=&quot;http://www.amazon.com/review/R2MZ8JGXT24V3S/ref=cm_cr_rdp_perm&quot;&gt;http://www.amazon.com/review/R2MZ8JGXT24V3S&lt;/a&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;span style=&quot;;font-family:arial;font-size:85%;&quot;  &gt;&lt;blockquote&gt;My cat, who also enjoys just setting off the sensor so that the rake will pass through the litter, has learned that a great way to get me out of the bed in the middle of the night is to build up a little mountain of litter so that when the rake passes through it and attempts to return to its start position it cannot and the machine will continue to run back and forth, making a sound very similar to nails on a chalk board, until someone (me) evens out the litter.&lt;br /&gt;&lt;a href=&quot;http://www.amazon.com/review/R1Q2VVAGT9RXFL/ref=cm_cr_rdp_perm&quot;&gt;http://www.amazon.com/review/R1Q2VVAGT9RXFL&lt;/a&gt;&lt;/blockquote&gt;&lt;blockquote&gt;I read several reviews before buying this product. They seemes very mixed, but I hate changing the litter box, and I thought, &quot;Hey, that person who talks about the cat poop flying 10 feet in the air has GOT to be lying!&quot; Well, sir, that person was not. I, too, have seen the flying cat poop. In fact, the day some hit me in the face was the day I decided to return this!&lt;br /&gt;&lt;a href=&quot;http://www.amazon.com/review/R1DCOIY61ZEUYJ/ref=cm_cr_rdp_perm&quot;&gt;http://www.amazon.com/review/R1DCOIY61ZEUYJ&lt;/a&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Countless times I have been awaken at midnight by the loud whine of this contraption struggling to empty the contents until it finally stops after four or five rounds of noise unable to achieve its goal&lt;br /&gt;&lt;a href=&quot;http://www.amazon.com/review/RHLJPF2X8D8L2/ref=cm_cr_rdp_perm&quot;&gt;http://www.amazon.com/review/RHLJPF2X8D8L2&lt;/a&gt;&lt;/blockquote&gt;&lt;blockquote&gt;I don&#39;t know what kind of toxoplasmosis you can get when it flings a chunk of cat litter in your eye, but I&#39;ll know soon.&lt;br /&gt;&lt;a href=&quot;http://www.amazon.com/review/R2V1504T3TL2AW/ref=cm_cr_rdp_perm&quot;&gt;http://www.amazon.com/review/R2V1504T3TL2AW/&lt;/a&gt;&lt;/blockquote&gt;&lt;blockquote&gt;I have had for about 5 months now, and this morning at 4am, it broke. The whole arm with the rake and the motor broke clean off, and I can see no way to repair it. However, after it broke, the motor continued to run and run until I got up and turned it off...I am surprised after reading all of the bad reviews that LitterMaid has not improved their product. I am also surprised they are even still in business.&lt;br /&gt;&lt;a href=&quot;http://www.amazon.com/review/R3D4ERTMRQGMJ3&quot;&gt;http://www.amazon.com/review/R3D4ERTMRQGMJ3&lt;/a&gt;&lt;/blockquote&gt;&lt;blockquote&gt;What you have to understand is that the rake mechanism that sweeps up the clumps of litter runs along a line of sprocket-like plastic ridges...ridges that get jammed with litter every time it operates.&lt;br /&gt;&lt;a href=&quot;http://www.amazon.com/review/R35VS2YQBIDVL4&quot;&gt;http://www.amazon.com/review/R35VS2YQBIDVL4&lt;/a&gt; &lt;/blockquote&gt;&lt;blockquote&gt;is lovely if the waste isn&#39;t in any way still damp but if it is watch out! With the rake-like feature it dug through the waste and stuck in the scooper all the time. Then it would reverse and push the unscooped waste into the mechanisim and it was just gross!&lt;br /&gt;&lt;a href=&quot;http://www.amazon.com/review/R3CQ9CIJMKQ8FM&quot;&gt;http://www.amazon.com/review/R3CQ9CIJMKQ8FM&lt;/a&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;b&gt;The Incubus, or, How a Litterbox Ruined My Life&lt;/b&gt;&lt;br /&gt;This is possibly the worst product ever fashioned by human hands. When it does work, which is rarer than the appearance of most astronomical phenomenon, all the tines of the rake serve to do is spear chunks of cat feces and carry them back to the return position, leaving nothing in the waste receptacle. Spending just five minutes scraping it off is enough to make me want to stab myself with one of said tines, that I might become infected with a deadly strain of ecoli, and be permanently freed from this abortion of a product.&lt;br /&gt;&lt;a href=&quot;http://www.amazon.com/review/R1RH4CFWDOEEJJ&quot;&gt;http://www.amazon.com/review/R1RH4CFWDOEEJJ&lt;/a&gt;&lt;/blockquote&gt;&lt;blockquote&gt;I have asked the Litter Box God to please tell me the &quot;Littermaid secret&quot;. I give up. The secret is apparently I AM THE LITTERMAID!...I really regret not asking for a new poop shovel and taken the $100 and my cats could be pooping in gold dust. Wow. I did not know I was that mad. Sorry.&lt;br /&gt;&lt;a href=&quot;http://www.amazon.com/review/R2EG7PNR8NRO1L&quot;&gt;http://www.amazon.com/review/R2EG7PNR8NRO1L&lt;/a&gt;&lt;/blockquote&gt;&lt;blockquote&gt;  I have spent more money on litter boxes than clothes.&lt;br /&gt;&lt;a href=&quot;http://www.amazon.com/review/R3JA3CUQIM0BEV&quot;&gt;http://www.amazon.com/review/R3JA3CUQIM0BEV&lt;/a&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;b&gt;Louder.  Louder Than Hell.&lt;/b&gt; My wife and I bought one of these infernal machines and next to nails on a chalkboard and Ashley Simpson, the shrieking that comes from the slow-dying motor is absolutely one of the worst noises I can think of. I have been woken from a dead sleep many nights to the tune of &quot;clogged feces.&quot; If you haven&#39;t heard this tune, let me describe it for you. Combine a five year old playing the electric violin for the first time with Fran Drescher and add in a few seconds of dead silence in two or three 15 second intervals.&lt;br /&gt;&lt;a href=&quot;http://www.amazon.com/review/R2EZQII0XE14CZ&quot;&gt;http://www.amazon.com/review/R2EZQII0XE14CZ&lt;/a&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://jermdemo.blogspot.com/feeds/7617949163190406850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jermdemo.blogspot.com/2008/11/automatic-litterbox-reviews-it-makes.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/7617949163190406850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/7617949163190406850'/><link rel='alternate' type='text/html' href='http://jermdemo.blogspot.com/2008/11/automatic-litterbox-reviews-it-makes.html' title='Automatic litterbox reviews: It makes YOU the biggest LitterMaid of all!'/><author><name>Jermdemo</name><uri>http://www.blogger.com/profile/01662705354227625640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8532065960756482590.post-8426458267679153270</id><published>2008-11-25T14:02:00.000-05:00</published><updated>2010-04-17T15:03:09.888-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="n50"/><category scheme="http://www.blogger.com/atom/ns#" term="R"/><category scheme="http://www.blogger.com/atom/ns#" term="velvet"/><title type='text'>Calculating an N50 from Velvet output</title><content type='html'>In sequencing circles the N50 length is a useful heuristic for judging the quality of an assembly. Here is my definition of N50 length, which you may or may not find intuitive:&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;N50 length is the length of the shortest contig such that the sum of contigs of equal length or longer is at least 50% of the total length of all contigs&lt;/blockquote&gt;For example&#39;s sake imagine an assembler has created contigs of the following length (in descending order):&lt;br /&gt;&lt;blockquote&gt;91 77 70 69 62 56 45 29 16  4&lt;/blockquote&gt;The sum of these is 519bp, so the sum of all contigs equal to or greater than N50 must be equal to or greater than 519/2 or 259.5&lt;br /&gt;We can see by brute force that&lt;br /&gt;91+77=168&lt;br /&gt;91+77+70=238&lt;br /&gt;91+77+70+69=307 (that&#39;ll do)&lt;br /&gt;so the N50 for this assembly is 69bp&lt;br /&gt;&lt;br /&gt;Another way to look at this: &lt;blockquote&gt;at least half the nucleotides in this assembly belong to contigs of size 69bp or longer.&lt;/blockquote&gt;&lt;br /&gt;&lt;h3&gt;N50 vs N50 length&lt;/h3&gt;Technically N50, as opposed to &lt;span style=&quot;font-style:italic;&quot;&gt;N50 length&lt;/span&gt;, refers to the ordinal of that last contig that pushes it over the brink - in this example 4 (since 69bp is the 4th largest contig). Unfortunately, a higher N50 implies the opposite of a longer N50 length. Some papers refer to N50 length as L50, while most have simply followed the lazy convention of dropping &quot;length&quot; off of &quot;N50 length&quot;. I think it is important to include units with your N50 to minimize confusion.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Contig N50 vs Scaffold N50&lt;/h3&gt;Another distinction is often made between contig N50 and scaffold N50. Contigs are &quot;contiguous segments&quot;, while scaffolds (aka supercontigs) consist of contigs separated by gaps. Scaffolds are constructed using paired-end information at the read level and, in major sequencing projects, paired BAC ends. Because the scaffolds sequences are filled with varying quantities of empty N&#39;s, the scaffold N50 should not solely be used as a comparative score of assembly quality.&lt;br /&gt;&lt;br /&gt;Velvet, when used with sane expCov settings, is very conservative with regard to scaffolding - so much that the contigs.fa N50 can be virtually considered a contig N50, as opposed to a scaffold N50. More aggressive programs, such as SOAPdenovo, produce separate contig and scaffold files.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Velvet N50 from stats.txt&lt;/h3&gt;&lt;a href=&quot;http://www.ebi.ac.uk/%7Ezerbino/velvet/&quot;&gt;Velvet&lt;/a&gt; is a popular assembler for short sequences that uses DeBruijn graphs and Eulerian graph theory instead of a repetitive align-consensus-align approach. Although it returns an N50 in the course of assembling, I wanted to derive it from the contigs themselves. These contigs are summarized in a table called stats.txt&lt;br /&gt;&lt;br /&gt;Using R and its cumulative summation function we can easily compute N50.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;Strategy: Order the contigs by decreasing size and find the first value for which the cumulative summation is at least half the total sum.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Thanks to Barry Rowlingson for providing this solution&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;brush: bash&quot;&gt;&lt;br /&gt;myStatsTable&lt;-read.table(&quot;stats.txt&quot;,header=TRUE)&lt;br /&gt;contigs&lt;-rev(sort(myStatsTable$lgth+myKmerValue-1))&lt;br /&gt;n50&lt;-contigs[cumsum(contigs) &gt;= sum(contigs)/2][1]&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Beware the kmer&lt;/h3&gt;Note: The length in the stats.txt file is given as length=lgth+kmer-1, where kmer is the kmer value chosen for that assembly. The N50 length given in the Log file also appears to be in kmers. &lt;span style=&quot;font-weight:bold;&quot;&gt;You cannot convert an N50 in kmers to bp by adding kmer-1. The math doesn&#39;t work like that - you need to convert each contig to bp before recalculating N50.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Finally, you can calculate N50 from sequences in the contigs.fa, but this file only contains contigs longer than 2-kmers by default. The contigs.fa bp-N50 will sometimes approximate the kmer-N50 in the Log file, but that is not a rule to depend on.</content><link rel='replies' type='application/atom+xml' href='http://jermdemo.blogspot.com/feeds/8426458267679153270/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jermdemo.blogspot.com/2008/11/calculating-n50-from-velvet-output.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/8426458267679153270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/8426458267679153270'/><link rel='alternate' type='text/html' href='http://jermdemo.blogspot.com/2008/11/calculating-n50-from-velvet-output.html' title='Calculating an N50 from Velvet output'/><author><name>Jermdemo</name><uri>http://www.blogger.com/profile/01662705354227625640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8532065960756482590.post-8960983689378098985</id><published>2008-11-24T11:07:00.000-05:00</published><updated>2010-04-17T15:06:35.258-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="humor"/><title type='text'>Writing a decent cover letter</title><content type='html'>Times are tough, and many of us will soon find ourselves back on the job market. Many people ask me how I&#39;ve gotten so many jobs for which I am clearly not qualified. A lot of the credit goes to the excellent cover letters I have written over the years. A decent cover letter sets the tone for a successful interview. I&#39;ll try to boil down the key practices that I try to emphasize throughout the entire interview process:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Be yourself - be honest about your strengths and weaknesses&lt;/li&gt;&lt;li&gt;Don&#39;t let a position&#39;s requirements stand in your way&lt;/li&gt;&lt;li&gt;Make your expectations clear&lt;/li&gt;&lt;/ol&gt;Here is a cover letter I helped my friend Erskine write for a lab tech position that recently opened up:&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;To whom it may concern,&lt;br /&gt;I am very interested in your Research Specialist position. Although I have none of the skills you listed, I am confident my overwhelming sense of entitlement will win you over.&lt;br /&gt;&lt;br /&gt;A series of bizarre and unfortunate lab accidents has left me without the use of the left side of my body. I also have syphillus, but that is a long story. Anyway, when the insurance money ran out I decided it was time to get back in the game. Word to your mother.&lt;br /&gt;&lt;br /&gt;The only thing I request, other than the $85k/yr, is that the lights in the lab be dimmed when I am working - too much stimulation gives me seizures and/or provokes violence in me. I am also profoundly racist, so please do what you need to do in that area. I will reveal my gender to you, in private, when I feel the time is right.&lt;br /&gt;&lt;br /&gt;I have tried to enlist references but their phones appear to be blocking my number so I doubt you would have better luck. The gang at Top2Bottom knows me pretty well so just ask around.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;EBL&lt;/blockquote&gt;To make a long story short, Erskine got the job!</content><link rel='replies' type='application/atom+xml' href='http://jermdemo.blogspot.com/feeds/8960983689378098985/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://jermdemo.blogspot.com/2008/11/writing-decent-cover-letter.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/8960983689378098985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8532065960756482590/posts/default/8960983689378098985'/><link rel='alternate' type='text/html' href='http://jermdemo.blogspot.com/2008/11/writing-decent-cover-letter.html' title='Writing a decent cover letter'/><author><name>Jermdemo</name><uri>http://www.blogger.com/profile/01662705354227625640</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry></feed>