plotModule {BioNet} | R Documentation

## Plot of the network

### Description

The function plots a network from graphNEL or igraph format, adapted from an igraph plotting function. It is just used to visualize the modules. For further plotting options use the plot.igraph function of the igraph package. The shapes of the nodes can be changed according to the scores argument, then negative scores appear squared. The color of the nodes can be changed according to the diff.expr argument. Negative values lead to green nodes, positive values are colored in red. If the vectors are not provided, it will be automatically looked for nodes attributes with the name score and diff.expr.

### Usage

    plotModule(network, layout=layout.fruchterman.reingold, labels=NULL, diff.expr=NULL, scores=NULL, main=NULL, vertex.size=NULL, ...)

### Arguments

`network` | Network in graphNEL or igraph format.
`layout` | Layout algorithm, e.g. layout.fruchterman.reingold or layout.kamada.kawai.
`labels` | Labels for the nodes of the network.
`diff.expr` | Named numerical vector of differential expression (fold changes) of the nodes in the network. These will be used for coloring of the nodes. It will be automatically looked for nodes attribute with the name diff.expr, if the argument is null.
`scores` | Named numerical vector of scores of the nodes in the network. These will be used for the shape of the nodes. It will be automatically looked for nodes attribute with the name score, if the argument is null.
`main` | Main title of the plot.
`vertex.size` | Numerical value or verctor for the size of the vertices.
`...` | Other graphic parameters for the plot.

### Author(s)

Marcus Dittrich and Daniela Beisser

### See Also

`plot3dModule`

### Examples

    library(DLBCL)
    data(dataLym)
    data(interactome)
    interactome <- subNetwork(dataLym$label, interactome)
    interactome <- rmSelfLoops(interactome)
    fchange <- dataLym$diff
    names(fchange) <- dataLym$label
    # create random subnetwork
    subnet <- largestComp(subNetwork(nodes(interactome)[1:100], interactome))
    fchange <- fchange[nodes(subnet)]

    # color random subnetwork by the fold change
    ## Not run: plotModule(network=subnet, diff.expr=fchange)

[Package BioNet version 1.44.0 Index]