{"id":767,"date":"2004-05-07T17:28:29","date_gmt":"2004-05-07T21:28:29","guid":{"rendered":"https:\/\/dwan.org\/?p=767"},"modified":"2019-10-25T15:21:39","modified_gmt":"2019-10-25T19:21:39","slug":"bowels","status":"publish","type":"post","link":"https:\/\/dwan.org\/index.php\/2004\/05\/07\/bowels\/","title":{"rendered":"Bowels"},"content":{"rendered":"\n<p>So, contrary to all good opinion and intention, I find myself back in the guts of the 10 year old C \/ C++ monstrosity that is BLAST. For those who aren\u2019t bioinformatics geeks, BLAST is the Basic Local Alignment Search Tool. It\u2019s the very most popular piece of software ever created for analyzing genetic sequence data. It\u2019s also a big pile of C, written by biologists for biologists. One of those pieces of software inside of which you really don\u2019t want to look.<\/p>\n\n\n\n<p>So anyway, we have one architecture (Alpha E40, running Redhat 7.2, thanks for asking) for which BLAST barfs on a particular alignment. If I feed it two very specific sequences it dumps core. So far, I\u2019ve rebuilt without optimization, upgraded gcc to the very most recent version, and examined the core file. This showed me that it\u2019s an \u201cArithmetic error\u201d in a particular function. Turns out it\u2019s the line:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">return searchsp * exp((Nlm_FloatHi)(-Lambda * S) + kbp->logK);<\/pre>\n\n\n\n<p>Everything is cool until that outermost multiplication by a very small value. Example idiot prints:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Entering BlastKarlinStoE_simple<br>^^ searchsp: 351649.000000 Lambda: 1.374063 S: 489 logK: -0.341642<br>^^ -Lambda * S: -671.916867<br>^^ exp((-Lambda * S) + kbp->logK): 1.101132e-292<br>^^ searchsp * the above: 3.872119e-287<br>Leaving BlastKarlinStoE_simple<br>Entering BlastKarlinStoE_simple<br>^^ searchsp: 351649.000000 Lambda: 1.374063 S: 518 logK: -0.341642<br>^^ -Lambda * S: -711.764697<br>^^ exp((-Lambda * S) + kbp->logK): 5.446862e-310<br>Floating exception (core dumped)<\/pre>\n\n\n\n<p>The part that gets me is that this works *fine* on other architectures. Unless I get this done in pretty short order, it would have been cheaper for me to upgrade the system on which the code runs than to spend my time debugging it.<\/p>\n\n\n\n<p>Hate.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So, contrary to all good opinion and intention, I find myself back in the guts of the 10 year old C \/ C++ monstrosity that is BLAST. For those who aren\u2019t bioinformatics geeks, BLAST is the Basic Local Alignment Search Tool. It\u2019s the very most&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37,33],"tags":[],"class_list":["post-767","post","type-post","status-publish","format-standard","hentry","category-genomics","category-technology"],"_links":{"self":[{"href":"https:\/\/dwan.org\/index.php\/wp-json\/wp\/v2\/posts\/767","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dwan.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dwan.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dwan.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dwan.org\/index.php\/wp-json\/wp\/v2\/comments?post=767"}],"version-history":[{"count":1,"href":"https:\/\/dwan.org\/index.php\/wp-json\/wp\/v2\/posts\/767\/revisions"}],"predecessor-version":[{"id":768,"href":"https:\/\/dwan.org\/index.php\/wp-json\/wp\/v2\/posts\/767\/revisions\/768"}],"wp:attachment":[{"href":"https:\/\/dwan.org\/index.php\/wp-json\/wp\/v2\/media?parent=767"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dwan.org\/index.php\/wp-json\/wp\/v2\/categories?post=767"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dwan.org\/index.php\/wp-json\/wp\/v2\/tags?post=767"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}