[BioC] how to store multiple relationships between nodes in graphNEL?
Seth Falcon
sfalcon at fhcrc.org
Tue Jul 24 22:24:36 CEST 2007
Paul Shannon <pshannon at systemsbiology.org> writes:
> I'd like to find the best way to record multiple relationships
> between nodes in a graphNEL object. The data for my graph comes
> from DIP, the Database of Interacting Proteins, where many protein
> interactions have several kinds of evidence. In other settings, I
> represent this as multiple edges, another solution is needed here,
> since graphNEL is designed for at most one edge between nodes.
One possibility might be a list of graphNEL objects all with the same
node set. You could also explore a more structured approach and
implement a multiGraph class.
> So I am improvising, packing any number of experimental methods into
> a token-separated list in a single edge's edgeData. Here is an
> example of one pair of yeast proteins observed by three different
> methods:
>
> edgeData (g, 'YCR084C', 'YBR112C', attr='edgeType')
> $`YCR084C|YBR112C`
> [1] "Immunoprecipitation::Affinity chromatography::Gel
> filtration chromatography"
I think you can avoid the token-separation game, but maybe I'm missing
something. The edge attributes can be any R object, even, say, a
character vector with length greater than 1 ;-)
So why not have
edgeData (g, 'YCR084C', 'YBR112C', attr='edgeType')
$`YCR084C|YBR112C`
[1] "Immunoprecipitation" "Affinity chromatography" "Gel filtration chromatography"
I'm not familiar with this data so I don't know if that makes sense or
is what you want. Another option for using the edge attributes might
be to use a list (or even an S4 class) with named components -- but
here it isn't clear whether simply using additional edge attributes
might be better. For example, you could store a logical value for
each edge type:
define edge attributes: type1, type2, type3
for each edge, the value of edge attributes type1-3 is TRUE or
FALSE depending on whether this edge is of that type.
> Could I be doing this a better way? And how could I best store the
> pubmed id associated with each method?
Not sure I'm following you, what does "each method" refer to here?
But perhaps the above gets you going?
+ seth
--
Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center
http://bioconductor.org
More information about the Bioconductor
mailing list