[Bioperl-l] perly suffix trees--

Mark A. Jensen maj at fortinbras.us
Thu Jul 16 13:36:45 UTC 2009

Modifications to http://www.bioperl.org/wiki/Suffix_trees_from_thin_air per these comments.
Add/correct at will!
  ----- Original Message ----- 
  From: Aaron Mackey 
  To: Mark A. Jensen 
  Sent: Thursday, July 16, 2009 8:41 AM
  Subject: Re: [Bioperl-l] perly suffix trees--

  The code on that wiki page looks suspiciously incomplete.  For example, you declare $i = 0 in readDictionary, then never use it again.  It also looks like you only ever create entries for the entire word, and never any suffices (which presumably was what the $i was going to be for, to offset into each word).

  Further, it looks like the readDictionary loop will clobber already-seen fragments by reassigning "1" (when they might already be the prefix to some other suffix).  Perhaps the missing $i loop would reveal to me how this would be avoided.

  It also seems like testing for a hashref to equal 1 during the search is asking for type mismatch trouble; perhaps better to directly test the ref() status to determine rightmost/inner status? But that's just style, not substance.

  Best wishes,


  On Mon, Jul 13, 2009 at 10:15 PM, Mark A. Jensen <maj at fortinbras.us> wrote:

    Hi All-
    Russell sent me an almost magical Perl algorithm for creating a suffix tree
    or something like one. It was cool enough to make a scrap out of it--
    Have a look; might be diverting-
    Bioperl-l mailing list
    Bioperl-l at lists.open-bio.org

More information about the Bioperl-l mailing list