calSensitivity: Compute sensitivity values of node/edge groups

Description Usage Arguments Details Value See Also Examples

View source: R/core.R

Description

Computes sensitivity values of node/edge groups in a network or in a set of networks, and returns the network objects with newly calculated results.

Usage

1
2
calSensitivity(networks, stateSet, mutateMethod = "rule flip",
               groupSet = 0, mutationTime = 1000L, numRuleSets = 1, ruleFile = NULL)

Arguments

networks

A network or a set of networks used for the calculation

stateSet

The identifier for accessing a set of initial-states

mutateMethod

The method of mutation to be performed, default is "rule flip"

groupSet

The indexing number of node/edge groups for whose sensitivity values are calculated. Default is 0 which specify the latest generated groups.

mutationTime

The period of time in which the mutation occurs, default is 1000

numRuleSets

Number of random Nested Canalyzing Function sets, default is 1

ruleFile

The path points to a file containing user-defined Nested Canalyzing Function rules, default is NULL. In case the path is specified, the parameter numRuleSets is forced to 1.

Details

This function computes sensitivity values of node/edge groups in a specific network or in a set of networks. Two kinds of sensitivity measures are computed: macro-distance and bitwise-distance sensitivity measures.

The calculation is based on a set of initial-states specified by an identifier stateSet. The node/edge groups in each network are determined by an indexing number groupSet. For example, the number 1 would point to the data frame of node/edge groups named Group_1. For mutation settings, there exist some embedded mutations: "state flip", "rule flip", "outcome shuffle", "knockout", "overexpression", "edge removal", "edge attenuation", "edge addition", "edge sign switch", and "edge reverse". Besides, users can define their own mutation and apply here as shown in the below example. Users can also set the operational time of the mutation as determined by the parameter mutationTime. Finally, synchronous updating scheme is used for calculating state transitions. Single or multiple sets of random update-rules are generated based on the parameter numRuleSets. A file containing user-defined rules could be specified by the parameter ruleFile.

For each network, the sensitivity values are stored in the same data frame of node/edge groups. The data frame has one column for group identifiers (lists of nodes/edges), and some next columns containing their sensitivity values according to each set of random update-rules.

Value

The updated network objects including sensitivity values of the examined node/edge groups.

See Also

generateStates, generateState, generateGroups, generateGroup, findFBLs, findFFLs, calCentrality, findAttractors

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# load an example network, the large-scale human signaling network
data(hsn)

# setup OpenCL for parallel computation
setOpencl("gpu")

# generate 1000 random initial-states
states <- generateStates(hsn, 1000)
print(states)

# generate all possible groups each containing a single node in the HSN network
hsn <- generateGroups(hsn, "all", 1, 0)

# calculate sensitivity values of all nodes against the knockout mutation
hsn <- calSensitivity(hsn, states, "knockout")

# calculate sensitivity values against a user-defined mutation, also use user-defined rules
hsn <- calSensitivity(hsn, states, "D:\\mod\\UserMutation.java", ruleFile="D:\\mod\\UserNCF.txt")

# view the calculated sensitivity values and export all results to files
printSensitivity(hsn)
output(hsn)

csclab/RMut documentation built on May 14, 2019, 12:07 p.m.