[Bioc-devel] Question graph package 1.10.2

Seth Falcon sfalcon at fhcrc.org
Mon May 15 19:33:12 CEST 2006

Hi Markus,

How timely.  Martin Maechler uncovered this same regression last
Friday.  I have a fix available in trunk and will be patching the
release today.

However, some discussion is warranted.  With the new node/edge
attribute handling, returning the edge weights is actually a bit
strange.  Why?

  * Because it would be perfectly reasonable to return the values
    of a different edge attribute instead of "weight".

  * Because the "weight" edge attribute can actually be any R object
    and may not be appropriate for the entries of a matrix.

When you create a graphNEL or graphAM instance with edge weights, they
are now stored as any other edge attribute and can be accessed
directly using edgeData(g, from, to, attr="weight").

The fix for as() checks to see if an edge attribute named "weight" is
defined, and if so, uses it to fill the non-zero matrix elements.

We plan to add a toMatrix generic that will provide for more flexible
conversion from the graph classes to matrices.  So that, for example,
one can have the values replaced by any edge attribute.

Anyhow, thank you for the report and look for a patched version in the
next couple of days.


+ seth

More information about the Bioc-devel mailing list