[BioC] some experiences and some troubles with GraphAT package

Seth Falcon sfalcon at fhcrc.org
Tue Sep 6 20:01:50 CEST 2005

Hi Maria,

On  6 Sep 2005, maria at cbm.bio.uniroma2.it wrote:
> In my specific case, I created a subset of the big GO meta data
> file(in this subset I had only the nodes that were present in the
> experimental dataset) and I tried to remove from this subset only
> the edges that gave as similarity measures, values of Dij<3.I had
> 109 edges of this kind.
> So I did :
> for(i in 1:109){
> GgoPredYBPnew<-removeEdge(as.character(edges.to.delete$V1[i]),
> as.character(edges.to.delete$V2[i]), GgoPredYBP)
> }
> but the graph that I obtained was only of one edge smaller!!!

That's because your code is doing what you said, not what you want ;-)

Try this (untested!):

goGraphNew <- GgoPredYBP
for(i in 1:109){
    rmEdges1 <- as.character(edges.to.delete$V1[i])
    rmEdges2 <- as.character(edges.to.delete$V2[i])
    goGraphNew <- removeEdge(rmEdges1, rmEdges2, goGraphNew)

Basically, your code wasn't passing in the modified graph object on
each call to removeEdge...

+ seth

More information about the Bioconductor mailing list