[Bioperl-l] Fw: perly suffix trees--
Mark A. Jensen
maj at fortinbras.us
Thu Jul 16 08:48:16 EDT 2009
To the list with you, I have no secrets-- maybe Ian will chime in.
cheers,
MAJ
----- 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,
-Aaron
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--
http://www.bioperl.org/wiki/Suffix_trees_from_thin_air
Have a look; might be diverting-
cheers
Mark
_______________________________________________
Bioperl-l mailing list
Bioperl-l at lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/bioperl-l
More information about the Bioperl-l
mailing list