some experiences and some troubles with GraphAT package
1
0
Entering edit mode
@denise-scholtens-852
Last seen 9.8 years ago
Hi Maria, I think your questions actually pertain more to the 'graph' package rather than GraphAT. A few quick fixes using some functions in the graph package should get you ready to use GraphAT. My answers to your questions follow. At 08:29 AM 9/6/2005, you wrote: >Hello, > >I'm using GraphAT package to "measure" the congruency between an >experimental dataset and the metadata GO biological process. > >my experimental dataset is small if compared with GO meta data. >The specie on which I'm working is Yeast(cerevisiae). > >The important absumption with the method "getpvalue" of GraphAT package is >that the graphs that you want "compare" must have the same nodes(obviously >the number of edges should be different). If the 2 adj matrices you want >compare are different in size you get an error. > >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!!! > >May somebody help me? Note that GgoPredYBP is called in each iteration of the for loop as the graph from which to remove the edge. GgoPredYBPNew is not updated with each iteration. Your graph is only one edge smaller because at the end of the for loop, really only the 109th edge is removed. If you do update your new graph, then you will be able to remove all 109 edges. >I would have also some other questions regarding this package: > >how to use the information about the edge weights? for >example I want to consider as "common edges" between two graph only >the ones that have a certain values in their edge weights.... I am not aware of a way to create a subgraph according to edge weights - although one may certainly exist! I think what I would do is get the list of edge weights using edgeWeights() in the graph package and then set up a similar loop to what you have above, making sure to update the graph each time. >If the graphs that I want to compare have a different set of nodes (some >in common ), does some method could be developed to work directly only >with nodes in common? The GraphAT package is not currently set up only to work on the common nodes. I think the easiest thing to do for now would be to use the subGraph function in the graph package. If you identify the common set of nodes, then create a subgraph for each of the two graphs using that set of nodes. You should be all set. I hope that helps. Denise >thanks for your attention. > > >maria > > > >Maria Persico >MINT database, Cesareni Group >Universita' di Tor Vergata, via della Ricerca Scientifica >00133 Roma, Italy >Tel: +39 0672594315 >FAX: +39 0672594766 >e-mail: maria at cbm.bio.uniroma2.it > >_______________________________________________ >Bioconductor mailing list >Bioconductor at stat.math.ethz.ch >https://stat.ethz.ch/mailman/listinfo/bioconductor ********************************************************************** Denise Scholtens, Ph.D. Northwestern University Medical School Department of Preventive Medicine 680 N. Lake Shore Drive Suite 1102 Chicago, IL 60611 312.503.7261 312.908.9588 (fax) dscholtens at northwestern.edu
GO graph PROcess GraphAT GO graph PROcess GraphAT • 930 views
ADD COMMENT
0
Entering edit mode
Seth Falcon ★ 7.4k
@seth-falcon-992
Last seen 9.8 years ago
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
ADD COMMENT

Login before adding your answer.

Traffic: 585 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6