R: Get the two association networks

get_networks {dnapath} | R Documentation

## Get the two association networks

### Description

Extracts the estimated association network for each group from the differential network analysis results.

### Usage

    get_networks(x)

### Arguments

`x` | A 'dnapath' object from `dnapath`.

### Value

A list of two association matrices.

### Note

The two matrices can be plotted using the `plot_network` function from the SeqNet package, as illustrated in the examples below.

### Examples

    data(meso)
    data(p53_pathways)
    set.seed(0)
    results <- dnapath(x = meso$gene_expression, pathway_list = p53_pathways,
                       group_labels = meso$groups, n_perm = 10)
    # Extract the two estimated association networks for the first pathway
    nw <- get_networks(results[[1]])
    # Plot the networks using the SeqNet::plot_network function.
    # Note that the `compare_graph` argument is used so that the same node layout
    # is used across all of the plots.
    # Plot the two networks (in separate plots)
    g <- SeqNet::plot_network(nw[[1]])
    SeqNet::plot_network(nw[[1]], compare_graph = g)
    # Plot of the differential network for pathway 1.
    # Again, the `compare_graph` argument is used to maintain the same layout.
    plot(results[[1]], compare_graph = g)
    # We see that genes 51230 and 7311 show strong differential connectivity.
    # The plot_pair() function can be used to investigate these two genes further.
    plot_pair(results[[1]], "51230", "7311")

[Package dnapath version 0.7.4 Index]