GraphNEL object retrieve edgenumber from acc() or is it list of lists?
1
0
Entering edit mode
@schaefe9informatikuni-bonnde-5587
Last seen 9.6 years ago
Hello everyone, Im working with graphNEL object and want to extract all the nodes which have adjacent nodes with at least 20 nodes in between them. acc(graph, graphnodes) obviously provides a list for the accessable nodes of every node from a node and a number of the edges between them. Like this: $`hsa:8379` hsa:100131844 hsa:10393 hsa:246184 hsa:29882 hsa:29945 1 1 1 1 1 hsa:51433 hsa:51434 hsa:51529 hsa:64682 hsa:8697 1 1 1 1 1 $`hsa:51343` hsa:23594 hsa:23595 hsa:5001 hsa:5000 hsa:4999 hsa:4998 8 8 8 8 8 8 and so on. However I want know access the numbers so that I can compare these edgenumbers and only retrieve the nodes with an accessable node with at least 20 edges as mentioned above. How can I achieve this? In addtion whats the data type of the result of acc(). Is it a list in a list? Thank you
• 735 views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 5 days ago
United States
On 11/02/2012 10:23 AM, schaefe9 at informatik.uni-bonn.de wrote: > Hello everyone, > > Im working with graphNEL object and want to extract all the nodes which > have adjacent nodes with at least 20 nodes in between them. > > acc(graph, graphnodes) obviously provides a list for the accessable > nodes of every node from a node and a number of the edges between them. > Like this: > > $`hsa:8379` > hsa:100131844 hsa:10393 hsa:246184 hsa:29882 hsa:29945 > 1 1 1 1 1 > hsa:51433 hsa:51434 hsa:51529 hsa:64682 hsa:8697 > 1 1 1 1 1 > > $`hsa:51343` > hsa:23594 hsa:23595 hsa:5001 hsa:5000 hsa:4999 hsa:4998 > 8 8 8 8 8 8 > > and so on. However I want know access the numbers so that I can compare these > edgenumbers and only retrieve the nodes with an accessable node with at least > 20 edges as mentioned above. How can I achieve this? In addtion whats the do you mean you want these nodes acclist = acc(graph, graphnodes) len = sapply(acclist, length) keep = names(len)[len > 20] or maybe acc20plus = lapply(acclist, function(elt) elt[elt > 20]) keep = names(acc20plus)[!sapply(acc20plus, length) > 0] ? To create a subgraph of these, then subGraph(keep, graph) > data > type of the result of acc(). Is it a list in a list? ask the result class(acc(graph, graphnodes)) str(acc(graph, graphnodes)) or the help page ?acc -- it's a named list of named integer vectors. Check out RShowDoc("R-intro") for more help. Martin > > Thank you > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor > -- Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M1 B861 Phone: (206) 667-2793
ADD COMMENT

Login before adding your answer.

Traffic: 1059 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