Description Objects from the Class Slots Methods Author(s) See Also Examples
This class encapsulates the igraph
class from the igraph package providing a data.frame
of annotation for the nodes that can be accessed and modified in a manner consistent with the rest of the package.
Objects can be created by calls of the form new("annotatedIGraph", graph, annotation)
.
graph
:Object of class "igraph"
annotation
:Object of class "data.frame"
with one row per node indicating the annotation for the graph. For instance in a PPI graph each node would be mapped to a protein as well as a gene ID. Also contained in this object would be graph-specific metadata which would be used in downstream functions for edge/node drawing characteristics.
signature(obj = "annotatedIGraph")
: Retrieve the annotation data.frame
signature(obj = "annotatedIGraph")
: Replace the annotation data.frame
signature(obj = "annotatedIGraph")
: Retrieve the igraph
object
signature(obj = "annotatedIGraph")
: Save an annotatedIGraph
object to disk
Daniel Bottomly
priorDbParams
, loadGraph
, igraph
, get.protein.protein.graph
1 2 3 4 5 6 7 8 | stopifnot(require(igraph))
set.seed(123)
sim.graph <- erdos.renyi.game(n=10, p.or.m=.5, type="gnp", directed=FALSE, loops=FALSE)
sim.dta <- data.frame(node.name=paste("node", 1:10, sep="_"), colors=sample(colors(), 10))
annot.graph <- new("annotatedIGraph", graph=sim.graph, annotation=sim.dta)
## Not run: plot(getGraph(annot.graph))
head(annotation(annot.graph))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.