[BioC] ftM2graphNEL unexpected error

Wolfgang Huber huber at ebi.ac.uk
Wed Feb 7 00:48:21 CET 2007


Dear Dan,

> did you read the error message? It says "The graph is undirected and the 
> following edges are not reciprocated:  58|62, 57|62", so I assume what 
> is going on is that your subsetted from-to table does not contain the 
> edges in both directions. So, either you need to drop the 
> edgemode="undirected" argument, or you need to include all edges in both 
> directions.

I apologize, this was wrong: as Seth as well as the man page of the 
function ftM2graphNEL (that I wrote quite some time ago) correctly point 
out, the function expects the from-to table to contain each edge only 
once; even though then internally in graphNEL objects of edgemode, 
undirected edges are then stored twice. So it seems to be a nasty 
interaction between the old ftM2graphNEL code and the recently revised 
graphNEL constructors and validity checks.

Did you send the matrix "ft" to Seth? If not yet, please also cc me, so 
we can work out what's wrong.

  Best wishes
   Wolfgang

> Note the function "ugraph" that converts a directed graph into an 
> undirected one (by loosing the directions)
> 
> Best wishes
>  Wolfgang
> 
> ------------------------------------------------------------------
> Wolfgang Huber  EBI/EMBL  Cambridge UK  http://www.ebi.ac.uk/huber
> 
> 
>> I have a set of 429 links (matrix ft with 'from' and 'to' nodes), a 
>> set of
>> 281 nodes n, and a set of 429 link weights w.
>> I wish to create graphs using subsets of the links. Sometimes this works,
>> sometimes not (see below). Essentially, if too few links are included 
>> then
>> the graphNEL object is not created.
>> If anyone would like the data, I can email them directly.
>>
>> Any help greatly appreciated.
>>
>> Dan Bebber
>>
>> using R 2.4.1 and graph 2.4.0
>>
>> ------------------------------------------------------------------------------------------------ 
>>
>>
>>> ftM2graphNEL(ft[1:429,], V=n, W=w[1:429], edgemode="undirected")
>> A graphNEL graph with undirected edges
>> Number of Nodes = 281
>> Number of Edges = 429
>>
>>> ftM2graphNEL(ft[1:420,], V=n, W=w[1:420], edgemode="undirected")
>> A graphNEL graph with undirected edges
>> Number of Nodes = 281
>> Number of Edges = 420
>>
>>> ftM2graphNEL(ft[1:220,], V=n, W=w[1:220], edgemode="undirected")
>> The graph is undirected and the following edges are not reciprocated:
>>  58|62, 57|62
>



More information about the Bioconductor mailing list