subnetwork: Subnetwork simulation analysis through bootstrapping

Description Usage Arguments Value Author(s) Examples

Description

Simulates a fixed number of subnetwork through bootstrapping. Each subnetwork contains the same fixed number of nodes which correspond to the number of nodes of the tested subnetwork. For all simulated subetwork, three important informations are extracted: the number of nodes present when including the first-degree neighbor nodes, the number of links and the number of links when including all links from the first-degree neighbor nodes. Beware that the function can take some time to process when the number of iterations is large.

Usage

1
2
3
4
5
6
7
8
## S3 method for class 'subnetwork'
plot(x, bins = 30, ...)

## S3 method for class 'subnetwork'
print(x, digits = 4, ...)

subnetwork(network, nbIter = 1000, nbNodes = NULL, nbLink = NULL,
  nbNodesOneLink = NULL, nbLinkOneLink = NULL, seedV = -1)

Arguments

x

the output object from subnetwork function

bins

the number of bins used to generate the histograms

digits

the number of digits to use when printing numbers

network

an object of class network that represents the global network from which the tested subnetwork is extracted. The subnetwork can be included as an element of the network object. If the subnetwork is included in the network object, the nbNodes, nbLink, nbNodesOneLink and nbLinkOneLink parameters should all be NULL. If the subnetwork is not included, all four parameters should be set.

nbIter

a single numeric, interpreted as an integer indicating the number of iterations to be run. Beware that the function can take some time to process when the number of iterations is large. Default: 10000.

nbNodes

a single numeric, interpreted as an integer the number of nodes of the tested subnetwork. If the value is NULL, the value is obtained through the subnetwork present in the network object. Default: NULL.

nbLink

a single numeric, interpreted as an interger, the number of links of the tested subnetwork. If the value is NULL, the value is obtained through the subnetwork present in the network object. Default: NULL.

nbNodesOneLink

a single numeric, interpreted as an interger, the number of nodes of the tested subnetwork including the first-degree neighbor nodes. If the value is NULL, the value is obtained through the subnetwork present in the network object. Default: NULL.

nbLinkOneLink

a single numeric, interpreted as an interger, the number of links of the tested subnetwork including all the links of the first-degree neighbor nodes. If the value is NULL, the value is obtained through the subnetwork present in the network object. Default: NULL.

seedV

a single numeric, interpreted as an integer, a seed used when reproducible results are needed. When a value inferior or equal to zero is given, a random integer is used. Default: -1.

...

arguments passed to or from other methods

Value

a list is returned for use by print.subnetwork and plot.subnetwork. This list has the following components:

Author(s)

Pascal Belleau, Astrid Deschenes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Access demo files stored in the subnetsim package
networkFile <- system.file("extdata", "demo_network.sif", package="subnetsim")
subnetworkFile <- system.file("extdata", "demo_subnetwork.sif", package="subnetsim")

# Load a global network and its tested subnetwork using SIF format files
demo_network_with_sub <- network(netFileName = networkFile,
    subNetFileName = subnetworkFile)

# Run simulation
simulatedSubnetwork <- subnetwork(network = demo_network_with_sub,
    nbIter = 20, seedV = 313)

# To see a summary of the content of the "subnetwork" object
simulatedSubnetwork

belleau/subnetsim documentation built on May 27, 2019, 2:08 p.m.