[Bioperl-l] Using Graph?

Nathan (Nat) Goodman natg@shore.net
Sun, 10 Nov 2002 22:06:11 -0800


After seeing Heikki's report of trouble with the Graph module, I started
poking at it, too, since I was the one who suggested Heikki give it a try.

The module includes several methods that do variants of path finding:
all-pairs-shortest-path, transitive-closure, and several implementations of
single-source-shortest-path.  According to the docs, these algorithms are
supposed to work for directed and undirected graphs.

Most of the methods require that edges have a ‘weight’ attribute -- the
weight doesn't default to 1 if the attribute is missing, as one might
imagine. The all-pairs-shortest-path and single-source-shortest-path
algorithms encode their results in ‘path’ attributes, a fact mentioned in
the docs for all-pairs-shortest-path, but not for
single-source-shortest-path.

The all-pairs-shortest-path and transitive-closure methods do not handle
undirected graphs correctly.  As Heikki reported, the
single-source-shortest-path algorithms often (but not always) hang and
eventually use up all of memory.  From my brief testing, it seems the
single-source-shortest-path algorithms give the correct answer when they do
not hang, including on undirected graphs.

If Heikki wants, I’m willing to take over the bug song-and-dance with the
developer.  Seems only fair….

Best,
Nat